Provisioning Mode
Provisioning mode is for shipping units to a site where you don't know the WiFi credentials until install day. You flash a small bootstrap firmware (gateway-provisioning) on the bench, ship the unit, and the end-customer walks through a captive-portal flow on their phone.
What gets flashed
The web flasher writes three things to the chip in this mode:
gateway-provisioningfirmware into thefactorypartition. It stays there forever — never gets overwritten by OTAs.- Per-device mTLS cert into NVS namespace
scadable_certs. Minted by SCADABLE at flash time, valid 7 days. - Empty
ota_0slot. Your customer firmware lands here on first OTA after WiFi joins.
The chip boots into gateway-provisioning automatically because no ota_0/ota_1 slot is valid yet.
What the dashboard operator does
- Open the dashboard, click Add Device.
- Pick Provisioning mode in the wizard.
- Connect the ESP32 over USB and click Flash. The web flasher (WebSerial) does the rest. Total flash time: 30 to 60 seconds depending on chip.
- Unplug, ship the unit. The dashboard shows the device in Awaiting Setup state.
That's the operator's part. Everything below happens in the field.
What the end-customer does
The unit arrives, the customer plugs it into power. Within 5 to 10 seconds:
- The chip boots
gateway-provisioning, sees no WiFi creds in NVS, and starts a SoftAP namedSCADABLE-Setup-XXXXXX(whereXXXXXXis the last 6 hex of the chip's MAC). - Customer joins that AP from their phone.
- The phone's captive portal detector kicks in — a setup page pops up automatically with no URL to type.
- Customer picks their WiFi from a scanned list, enters the password, taps Connect.
- Chip stores the creds in NVS, drops the AP, joins the customer's WiFi.
- Chip connects to the SCADABLE broker over mTLS using the cert minted at flash time.
- Chip pulls the latest customer firmware release for its namespace via OTA.
- After the OTA validates, chip reboots into the customer firmware. Provisioner stays in the
factorypartition for future re-provisioning.
Total time from "plug in power" to "device online with customer firmware running": about 2 minutes (mostly the OTA download).
The full step-by-step from the customer's perspective is on Captive portal experience.
Re-provisioning
If WiFi changes (customer moves the device, network password rotates), the customer holds the BOOT button for 5 seconds. The provisioner clears WiFi creds from NVS and starts the SoftAP again. The mTLS cert stays valid (until it expires — see Device cert lifecycle).
When to use this mode
- Shipping product to a site you don't control.
- OEM product where the end-customer is non-technical.
- Field installs where install day is the first time WiFi creds are known.
For dev/bench, use Direct mode instead — re-walking the captive portal 50 times a day is no fun.
Limitations today
- WPA2 personal only. WPA-Enterprise is on the roadmap.
- 2.4 GHz only on ESP32; ESP32-S3 supports 5 GHz with the right module variant.
- The mTLS cert is valid for 7 days. If the unit sits unplugged for more than 7 days, you'll need to re-flash to mint a fresh cert. On-device EST renewal is Phase 2.
Updated 4 days ago
