Embeddronics

Back to blog

IoT & App Development

ESP32 Wi-Fi Provisioning Flutter App

Technical reference from the Embeddronics engineering team.

Connecting a headless IoT device (such as an ESP32 microcontroller) to a local Wi-Fi access point remains a challenging UX problem. A common solution is Wi-Fi Provisioning: using a companion mobile application (written in Flutter) to securely transmit Wi-Fi SSID and Password credentials to the ESP32.

Provisioning Handshake Workflow

The provisioning protocol can be executed either over BLE or via a temporary Wi-Fi SoftAP hosted by the ESP32. The process follows a clear state machine:

  1. Discovery: The Flutter mobile app scans for the ESP32 (advertising as a BLE peripheral or SoftAP).
  2. Handshake: App establishes a secure session (optionally exchanging DH key pairs for session encryption).
  3. Transmission: App sends credentials formatted in a compact JSON payload.
  4. Verification: ESP32 attempts connection to the local AP, and reports back status to the app.

SSID & Password Payload Exchange

{
  "cmd": "prov_connect",
  "ssid": "Home_WiFi_2.4G",
  "pass": "SecureWiFiPassword123",
  "device_name": "Embeddronics-Node-08"
}

Once connection is confirmed, the ESP32 saves the credentials in Non-Volatile Storage (NVS) flash, disables its SoftAP or BLE advertising, and starts normal MQTT telemetry transmission.

Open-Source Repository

Access the complete Flutter code and ESP32 provisioning firmware on GitHub: esp32wifiapp.

Need help with ESP32 Wi-Fi provisioning and Flutter IoT apps? Contact our engineering team.

Bring this engineering problem to your product roadmap.

Embeddronics

Production-minded embedded systems engineering for teams building reliable hardware, firmware, connected devices, and manufacturable electronics.

© 2026 Embeddronics Ltd. All rights reserved.

Contact

Islamabad, Pakistan
[email protected]

Start a Scope Review