vGateway installation on RasbperryPi

Overview

This article explains how to set up a vGateway on Raspberry Pi to connect your network to an Acreto Ecosystem.

Create New Gateway

To set up the vGateway on Raspberry Pi, you must first configure the Gateway object.

Creating new vGateway
Creating new vGateway

Please follow the steps below to create and configure a new Gateway that will be used as vGateway.

  1. Log in to the Acreto Portal at wedge.acreto.net.
  2. Select your Ecosystem and go to Objects using the left-side menu.
  3. Click Add new Object and select Gateway.
  4. Fill in the following fields:
    1. Name: the name of the gateway
    2. Category: IoT
    3. vGateway: select Gateway in the upper right corner
    4. DHCP/Static: Select DHCP
    5. vGateway Local IP: IP address of Raspberry Pi device in your LAN, i.e 192.168.200.1/24
    6. Local Networks: your local network addresses that will be routed through this gateway
  5. Save the created Gateway by pressing Add.
  6. Add a security policy that will allow communication from the Gateway device to the Internet.
  7. Commit pending changes (located at top of the screen).

To simplify testing, add the IP addresses of every interface connected to your gateway as Local Networks (you can use /32 prefix for public interface). This will allow testing connectivity from the gateway through Acreto using Ping, Traceroute, or similar tools.

To successfully test your connectivity, you also need to create a security policy that will allow traffic to go through your device.

Generate Raspberry Pi vGateway Image

To proceed with this step, you should have at least one Gateway configured as vGateway in your Ecosystem. From the left-side menu, select Objects > Gateways to display the list of existing gateways.

To generate a Raspberry Pi configuration image, you must:

  1. Click on the vGateway name on the vGateway panel. The details panel will then appear.
  2. On the right side of the gateway details panel, click on IoT Hardware Images to view a list of image generation options.
  3. Click the play icon for the right version of the device.
  1. The generation of the image may take a while, please be patient.
  2. When the image is ready, you may download it or copy the URL & save it on your PC.

Image Installation

Linux

To proceed with this step, you must have an image file generated by Acreto or a URL to the image for your vGateway.

To install the image, you must first proceed with flashing the SD card.

  1. Download the write_image.sh script.

    Click on the button and save the script in your home directory:

    Get write_image.sh

    or open the terminal and download the script using the command:

    wget https://kb.acreto.net/reference-material/downloads/write_image.sh
    
  2. Take the SD card out of your Raspberry Pi device.

  3. Insert the SD card into your computer.

    • Ensure it doesn’t mount automatically - if it does, unmount it.
  4. Use the write_image.sh script to write the image onto the SD card.

    • if you have an image file downloaded locally:

      ./write_image.sh image-file.zip /dev/sdb
      
    • if you want to use the URL of an image directly:

      ./write_image.sh https://aws1-vgateway-images.s3.amazonaws.com/vgateway-raspberry-pi4.s.nAH2xOL8HyJIK1g8v4HEsNCt.img.zip /dev/sdb
      

      where /dev/sdb is the location of your SD card

  5. Once finished, take the SD card from your computer and plug it into your device.

  6. Restart the Raspberry device and wait until it boots from the SD Card.

  7. Log in to your WEDGE account.

  8. From the left menu choose the Logs > Gateways option.

  9. As one of the last inputs, you should see information about the established connection from your Gateway.

More information about checking the connectivity can be found in the Connectivity Check article, where a dedicated tool is available.

Windows

To proceed with this step, you must have an image file generated by Acreto.

  1. Take the SD card out of your Raspberry Pi device.

  2. Insert the SD card into your computer, wait until it is visible in the system.

  3. Unzip the file downloaded from WEDGE, make sure that you can see the *.img file.

  4. Go to Raspberry Pi Software Page.

  5. Download the last version of Raspberry Pi Imager.

  6. Run downloaded *.exe file and install it.

  7. If Raspberry Pi Imager doesn’t start after installation, run it manually. You should see the window presented below:

  8. Click on the Choose OS button and select the Use custom option.

  9. Select a downloaded image using the explorer window.

  10. Click on the Select Storage button and choose your SD Card.

  11. Double-check the settings and if they’re OK, click on the Write button.

  12. The writer will warn you about erasing the current content of the SD Card, click on the YES button to continue. Now the Writing process will start, it may take a few minutes.

  13. When writing ends, you should see the below information.

  14. Once finished, take the SD card from your computer and plug it into your device.

  15. Restart the Raspberry device and wait until it boots from the SD Card.

  16. Log in to your WEDGE account.

  17. From the left menu choose the Logs > Gateways option.

  18. As one of the last inputs, you should see information about the established connection from your Gateway.

    Gateway on the Getaways lists
    Logs for test Gateway

    More information about checking the connectivity can be found in the Connectivity Check article, where a dedicated tool is available.

List of Supported USB Ethernet Adapters to Use for LAN

By default, the Raspberry Pi has only one Ethernet adapter. But to connect your network, you’ll need an additional Ethernet adapter.

Acreto recommends using a USB Ethernet dongle facing the LAN network.

Show the list of supported USB Ethernet devices
Next page: Open VPN connection