Skip to main content

mqtt-telemetry

The "connected device" starting point: bring up a Wi-Fi station, open an mqtts:// TLS MQTT client, and publish a telemetry metric on a cadence. Entirely on <alp/iot.h>. New in v0.14.0.

warning
preview — no broker round-trip is captured

The TLS status is still preview: no captured run shows a broker round-trip. As of alp-sdk v0.17.0, though, mbedTLS is built in on every target, native_sim included — the SDK now enables mbedTLS' PSA crypto core wherever it builds mbedTLS without TF-M (ALP_SDK_MBEDTLS_PSA_CRYPTO), which fixes the ssl_misc.h build break that used to force it off. AEN hardware builds seed it from the Secure Enclave TRNG (alif,se-trng, the default zephyr,entropy on every AEN board); only the native_sim scenario, which has no real entropy source, sets CONFIG_ALP_SDK_ALLOW_TEST_ENTROPY=y. The example publishes a synthetic uptime metric, not a real sensor reading.

Source: examples/connectivity/mqtt-telemetry/.

What it does​

  1. Opens a Wi-Fi station.
  2. Opens an mqtts:// TLS MQTT client.
  3. Publishes a telemetry metric on a cadence.

AEN only​

som.sku: E1M-AEN801. The transport is the on-module CC3501E Wi-Fi 6 + BLE bridge (silicon-validated 2026-06-24).

E1M-V2N101 is explicitly unsupported. The Murata Wi-Fi part is hil_silicon: untested and the Linux data path is unmerged — do not expect this example to run there by swapping som.sku.

board.yaml​

libraries:
- name: mbedtls
cores: [m55_hp]

som:
sku: E1M-AEN801 # Alif Ensemble E8 + on-module CC3501E

preset: e1m-evk

cores:
m55_hp:
app: ./src
iot:
wifi: true
tls: true
peripherals:
- spi
- gpio

chips:
- cc3501e

diagnostics:
log_level: info

spi + gpio and the cc3501e chip entry are new in v0.17.0: the app now brings the CC3501E bridge up itself (SPI1 inter-chip link plus the WIFI_EN / nRESET control pins) through a helper that includes <alp/chips/cc3501e.h> directly. Wi-Fi itself still reaches the app through the portable <alp/iot.h> surface.

Expected output​

native_sim — no radio, so the app prints the framing it would publish (mbedTLS is built in):

[mqtt] alp-sdk mqtt-telemetry demo (publish over MQTT/TLS)
[mqtt] transport: CC3501E Wi-Fi bridge (E1M-AEN801)
[mqtt] wifi: opening station
[mqtt] wifi: alp_wifi_open -> NULL (ALP_ERR_NOT_READY)
[mqtt] no transport on this build -- printing framing only
[mqtt] would publish to alp/telemetry/e1m-aen801: {"device":"e1m-aen801-demo","metric":"uptime_s","value":0}
...
[mqtt] done

The example's own README carries a real-hardware block — [mqtt] wifi: associated to "alp-demo-ap", [mqtt] broker: connected, [mqtt] publish 0 -> ALP_OK: {...}, [mqtt] done. It carries no date and no bench citation, so treat it as illustrative only.

Status​

  • TLS status: preview — mbedTLS builds on every target, but no broker round-trip is captured.
  • The published metric is synthetic uptime, not a sensor reading.
  • AEN-only; E1M-V2N101 unsupported.

See also​

Questions about this page? Email contact@alplab.ai