Memfault
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.
![](/_astro/memfault-logo-full-light-min.BOUc0JYa_ZDOuah.webp)
Dashboard
Memfault has a web-based dashboard for viewing data from your devices and managing things like OTA updates.
![](/_astro/memfault-demo-dashboard-overview-screenshot.nsev_WjQ_1u03om.webp)
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.
![](/_astro/nrf-memfault-app-chunks-screenshot.DGVLNvn3_INd2W.webp)
Footnotes
-
Memfault. Memfault Docs. Retrieved 2024-07-03, from https://docs.memfault.com/. ↩
-
Memfault. Demo Dashboard. Retrieved 2024-07-03, from https://demo.memfault.com/organizations/acme-inc/projects/shapemate/dashboards/memfault-overview. ↩
-
Memfault. Pricing Plan. Retrieved 2024-07-04, from https://memfault.com/pricing/#mcu. ↩
-
Memfault. MCU Metrics [documentation]. Retrieved 2024-07-04, from https://docs.memfault.com/docs/mcu/metrics-api. ↩