Data Channel Bootstrapping

Robert Keith
The Helium Blog
Published in
3 min readFeb 9, 2018

--

What if your IoT device was transferred to another user? How much work would it be for a developer to switch cloud services without shutting down their edge devices?

Recently, a developer in our community was looking to send edge data to multiple services, but wanted this process to be configured programmatically. With Helium’s Configuration Variables, it is possible to set the name of your channel as a configuration variable, or create more than one channel at runtime to send edge data to more than one channel. In the following video, I will set up two channels in application code, but set the name of the second channel from the cloud service of the first channel.

Example Code:

Important Notes with Multiple Channels

Having more channels means you will need more memory.

  • Implementing multiple channels will be very difficult on a chip like the ATmega on the Arduino Uno due to its limited stack memory. Configuration Variables make up a large portion of this required memory and we will not be able to update channels at runtime without them.

Save your settings on update.

  • If for some reason the device goes inactive or needs to be reset, you will need to be able to reload your configuration from the last Configuration Variable update such that you are connecting and sending to the right data channels. One way this can be done is by exporting the configuration to a json file which is loaded at every application start and updated on every configuration change. If you are working in a system that does not support file I/O, you can write this configuration to EEPROM.

More Channels, More Data

  • Naturally, every additional channel increases the data sent from your device by a factor of 1 which puts more strain on your network. You should consider increasing the time between sends and configuration updates to compensate for the increased network load.

Other Methods of Bootstrapping

In this demonstration we are presetting how many extra channels can be modified, but that is not the only way to accomplish channel bootstrapping. A Configuration Variable could be set to index an array of strings, and a string variable could represent the name of the string at the index designated by a configuration variable. This method allows a user to continuously create and destroy channels on the device to the limits of your hardware and network.

The important notes about bootstrapping mentioned above become more and more prevalent as the number of channels increases. Manage your data wisely, and do not leave unused channels active on your device.

Attempt Channel Bootstrapping Yourself

Here is what you’ll need:

More Information for Working with Helium Devices

Need Help Getting Started?

Want to talk to the Helium team or learn more? You can reach us here:

--

--