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.
Please follow the steps below to create and configure a new Gateway that will be used as vGateway.
- Log in to the Acreto Portal at wedge.acreto.net.
- Select your Ecosystem and go to Objects using the left-side menu.
- Click Add new Object and select Gateway.
- Fill in the following fields:
- Name: the name of the gateway
- Category: IoT
- vGateway: select Gateway in the upper right corner
- DHCP/Static: Select DHCP
- vGateway Local IP: IP address of Raspberry Pi device in your LAN, i.e
192.168.200.1/24
- Local Networks: your local network addresses that will be routed through this gateway
- Save the created Gateway by pressing Add.
- Add a security policy that will allow communication from the Gateway device to the Internet.
- 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:
- Click on the vGateway name on the vGateway panel. The details panel will then appear.
- On the right side of the gateway details panel, click on SBC and IoT Images to view a list of image generation options.
- Click the play icon for the right version of the device.
- The generation of the image may take a while, please be patient.
- 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.
-
Download the
write_image.sh
script.Click on the button and save the script in your home directory:
Get write_image.shor open the terminal and download the script using the command:
wget https://kb.acreto.net/reference-material/downloads/write_image.sh
-
Take the SD card out of your Raspberry Pi device.
-
Insert the SD card into your computer.
- Ensure it doesn’t mount automatically - if it does, unmount it.
-
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
-
-
Once finished, take the SD card from your computer and plug it into your device.
-
Restart the Raspberry device and wait until it boots from the SD Card.
-
Log in to your WEDGE account.
-
From the left menu choose the Logs > Gateways option.
-
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.
-
Take the SD card out of your Raspberry Pi device.
-
Insert the SD card into your computer, wait until it is visible in the system.
-
Unzip the file downloaded from WEDGE, make sure that you can see the *.img file.
-
Go to Raspberry Pi Software Page.
-
Download the last version of Raspberry Pi Imager.
-
Run downloaded *.exe file and install it.
-
If Raspberry Pi Imager doesn’t start after installation, run it manually. You should see the window presented below:
-
Click on the Choose OS button and select the Use custom option.
-
Double-check the settings and if they’re OK, click on the Write button.
-
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.
-
Once finished, take the SD card from your computer and plug it into your device.
-
Restart the Raspberry device and wait until it boots from the SD Card.
-
Log in to your WEDGE account.
-
From the left menu choose the Logs > Gateways option.
-
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.
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.