Skip to content

Memfault

Published On:
Jul 1, 2024
Last Updated:
Jul 4, 2024

Memfault is a commercial cloud-based service designed for collecting and analysing data from a fleet of internet-connected embedded devices. It also allows you to manage and deploy OTA (over-the-air) updates to your devices.

The Memfault logo1.

Dashboard

Memfault has a web-based dashboard for viewing data from your devices and managing things like OTA updates.

A screenshot of the Memfault dashboard on their demo account2.

Heartbeats

As of June 2024, all Memfault pricing plans allow up to 24 heartbeats per day3.

Heartbeats can be triggered manually with memfault_metrics_heartbeat_debug_trigger().

Metrics

Metrics are parameters you can track on your embedded device. The data is cached to be sent to Memfault on every heartbeat.

Metrics are defined with MEMFAULT_METRICS_KEY_DEFINE() macro in your memfault_metrics_heartbeat_config.def file4.

The macro takes two parameters, the name of the metric and it’s type. For example:

MEMFAULT_METRICS_KEY_DEFINE(my_metric, kMemfaultMetricType_Unsigned);

Then, in your code, you can update the metric with MEMFAULT_METRIC_ADD() like so:

#include "memfault/metrics/metrics.h"
void main() {
// ...
MEMFAULT_METRIC_ADD(my_metric, 32);
// ...
}

Traces

Memfault gives you the ability to send traces from your embedded device. A trace is designed to be sent when a significant issue occurs. By defaults, traces send you emails.

nRF Memfault Phone App

The nRF Memfault app by Nordic Semiconductor is a phone app (available for Android and iOS) which allows you to connect to devices running Memfault and publishing on the Memfault Diagnostic Service (MDS). The MDS is a Bluetooth GATT service. The app connects to these devices and streams the “chunks” from the device to the Memfault cloud.

The nRF Memfault app displays the application key (project key) and device ID.

A screenshot of the nRF Memfault app with a device connected to it. You can see the chunks of data which have been downloaded of the device and uploaded to Memfault.

Footnotes

  1. Memfault. Memfault Docs. Retrieved 2024-07-03, from https://docs.memfault.com/.

  2. Memfault. Demo Dashboard. Retrieved 2024-07-03, from https://demo.memfault.com/organizations/acme-inc/projects/shapemate/dashboards/memfault-overview.

  3. Memfault. Pricing Plan. Retrieved 2024-07-04, from https://memfault.com/pricing/#mcu.

  4. Memfault. MCU Metrics [documentation]. Retrieved 2024-07-04, from https://docs.memfault.com/docs/mcu/metrics-api.