Managing OTA Updates for Multiple IoT Hardware Variations

Every IoT fleet needs Over-the-Air (OTA) firmware update support and Golioth offers that by default for projects. When all your devices are exactly the same, it’s not too tricky to manage the rollout. But life is messy, and chances are you’ll eventually have different types of hardware in the field, if you don’t already. Golioth organizes fleets into Cohorts when rolling out firmware updates. Combine that with a package name for each hardware variation and you’ll have solved the challenge of getting the right firmware to the right device.

A Real-World Example

Aludel Elixir Rev B

Chris Gammell has designed a great line of custom boards for Golioth to use when standing up an IoT fleet. We call these boards the Aludel, and have both the Elixir and Mini models. With the Aludel Elixir model there are two variants that have different hardware and slightly different chips.

The challenge comes when you learn that all of these device types are running the same Nordic nRF9160 cellular modem as the main processor. So it is entirely possible to send the wrong firmware to one of these boards. It will flash, and will probably run, however the expected pin assignments are going to be different from one device type to the next. None of the peripheral devices are going to work!

To solve this, give each different hardware variant its own unique package name.

Firmware: Assigning Package Names

This will work with all of the platforms supported by the Golioth Firmware SDK. Set the Kconfig symbol below to your chosen package name.

This should be done for each unique hardware and firmware combination. If you’re using Zephyr, add the variants to a boards/board_name.conf file:

CONFIG_GOLIOTH_FW_UPDATE_PACKAGE_NAME="aludel-elixir"

This hard codes the package name into this particular firmware. That means that the device will only look for this package name when receiving an OTA manifest from the cloud. If you happen to deploy the wrong package to a Cohort, the firmware update subsystem on your devices will ignore it!

Cloud: Creating, Uploading, and Deploying Packages

Regular readers of the blog may remember that I posted about multi-image OTA back in April. In that post, I detailed how to deploy multiple images to a single Cohort. Of course that still applies here, but instead of using main as your firmware update package name, use the unique name you built into your firmware.

Golioth Console viewing packages. aludel-elixir and aludel-mini are shown.In the Golioth web console, navigate to your project and create one package for each of the unique package names you have used in your firmware build. Above you can see I have created two: aludel-elixir and aludel-mini.

Adding a new package version on the Golioth web consoleNow that my packages have been created, I can click on the package name and use the New Version button to upload a version. Input the version number, choose the binary to upload, and hit the Upload New Version button.

Golioth web console showing a new deployment being readied.Finally, navigate to the Cohorts entry on the left sidebar, choose your desired Cohort, and click on the Deploy button. You’ll be greeted with the dialog shown above. Choose your desired packages and versions; you will be limited to the packages that have already been uploaded to the Golioth platform.

Click Next to review your changes, and if everything looks okay click Start Deployment to roll these out to the fleet. More precisely, roll it out to this Cohort of your fleet!

As with all features on the Golioth cloud, this is available via the Golioth REST API. Pair up cohorts, package names, and CI/CD pipelines and you really start to line up a bulletproof system to ensure the right firmware goes to the right place.

Organize Your IoT Before It’s Too Late!

Planning for OTA begins long before your devices are in the field. If you wait, the problem can quickly scale to an unmanageable mess. Golioth delivers a powerful OTA experience that is simple to use thanks to Packages, Cohorts, and Deployments.

Golioth is free for individuals so give this approach to OTA organization a try today! We’d love to hear how it goes so let us know on the Golioth forum.

 

Mike Szczys
Mike Szczys
Mike is a Firmware Engineer at Golioth. His deep love of microcontrollers began in the early 2000s, growing from the desire to make more of the BEAM robotics he was building. During his 12 years at Hackaday (eight of them as Editor in Chief), he had a front-row seat for the growth of the industry, and was active in developing a number of custom electronic conference badges. When he's not reading data sheets he's busy as an orchestra musician in Madison, Wisconsin.

Post Comments

No comments yet! Start the discussion at forum.golioth.io

More from this author

Related posts

spot_img

Latest posts

Custom Board, Custom Zephyr Devicetree (AirTag Session 3)

Sign up for the AirTag Clone webinar series to watch Golioth build out board definition files for the Orleon board, a Bluetooth sensor platform/playground. The upcoming session on May 23rd will walk through setting up all required build files.

Where’s my (Bluetooth) drill?

We implemented Golioth's Bluetooth-to-Cloud connectivity on a battery pack on a commercial power drill. We not only monitored power usage of the drill, we also looked up the location of the most recent gateway we connected through and attached that to the drill's device record.

Battery Monitoring with Zephyr’s Fuel Gauge Subsystem

Fuel gauge ICs offload effort when it comes to taking reliable battery readings and estimating charge and drain times. Zephyr's support for these components makes using them even easier.

Want to stay up to date with the latest news?

Subscribe to our newsletter and get updates every 2 weeks. Follow the latest blogs and industry trends.