Skip to main content

Data-Only Hotspot Setup with balena + Raspberry Pi + RAK2287

A data-only Hotspot is a type of Hotspot that participates on the Helium Network by transferring data from the end devices (LoRaWAN nodes). The data-only Hotspots are eligible for network data transfer rewards but not Proof-of-Coverage rewards.

This guide covers all the steps needed to set up a data-only Hotspot using a Raspberry Pi and a RAK concentrator (RAK2287) and the Pi Hat running on balena. This configuration can be achieved by installing the gatewayrs and packet forwarder services open sourced by Nebra and using balenaOS and balenaCloud.

Getting started​

Hardware​

important

To use the concentrator module with a Raspberry Pi HAT, you must make sure to order the variation with the SPI interface.

Software​

Deploy the code​

Running this data-only Hotspot with balena.io is as simple as deploying it to a balenaCloud application. You can do it in just one click by using the button below:

Follow the instructions, click Add a Device and flash an SD card with that balenaOS image downloaded from balenaCloud. Enjoy the magic 🌟Over-The-Air🌟!

Find the repository with the source code if you would like to clone and deploy from your computer or you would like to contribute.

Configure the device​

Device Variables​

Once the device is online on balenaCloud and the services packet-forwarder and gateway-rs are downloaded and installed, go to Device Variables.

  • Create the variable for all the services VARIANT with your hardware definition. During the test is being used a Raspberry Pi 4 with RAK2287 LoRa concentrator and the VARIANT is defined DIY-RAK2287. This VARIANT is compatible with any Raspberry Pi. You can find the list of hardware compatible combinations on GitHub.

  • Create the variable for all the services REGION_OVERRIDE with your LoRa region (e.g. EU868). You can find a list of LoRa regions compatible on GitHub.

Test the Helium Data-Only Hotspot​

Once the Device Variables are properly set up, the Hotspot should be running showing some errors on connecting to the network on the balenaCloud Logs.

To check that the Hotspot has been generated correctly, go to the Terminal and select the gateway-rs service, then introduce:

helium_gateway key info

And you will get something like this:

{ "address": <hotspot address>, "name": <hotspot name> }

At this point, your data-only Hotspot is ready to join the Helium IoT Network.

Join the Helium IoT Network with your Data-Only Hotspot​

To join the Helium IoT Network, at the moment only the Helium CLI Wallet can be used. The Helium Wallet App is still not compatible with the data-only Hotspots. Follow these instructions to add your data-only Hotspot on the Helium IoT Network.

Check the Data-Only Hotspot​

Now that the data-only Hotspot has been added to the Helium IoT Network it should be visible in the Helium Wallet.

If you create a Helium Device, then go to the Helium Console and Inspect packages from your device to confirm that the data-only Hotspot is the one that relays the data from your Devices. You also will be able to see on the balenaCloud logs that UPLINK messages have been relayed to the Helium OUI.

Manage your gateway_key​

It's extremely important that at this point, with the Hotspot added on the Helium IoT Network you backup the gateway_key. If you lose this key, you will not be able to use this hotspot anymore in case there is a problem on your Hotspot (SD card corrupted, etc.).

Backup your gateway_key.bin file​

Follow these instructions to back up your gateway_key.bin file of your Hotspot.

  • Open an SSH session to the "host-os" on balenaCloud Terminal.
  • Type this command and keep note of the (YOUR INSTANCE)_miner-storage: ls /var/lib/docker/volumes.
  • Type this command to get a link to download the gateway key (note to replace the YOUR INSTANCE part with the container number that you got from the previous command). curl -F "file=@/var/lib/docker/volumes/(YOUR INSTANCE)_miner-storage/_data#/gateway_key.bin" https://file.io
  • Use the outputted file.io link to securely download your swarm key. The link only works one time.

Restore your gateway_key.bin file on your new file​

Follow these instructions to restore your gateway_key.bin key into your new hotspot.

  • Open an SSH session to the "host-os" on balenaCloud Terminal.
  • Type this command and keep note of the (YOUR INSTANCE)_miner-storage information: ls /var/lib/docker/volumes.
  • Navigate to where the swarm_key is stored cd /var/lib/docker/volumes/(YOUR INSTANCE)_miner-storage/_data#/.
  • Remove the original gateway_key.bin file rm gateway_key.bin.
  • Reboot miner and you will see it restored and working.
  • Upload your gateway_key.bin that you wish to restore onto file.io and do curl -LJO [FILE.IO UPLOAD LINK].

Contributions​

Thank you to Nebra for developing and balenifying the Helium Hotspot, Helium developers community, Jose from RAK, Travis and Joseph from balena to work on the dbus + conman issues.