Skip to main content

Forwarding Chunks via Golioth

Golioth is an IoT platform that provides cloud services for embedded devices. If your project is using Golioth, you can leverage their CoAP client to forward Memfault chunk data to Memfault.

Step 1: Set up a Pipeline for Memfault

See https://docs.golioth.io/data-routing/destinations/memfault/ for instructions on setting up Memfault as a destination.

Step 2: Configure Memfault Data Upload

In a periodic task, drain chunks and upload to Golioth via Streaming mode with a Golioth blockwise stream. See the Memfault + Golioth example app for a sample implementation.

Step 3: Configure Device Info

Golioth will attach the Golioth device serial to Memfault data when uploading to the Memfault cloud. Therefore, the on-device Memfault serial can be empty, but the remaining device info should be customized.

By default, NCS provides a built-in memfault_platform_get_device_info() function with helpful defaults. See Kconfig options in NCS for configuring these!

Step 4: Remove the Memfault Project Key

If you are not connecting directly with Memfault's servers for data upload or OTA, you can set it to a dummy value:

prj.conf
# Disable the HTTP client (needed only for nRF91 projects)
CONFIG_MEMFAULT_HTTP_ENABLE=n

# Set to a dummy value
CONFIG_MEMFAULT_NCS_PROJECT_KEY="NULL"
info

CONFIG_MEMFAULT_NCS_PROJECT_KEY is optional in nRF Connect SDK >=v3.0.0 for any device that does not use MDS or the Memfault HTTP client to upload chunks, which applies for all NCS-based projects leveraging Golioth for chunks forwarding.