Integrate the Memfault Firmware SDK into your MCU project; initialize it with your project key and device serial number in the memfault_platform_boot() implementation.
Call memfault_packetizer_get_chunk() in your upload task to retrieve binary chunk data; the SDK internally manages coredumps, heartbeat metrics, traces, and log data as a queue of chunks.
Transmit each chunk via HTTP POST to https://chunks.memfault.com/api/v0/chunks/DEVICE_SERIAL with header Memfault-Project-Key: YOUR_PROJECT_KEY and Content-Type: application/octet-stream.
Send chunks sequentially in packetizer order — do not pipeline requests for the same device; wait for the HTTP 202 response before sending the next chunk.
For batch efficiency, use the multipart batch endpoint to send multiple chunks per HTTP request when network conditions allow.
Handle HTTP 429 and 503 responses with exponential backoff using the Retry-After header value before retrying.
Known gotchas
Chunks must be uploaded in the order they were produced by the packetizer; out-of-order delivery for the same device prevents proper reconstruction of coredumps and metrics.
The project key is a project-level secret (not a per-device credential); rotate it via the Memfault settings page if compromised, then update all devices.
Memfault requires the device serial to be URL-safe; URL-encode any special characters in the serial number when constructing the endpoint path.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp