Manufacturing A Mini-fleet: Provisioning And Updating 10 Thingy91’s

Golioth helps engineers build big fleets, from the first day of prototyping, past when their millionth unit rolls off the production line. For engineers who haven’t gone through every step of the manufacturing process, it can be hard to understand each step that is required.

We simulated manufacturing a ‘mini-fleet’ of devices (10 Thingy91’s) and showed how to provision and reprogram the devices for the field. Many of these steps approximate what you will experience when your device is ready to leave your manufacturing facility.

The video above shows you how to program a ‘bootstrap image’, how to generate and program certificates, how to add devices to a cohort, and how to roll out a new ‘production grade’ image to the finished products. It pulls together many elements of the Golioth Firmware SDK, and some recently released updates to our platform like Cohorts. Let’s take a look a how these steps can improve your production line.

Bootstrap image

After your board or product is manufactured, you want to test it using a default firmware image. This might be code that exercises different parts of the design or enables features and test modes unavailable to your end user. We refer to this as a “bootstrap image”. In addition to the testing capabilities you will want to include, you’ll also want to be able to use this firmware to provision your device onto the Golioth cloud. That’s what the example in the video above shows.

The bootstrap image that Mike created combines the certificate provisioning example from the Golioth Firmware SDK and adds on the AT client example from Nordic semiconductor that will allow us to communicate with the modem using AT commands. That’s how we’ll add certificates to the key storage part of the modem.

Generate and Program Certificates

There is helper code in the Golioth Firmware SDK that generates self-signed certificates and device certificates using openssl. Not shown in the video, we had previously created a project on the Golioth console and used the helper code to generate a root certificate. On camera we use upload the Root CA public certificate to Golioth, and use the helper code with the private root key to sign device certificates. These signed device certificates are how the server knows to trust the device, and where to send device data once it connects through the Golioth CoAP gateway.

Mike created a Python helper script to pass certificates over the USB to serial link. The device uses AT commands to securely store them directly in the modem key store.

Add to a Cohort

Golioth launched Cohorts back in October of 2024, as a new way to organize and deploy updates to your fleet of devices. This is a major upgrade to how our users can interact with a growing number of connected products.

Once the 10 devices have connected to the Golioth Cloud and their device record is created, we can add them to a cohort. We show the process manually using the Console, but it’s also possible to do this programmatically using the Golioth REST API. This will add the device records to a particular group and ready them for an Over-The-Air update. While we show just one Cohort in the video, you may add different cohorts to group devices, for instance, to push different firmware to each Cohort.

Program new image using Over-The-Air (OTA) Updates

Now that all 10 devices are in a cohort, we upload an artifact with the “production grade” firmware, in the video above as notated with 1.4.0. This represents what would be the ‘latest and greatest’ firmware you have available, to ensure all the latest features and bug fixes for your device are included on the new devices rolling off the line. Hopefully you have also implemented Hardware-In-The-Loop testing on your range of devices to ensure your firmware builds are compatible across different versions and configurations of hardware (highly recommended!).

Once we uploaded the new 1.4.0 firmware version, we were able to create a deployment with a single firmware image (though multiples can be bundled). We watched the devices getting notified and as they started downloading the image and sending back logs of the received block numbers. As the devices rebooted into their production grade firmware, new features were unlocked, namely all the features on our Thingy91 demo firmware (which now also supports the Thingy91X).

Build your own

Your custom hardware and firmware will have its own unique set of challenges. Golioth Solutions can help you to stand up an efficient end-of-line test setup, including getting your devices provisioned onto the Golioth Cloud without any hassle. Please get in touch if you’d like help, or hop over to our forum if you’re following the same steps as shown in the video and you’d like help with your custom setup.

Chris Gammell
Chris Gammell
Chris is the Head of Developer Relations and Hardware at Golioth. Focusing on hardware and developer relations at that software company means that he is trying to be in the shoes of a hardware or firmware developer using Golioth every day. He does that by building hardware and reference designs that Golioth customers can use to bootstrap their own designs.

Post Comments

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

More from this author

Related posts

spot_img

Latest posts

How to Add Golioth to an Existing Zephyr (or NCS) Project

Golioth removes the pain of connecting constrained devices to the cloud. This post shows you how to add Golioth to your existing Zephyr project and get your first device connected.

Golioth Can Now Run Entirely on Qualcomm Modems

Today marks the first implementation of running the entire Golioth firmware stack on a modem processor. This dramatically reduces resource consumption on the external MCU processor, and makes it easier to add Golioth to any hardware or platform.

Enhanced IoT Dashboards with Golioth, InfluxDB, and Grafana

We co-hosted a webinar with InfluxDB demonstrating how Golioth Pipelines make it simple to stream data from a microcontroller with environmental sensors directly into...

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.