Memfault

Memfault over Blecon Integration Demo

For more information about our Memfault integration, please contact us!

Memfault enables observability on embedded devices: Memfault collects crash reports, logs, and metrics and orchestrates OTA updates. Our cloud and device-side integration let you use Memfault over your Blecon network.

If you're new to Memfault, it's a good idea to head over to their docs to understand how it works, and how the SDK operates with your device code.

Cloud-side integration

Memfault can be enabled within a network. In the "hosted integrations" tab, you can find the Memfault integration and enable it.

Once installed, you'll need to configure the integration by providing it with a Memfault Project Key. Project keys can be managed within the "Project Settings" menu in the Memfault app.

All devices within your network can now send data to your Memfault project. Their identity is authenticated by Blecon, and they will appear in Memfault with their Blecon ID.

Device-side integration

In order to try out the Memfault integration, we provide pre-built firmware for the nRF52840 DK. See below for details.

The SDK provides three modules to enable Memfault on your device. All are platform agnostic, and in addition we provide a platform-specific implementation for the nRF Connect SDK:

ModuleDescription

blecon_memfault.h

Provides a transport for Memfault chunks over Blecon

blecon_memfault_ota.h

Interrogates Memfault for availability of OTA updates

blecon_download_client.h

Downloads OTA updates over Blecon

Please check the Modem API Referencefor configuration and API details.

Example

The Device SDK includes a Zephyr example under the zephyr/examples/memfault directory. It demonstrates collecting metrics and crash reports and sending them over to Memfault over Blecon. It also showcases how Memfault OTA updates can be downloaded over Blecon and applied using MCUBoot. The example has been tested on the nRF52840 DK board.

Once compiled (or the prebuilt example downloaded), the example can be flashed onto the development kit (using west or the nRF Connect Programmer). A serial terminal can be used to control it (baudrate 115200bps).

On macOS and Linux, screen /dev/tty.usbmodemXXX 115200 can be used.

*** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.004,333] <inf> mflt: Reset Reason, RESETREAS=0x4
[00:00:00.004,364] <inf> mflt: Reset Causes: 
[00:00:00.004,394] <inf> mflt:  Software
[00:00:00.005,218] <inf> mflt: GNU Build ID: 3e3cc7079b69920b9833f81375dc4780f23439fd
[00:00:00.006,591] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            d6 da c7 ae 08 db 72 6f  2a a3 26 49 2a 4d a8 b3 |......ro *.&I*M..
                                            98 0e 07 7f                                      |....             
[00:00:00.016,876] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.016,937] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.016,967] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 214.51162 Build 1926957230
[00:00:00.018,371] <inf> bt_hci_core: Identity: C5:FD:8F:E6:6C:5D (random)
[00:00:00.018,402] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x11fb, manufacturer 0x0059
[00:00:00.018,463] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x11fb
Hardware version: nrf52840dk
Software version: 1.0.1
Device URL: https://blecon.dev/35c37453-dc9e-4151-a5f7-484c5f3363f7
[00:00:00.567,443] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
Connected
Time update
Disconnected
uart:~$

You can issue the two following commands to control the example:

  • blecon memfault_ota to check for an OTA update, and apply it if available

  • blecon crash to trigger a crash that can will be reported to Memfault on the next reboot

Symbol files need to be uploaded to Memfault to enable it to process crash reports, and OTA releases can be managed in the same interface too.

You can now enjoy the observability benefits that Memfault can offer, with Blecon!

Last updated

Get Support

Ask a question