Perform an OTA Update With Memfault
Perform an OTA firmware upgrade using Memfault
Last updated
Perform an OTA firmware upgrade using Memfault
Last updated
This guide will walk you through flashing devices with initial firmware, setting up the Memfault integration with Blecon, and configuring Memfault to distribute a target firmware for the device to OTA update to.
Before starting please make sure you have the following:
A working Blecon account with access to the .
for your development board. You will use the memfault-1
and memfault-2
example applications from the package. Alternatively, you can build from source using the .
, for flashing the pre-built firmware.
A working Memfault account. If you do not have one, you can register for a .
Follow the Flashing Pre-built Firmware in the guide for your development board to flash the Memfault Example in the pre-built firmware package. The firmware file to flash ends in memfault-1.hex
. For instance, on the nRF54L15DK board, use nrf54l15dk-zephyr-x.y.z-memfault-1.hex
It is important you use the file ending in memfault-1.hex
and not the ones ending inmemfault-1-app.hex
or memfault-1-mcuboot.hex
. The memfault-1.hex
combines the contents of the memfault-1-app
and memfault-1-mcuboot
into a single file suitable for flashing onto a new device.
You will need the Device ID of your development board to register it into your Blecon Network and also to track its OTA update status in Memfault.
To obtain the Device ID for the Development Board, follow the Connecting to UART section of your Development board. In your terminal program you should see uart:~$
after you press the Enter/Return key.
Once you are connected to the UART, reset the device and wait for the device URL to be printed out in the boot messages.
You can follow the Device URL to register your device. Alternatively, you can copy and paste the Device ID, which the string of characters following "https://blecon.dev/" into the Register Device section of your Blecon Network.
Select the Memfault project that will manage the OTA process. If you do not have a suitable project or if you just signed up to Memfault, create a new project using the MCU > nRF52/53/54 on NCS preset.
Once you have an active project, go to Project Settings in the left sidebar. Copy your project key from the Project Details section.
Go to the Blecon Network that your device is on and click on the Integrations tab. Add the Memfault Integration to your Network. In the configuration pop-up for the integration, paste the project key you copied in the previous step.
In your Memfault Project, go to the OTA Releases section in the left sidebar. Once in the OTA Releases section, click the Create Release at the top right of the page.
In the configuration pop-up, enter the <version>+zephyr-memfault-2
in the Version textbox, where <version>
is the version of your prebuilt firmware.
Take care that the version you input matches that of the actual firmware you are using. Memfault compares the version string input above with the version defined in the firmware to determine if an OTA update should be applied. If the versions are set incorrectly the OTA may not occur or your device may repeatedly update.
Once you have created a release, click the Upload OTA Payload to Release button to upload the target firmware to which your device should update. In the Add OTA Payload popup:
enter your board type for the Hardware Version
enter main
for Software Type
upload the file ending in memfault-2-app.signed.bin
(this is the signed application-only firmware in binary format)
Click the Add button
Click the Activate button in the OTA Releases page to activate this release. Select the default
cohort, which your board is a part of, and double check that the release version and hardware versions are correct. If everything looks good, click the Activate button.
Switch to the Devices page using the left sidebar in Memfault. You should see the Device ID of your development board listed.
Before the OTA Update has been applied, Current Software Version will be <version>+memfault-1
.
You must manually trigger a check for new firmware on you development board by connecting over UART and entering:
After the OTA Update has been applied, the Current Software Version will become <version>+memfault-2
.