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.

warning

Data Only Hotspots cannot earn $HNT, at least for now, and after milestone 2 they will earn $HNT only for Device Packet Transfer. Remember to keep an eye on Light Hotspots - BETA and the #gateway-development channel on the Helium Discord Server to check how the development process evolves.

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 instructions, click Add a Device and flash an SD card with that balenaOS image dowloaded from balenaCloud. Enjoy the magic 🌟Over-The-Air🌟!

Find the repository with the source code here 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 gatewayrs 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 here the list of hardware compatible.

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

Test the Helium Hotspot

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

To check that the Hotspot has been generated correctly, go to the Terminal and select the gatewayrs 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 blockchain!

Join the Helium blockchain with your Hotspot

To join the Helium blockchain, at the moment (summer 2021) you only can use the Helium CLI. The Helium app is still not compatible with the data-only hotspots. Follow this instructions to add your Data Only Hotspot on the Blockchain.

You can find as well the instructions to do it here.

Check your Data Only Hotspot

Now that your Data Only Hostpot has been added into the Helium Blockchain you should be able to see it on your Helium wallet.

Go to the Helium Explorer and introduce your URL https://explorer.helium.com/hotspots/<hotspot address>.

If you create a Helium Device, then go to the Helium Console and Inspect packages from your device to confirm that the Data Only Hostpot 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 blockchain you backup the gateway_key. If you loose this key, you will not be able to use this hotspot anymore in case there is a problem on your hostpot (SD card corrupted, etc).

Backup your gateway_key.bin file

Follow this instructions to backup 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 this 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.