This code serves is an output from the YouTube video ESP32 Provisioning - Provisioning Strategies. 👉 Subscribe to the OhioIoT YouTube Channel for more on All Things IoT: hardware, firmware, connectivity, cloud computing, and dev toolkit.
git clone https://github.com/OhioIoT-ESP32-Provisioning-Examples/Provisioning-Strategies.git
- compile and run
- copy /src/main.cpp into a new sketch prov-strat/prov-strat.ino (or whatever name you choose)
- copy all of the files inside of lib/config, lib/provisioner, and lib/storage folders into your prov-strat/ folder
- compile and run
OhioIoT is an IoT platform designed for small-scale IoT projects (https://www.ohioiot.com).
10/18/25 - WiFi.begin() will put the WiFi in WIFI_STA mode automatically if it comes from WIFI_OFF. However, if the device is coming from WIFI_AP mode, WiFi.begin() will apparently put it in WIFI_AP_STA mode, and leave the DEVICE_PROVISIONING SSID active. So, best to explicitly call WiFi.mode(WIFI_STA) before WiFi.begin() in src/main.cpp.