Edge Computing Gateway How-To: Step by Step

Edge Computing Gateway How-To: Step by Step

How to use this page

One section per task, in the order a device meets them.

Recorded on an EG3120e running RobustOS Pro 2.4. Menus and pages are named as the device shows them. Save & Apply is the tick at the top right of the Web UI: most changes take effect only after you click it.

Where a guide asks you to do something, it links to the section here. Use the list of tasks, or follow the link.

Create a backup

The device never makes one by itself. Make one before every change: it is also where automatic recovery returns to.

System, Backup and Restore, Backup tab, Create Backup, OK, progress, then the new backup in the list
Recorded on the device, click by click. Select it to open it full size.
  1. In the Web UI, open System → Backup & Restore.
  2. Open the Backup tab.
  3. Click Create Backup. The device warns that this can take from several minutes to several hours; click OK.
  4. Wait while the progress bar runs. When it finishes, the backup is listed with its creation time and size.

The device keeps one backup: if one already exists, it asks before overwriting it. On the same tab, Automatic Failback Enable is what uses this backup when the device cannot boot; the device's own help says not to disable it unless there are special circumstances.

The backup is stored on the device itself. For a copy that survives the device, take a clone package (see Updating Your Device) and export the configuration file.

Restore from a backup

From the same tab. The device asks before it restores.

Backup tab, the restore icon on the backup row, the confirmation question, Cancel
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → Backup & Restore, tab Backup.
  2. On the row of the backup, click the restore icon (the circular arrow).
  3. The device asks "Are you sure you want to restore the backup?". Click OK to restore.

The recording stops at the confirmation question: nothing was reset on the recording device.

There is no button to download a backup to your computer. The copy you keep off the device is the clone package plus the exported configuration file.

Export the configuration file

Your settings, as one XML file on your computer.

System, Profile, Export Configuration File, Generate, Export
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → Profile.
  2. Under Export Configuration File, click Generate.
  3. Click the Export link that appears. Your browser saves the file config.xml.

Settings only: not your packages, apps, containers or data. Keep it with the clone package of the same device.

Import a configuration file

The same page, the other way round. Check the two switches before you click Import.

System, Profile, Import Configuration File, Choose File, the Import button
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → Profile.
  2. Under Import Configuration File, set the two switches: Reset Other Settings to Default (settings that are not in the file go back to default) and Ignore Invalid Settings.
  3. Click Choose File and select the XML file.
  4. Click Import.

The device does not ask for confirmation after Import. The recording stops before that click. What happens next, and what to check afterwards, is in Setting Up Your Devices.

Switch RCMS on

Also the step to repeat after a default-configuration restore, which switches it off.

Services, RCMS, Enable RCMS switched on, Submit, then the Save and Apply tick at the top
Recorded on the device, click by click. Select it to open it full size.
  1. Open Services → RCMS.
  2. Switch Enable RCMS to ON.
  3. Click Submit at the bottom of the page.
  4. Click the Save & Apply tick at the top right. Changes take effect only after this click.

Devices that Robustel pre-registered to your RCMS account and switched on at the factory already have it on.

Change the admin password

The Web UI account. Old password once, the new one twice.

System, User Management, Super User tab, the three password fields, Submit, Save and Apply
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → User Management, tab Super User.
  2. Enter the old password, then the new password twice.
  3. Click Submit, then the Save & Apply tick at the top right.

The recording shows the form filled with placeholders and stops before Submit.

Change the USB default key

Only if you use the USB update path. The factory key is the same on every unit.

1. Set a new key, from the command line (logged in over SSH as your sudo user):

sudo uci set user_management.usb_key "$(openssl rand -hex 24)"
sudo uci commit

2. Export the matching key file, in the Web UI:

Interface, USB, Key tab, Generate, Download
Recorded on the device, click by click. Select it to open it full size.
  1. Open Interface → USB, tab Key.
  2. Click Generate, then Download. The file is called key: it goes on the USB stick with the package.

From then on only the new key file is accepted: on the recording device, a key file made with the factory key was refused after the change, and the new one accepted. Keep the file with your deployment secrets.

Check your SSH access afterwards. Applying the change also re-applies the device's user settings. On the recording device this removed the SSH keys in the sudo user's ~/.ssh/authorized_keys: log in with the password and add your key again.

Re-issue per-device identity after a clone

A clone carries the reference unit's SSH host keys and certificates. Give each device its own.

SSH host keys, from the command line on each device:

sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server

This creates new host keys and restarts the SSH server. Check the new fingerprint with:

ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub

Your SSH client will then warn that the device's host key has changed. That is expected: remove the old entry for the device from your client's known hosts and connect again. On the recording device the new key stayed after a restart.

The Web UI certificate, with a certificate and private key your own certificate authority issued for this device:

System, Certificate Manager, Web tab, upload a private key and a certificate; Services, Web Server, select them, Submit, Save and Apply
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → Certificate Manager, tab Web.
  2. Next to HTTPS Private Key, click Choose File, select the key, then click the upload icon.
  3. Next to HTTPS CA Certificate, do the same with the certificate.
  4. Open Services → Web Server. Select the two files under HTTPS CA Certificate and HTTPS Private Keys.
  5. Click Submit, then the Save & Apply tick at the top right.

On the recording device the Web UI then served the new certificate. To go back, delete both files on the Web tab, set both fields on the Web Server page to None, then Submit and Save & Apply.

The Certificate Manager has matching OpenVPN and IPsec tabs for VPN certificates.

Block container ports with Custom Rules

A port you publish with Docker can be reached from outside. Two rules keep it to the LAN.

Network, Firewall, Custom Rules, add rule 1 that creates the chain, add rule 2 that blocks the port, Submit, Save and Apply
Recorded on the device, click by click. Select it to open it full size.
  1. Open Network → Firewall, tab Custom Rules.
  2. Click +. Index 1, a name, family IPv4, and this rule, then Submit:
    -N DOCKER-USER
  3. Click + again. Index 2, a name, family IPv4, and this rule, then Submit. Replace 1880 with your container's port:
    -I DOCKER-USER ! -i br_lan -o docker0 -p tcp --dport 1880 -j DROP
  4. Click Submit at the bottom of the page, then the Save & Apply tick at the top right.

The rule blocks the port for traffic that does not come in on the LAN side (br_lan). On the recording device the container still answered on the device itself; from the other network it was blocked.

Keep the first rule, and keep it first. The device firewall starts before Docker. Without rule 1, on the recording device the blocking rule was not in force after a restart and the port was open again. With both rules it was blocked at the first check after a restart and stayed blocked. While Docker is running, the device logs "Chain already exists" for rule 1: that is expected.

To check that the block is in force, on the device:

sudo iptables -S DOCKER-USER

The answer lists your rule with -j DROP at the end.

Copy container data off the device

Before anything that erases containers. Shown with a Node-RED container.

On the device (replace node-red and /data with your container and its data folder):

sudo docker cp node-red:/data ./node-red-data
sudo tar czf node-red-data.tar.gz node-red-data

Then on your computer (replace the user and the device address with yours):

scp <user>@<device-address>:node-red-data.tar.gz .

Keep logs after a restart

By default the logs are kept in memory and lost at reboot.

Services, Syslog, Save Position set to NVM, Submit, Save and Apply
Recorded on the device, click by click. Select it to open it full size.
  1. Open Services → Syslog.
  2. Set Save Position to NVM (the device's own storage).
  3. Click Submit, then the Save & Apply tick at the top right.

The device's own help advises against keeping the logs on NVM for a long time: set it back to RAM when you no longer need it.

Find the logs after a failed install

Read them in the Web UI, or download the whole journal.

System, Debug, the log view, a filter word, Syslog Journal File, Generate, OK, Download
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → Debug. The log is shown on the page.
  2. Type a word in Filtering (for example error) to show only the matching lines.
  3. To take the whole log with you, open Syslog Journal File, click Generate, confirm with OK, then click Download.

Logs from before the last restart are there only if you kept logs after a restart.

Restore the default configuration

Settings back to default; your software stays. It switches RCMS off.

System, Profile, Default Configuration, the Restore button
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → Profile.
  2. Under Default Configuration, click Restore next to Restore to Default Configuration.

The device does not ask for confirmation. The recording stops before that click.

Afterwards, switch RCMS on again if you use it.

Factory reset

Returns the device to its factory baseline and deletes its backup. Export first.

Backup tab, Restore To Factory Default, the confirmation question, Cancel
Recorded on the device, click by click. Select it to open it full size.

Before you start: export the configuration file and take a clone package off the device (Updating Your Device).

  1. Open System → Backup & Restore, tab Backup.
  2. Click Restore To Factory Default.
  3. The device asks "Restore to factory will erase all user data, delete user's backup. Are you sure you want to restore the factory backup?". Click OK to reset.

The recording stops at the confirmation question: nothing was reset on the recording device.

What the factory baseline contains on your units: What's on Your Device.

Subscribe to announcements

In the Robustel knowledge base. Open the page and use its Follow button.

Fleets in RCMS also see available updates there.

Download firmware and update packages

Firmware is published per model in the Robustel knowledge base.

  • Firmware: the model's firmware page, for example EG3120e or EG5120. Each release has its release notes and a download link.
  • Security update packages: ask Robustel support where to download the package for your model, or install it through RCMS.

How to install each kind of package: Updating Your Device.

Signing: set up your PC

Customer Image Signing, RobustOS Pro 2.5.0 and later. Ubuntu 22.04, natively or under WSL. Once per PC.

Run on a Windows PC under WSL with Ubuntu 22.04, the environment the signing tool is made for. In PowerShell, as administrator:

wsl --install -d Ubuntu-22.04

Signing rebuilds a system image of several hundred megabytes. Give WSL 4 GB of memory: create C:\Users\<you>\.wslconfig with these two lines, then run wsl --shutdown and open Ubuntu again.

[wsl2]
memory=4GB

In Ubuntu, install the tools, then dpkg-sig from the Debian 11 archive (Ubuntu no longer ships it):

sudo apt-get update
sudo apt-get install -y squashfs-tools xz-utils binutils gnupg openssl fakeroot pv coreutils dpkg-dev file libconfig-file-perl libdpkg-perl liblocale-gettext-perl
wget http://deb.debian.org/debian/pool/main/d/dpkg-sig/dpkg-sig_0.13.1+nmu4_all.deb
sudo dpkg -i dpkg-sig_0.13.1+nmu4_all.deb

Make the workspace in your Linux home folder, not under /mnt/c/, and put the signing tool (from Robustel support) and the factory firmware file in it. explorer.exe . opens it in Windows Explorer.

mkdir -p ~/repack-work/keys && cd ~/repack-work
explorer.exe .
chmod +x rbt-repack-firmware.sh

Signing: create your keys

Four files in keys/. Copy them to offline storage before you go further.

A real run on the PC, Ubuntu 22.04 under WSL. Select it to open it full size.

The package key. Answer 1 (RSA and RSA), 3072, 0 (does not expire), y, your name and e-mail, then O. GnuPG asks for a passphrase in its own box. Then export both halves into keys/:

gpg --full-generate-key
gpg --armor --export <your-email> > keys/gpg.pub
gpg --armor --export-secret-keys <your-email> > keys/gpg.key

The system-image key. ECDSA P-256 only; the device refuses RSA:

openssl ecparam -genkey -name prime256v1 -out keys/sqfs-priv.key
openssl ec -in keys/sqfs-priv.key -pubout -out keys/sqfs-pub.key

Copy the whole keys/ folder now to two offline places. sqfs-pub.key is the key the device locks to; without the private keys an enrolled device can never be upgraded again.

Signing: sign the image

One command. About three minutes on the recording PC.

A real run on the PC. Select it to open it full size.
sudo ./rbt-repack-firmware.sh --package <model>-firmware-<version>.bin --gpg-pub keys/gpg.pub --gpg-priv keys/gpg.key --sqfs-pub keys/sqfs-pub.key --sqfs-priv keys/sqfs-priv.key --version <your-version> --name <your-name>

If your package key has a passphrase, GnuPG asks for it in its box near the end. The tool documents a .env file for the passphrase: on the version tested here, a run with that file present stops at once with an error, so type the passphrase instead.

The new file is written next to the original: <model>-image-<your-name>_<base-version>_<your-version>_<date>.bin.

Signing: install a signed image

Import your package key, install, restart, then log in at once with the factory login.

1. Let the device trust your package key (over SSH, as the sudo user). Copy keys/gpg.pub to the device, then:

sudo /usr/scripts/rbt_gpg_usr.sh action=import key_file=$HOME/gpg.pub
ls /etc/upgrade-keys/customer.d

The second command shows your key as a file. Without it the device refuses your image and deletes the uploaded file.

2. Install, in the Web UI: System → Update, Choose File, Install. After the upload the device asks "All user data will be destroyed after the upgrade. Continue?". OK installs; the device then offers to restart.

Recorded on an EG5200 running RobustOS Pro 2.5.0. The recording stops at the question: nothing was installed from it.

Or over SSH: the same check and installation, in under a minute. It does not restart by itself.

sudo sysupgrade $HOME/<model>-image-<...>.bin
sudo reboot
A real run on an EG5200 that was already enrolled to this system-image key.

3. Log in at once. The device is back after about two minutes, with its factory configuration and factory login. Log in to the Web UI as soon as the login page appears: until someone logs in, it restarts again about every two minutes. Then create the sudo user again and import your configuration file.

Create the sudo user

The Linux login for SSH. One per device. A signed-image installation removes it.

System, User Management, Sudo User tab, the plus sign, username and password twice, Submit, Submit, then the Save and Apply tick
Recorded on the device, click by click. Select it to open it full size.
  1. Open System → User Management, tab Sudo User.
  2. Click +. Enter a username and the password twice, then Submit in the window.
  3. Click Submit at the bottom of the page, then the Save & Apply tick at the top right.

Recorded on an EG5200 running RobustOS Pro 2.5.0, right after a signed-image installation had removed the previous sudo user.

Signing: check the result

Key Enrolled on the Dashboard, your label on the command line.

Dashboard, System Information, the Customer Image Signing row reading Key Enrolled
Recorded on the device, click by click. Select it to open it full size.

Dashboard → System Information → Customer Image Signing reads Key Enrolled. Over SSH:

cat /etc/version-image
sudo rbt-system-mgmt developer-mode state
ls /etc/upgrade-keys/customer.d
A real run on the enrolled EG5200.

After the restart the imported package key is gone. Import it again before the next upgrade.

Secure Boot and USB re-flash: contact Robustel support

Two procedures with no published step-by-step yet.

  • Enabling Secure Boot is permanent. Contact Robustel support for the procedure for your model before you start. Signing your own image on RobustOS Pro 2.5.0 and later has its own guide: Signing Your Own Image.
  • Re-flashing the base system by USB (the last recovery stage) needs hands on the device. Contact Robustel support for the procedure for your model, and always before using it on a device enrolled to your own key.
Next · step 11 of 13Keeping secure over time →Patching and support life over the years.