Skip to main content

ESP-IDF SDK

The iotmer-sdk-esp-idf component connects Espressif chips to IOTMER: Wi‑Fi, HTTPS device provisioning, credential storage (NVS), MQTT over TLS, optional HTTPS OTA, optional BLE Wi‑Fi credential provisioning (NimBLE GATT v1, sibling component iotmer_ble_wifi_prov), and a small C API (iotmer_client.h).

Documentation covers the cloud side (workspaces, console, devices, REST API, MQTT). These pages are ESP-IDF integration only. Short narrative entry: Introduction (source in this repo).

Boot-time flow (summary)

  1. Wi‑Fi association (station mode).
  2. Load persisted credentials from NVS when present.
  3. Provision — skip HTTPS if NVS already holds a complete session; otherwise POST to the provisioning API (requires factory API key in Kconfig when used).
  4. Persist credentials to NVS.
  5. Optionally download firmware (OTA) when the server returns firmware_url and SHA256 metadata.
  6. Application code calls iotmer_connect for MQTT, then publishes telemetry and subscribes to commands/config as required.

Typical split: factory vs field firmware (illustrated today)

The examples/ folder will gain more projects over time. The pattern below is shown by the current reference builds:

BuildExampleAuth code in firmwareHTTPS provision
Factory / labexamples/01_provisioningTypically setRuns on each boot where Kconfig supplies the auth code
Field / OTA imageexamples/02_telemetryTypically emptySkipped if NVS already holds a complete session

Requirements

  • ESP-IDF ≥ 5.x (6.x supported; managed cjson + mqtt deps are declared in the component).
  • A workspace and device flow — see documentation.
  • Partition table with two OTA app slots when auto-OTA is enabled (see example sdkconfig.defaults).

Next pages