Product of the Week: Memfault Device Observability Platform

August 02, 2021

Story

Product of the Week: Memfault Device Observability Platform

More connected electronic devices means more code. And more code means more bugs. And more bugs means more continuous integration and continuous deliver (CI/CD) is needed to keep devices up to date without impacting end user experience.

Bugs will always exist. But to help catch and contain them before they impact yours or your customer's deployed IoT systems, Memfault has developed a cloud-based, self-service device “observability” platform for embedded developers.

Like many other IoT device management solutions, the Memfault platform supports device monitoring and OTA updates. Unlike many of them, however, the solution supports remote debugging that the company’s CTO says allows development teams to “manage connected devices with continuous updates and debugging without any impact on the end user.”

Memfault is comprised of a lightweight embedded SDK that collects data and events from the observed device(s), a “packetizer” that divides that device data into communicable chunks, and REST APIs that expose these data packets to a web app containing the Memfault CLI tool where debugging can take place.

The platform is compatible with almost any embedded hardware target, including Android-based devices and Arm Cortex-M or ESP32 microcontrollers running real-time operating systems (RTOS) or bare metal software. Not only can it be used to continuously detect and remediate code errors on these platforms, Memfault also supports automated alerts, captures fleet-wide metrics, and integrates with popular development lifecycle tools like Jira.

 

The Memfault Device Observability Platform in Action

As mentioned, the Memfault platform begins with a lightweight firmware SDK that integrates a variety of modules for device monitoring, remediation, and debugging. Being on device allows the Memfault Firmware SDK to capture and analyze core system data. These include debug registers, logs, “coredumps”, backtraces, and others, though users can select only the modules they intend to use to keep footprint to a minimum. 

  • Coredumps capture the system state when a device unexpectedly crashes, hangs or asserts
  • Reboot reason tracking provides summary analyses as to why devices are rebooting in the field
  • Error tracking with trace events captures lightweight error events while the system is running to assist in debug
  • Other general device metrics

These and other data structures may need to be sent for further analysis. If so, the SDK apportions data into packets as small as 9 bytes, and then transmits those packets to the Internet using Zigbee, Bluetooth, Wi-Fi, LTE, LoRa, or other protocols available to the system. These packets are then posted to the chunks HTTP API, where they can be accessed, reassembled, and interpreted by the Memfault cloud. 

Once ingested, the Memfault cloud then analyzes the data for issues, root causes, and, in some cases, recovery options.

Users can set up alerts to watch for specific events that, when identified by the SDK and confirmed during cloud analysis, are compiled in an alerts table and issued as notifications to key stakeholders. Users can then drill down into issues in the Memfault web app, which hosts dashboard views, or the previously discussed command-line tool, which functions like a client to the HTTP API. After installing the CLI tool it should be available in your local shell or terninal application.

These interfaces can be used to add devices to a cohort and/or manage OTA releases.

Getting Started with the Memfault Device Observability Platform

Given the broad range of hardware targets supported by the Memfault Device Observability Platform, the company has developed a set of documentation, example projects, and code to help prospective users get up and running with their devices quickly. These cover everything from terminology and creating new projects to publishing data to the Memfault cloud and pushing updates over the air back to devices.

Getting started guides are available for Arm Cortex-M, the nRF Connect SDK, Laird Pinnacle 100, ESP32 ESP-IDF, and ESP8266 RTOS SDK. More information is available on the Memfault documentation portal or Github.

Interested users can access a free trial of Memfault today – no credit card required for signup. For more information on the Device Observability Platform, visit memfault.com or check out the resources below.

Additional Resources: