diff --git a/docs/en/api-reference/provisioning/wifi_provisioning.rst b/docs/en/api-reference/provisioning/wifi_provisioning.rst index a6567ae5e5..85999f1261 100644 --- a/docs/en/api-reference/provisioning/wifi_provisioning.rst +++ b/docs/en/api-reference/provisioning/wifi_provisioning.rst @@ -204,6 +204,9 @@ Once connected to the device, the provisioning related protocomm endpoints can b * - prov-scan - http://wifi-prov.local/prov-scan - Endpoint used for starting Wi-Fi scan and receiving scan results + * - prov-ctrl + - http://wifi-prov.local/prov-ctrl + - Endpoint used for controlling Wi-Fi provisioning state * - prov-config - http://.local/prov-config - Endpoint used for configuring Wi-Fi credentials on device @@ -241,6 +244,12 @@ After session establishment, client can also request Wi-Fi scan results from the * `count` (input) - Number of entries to fetch from the starting index * `entries` (output) - List of entries returned. Each entry consists of `ssid`, `channel` and `rssi` information +The client can also control the provisioning state of the device using `wifi_ctrl` endpoint. The `wifi_ctrl` endpoint supports the following protobuf commands: + + * `ctrl_reset` - Resets internal state machine of the device and clears provisioned credentials only in case of provisioning failures. + + * `ctrl_reprov` - Resets internal state machine of the device and clears provisioned credentials only in case the device is to be provisioned again for new credentials after a previous successful provisioning + Additional Endpoints ^^^^^^^^^^^^^^^^^^^^ diff --git a/tools/esp_prov/README.md b/tools/esp_prov/README.md index 78d4a870df..b617f2a7c5 100644 --- a/tools/esp_prov/README.md +++ b/tools/esp_prov/README.md @@ -12,6 +12,7 @@ Usage of `esp-prov` assumes that the provisioning app has specific protocomm end | prov-config | http://ip:port/prov-config | Endpoint used for configuring Wi-Fi credentials on device | | proto-ver | http://ip:port/proto-ver | Version endpoint for checking protocol compatibility | | prov-scan | http://ip:port/prov-scan | Endpoint used for scanning Wi-Fi APs | +| prov-ctrl | http://ip:port/prov-ctrl | Endpoint used for controlling Wi-Fi provisioning state | | custom-data | http://ip:port/custom-data | Optional endpoint for sending custom data (refer `wifi_prov_mgr` example) | @@ -78,6 +79,12 @@ python esp_prov.py --transport < mode of provisioning : softap \ ble \ console > - For specifying the optional `SRP6a` salt length to be used for generating protocomm endpoint security version 2 credentials - Ignored when other security versions are used and the ``--sec2_gen_cred` option is not set +* `--reset` (Optional) + - Resets internal state machine of the device and clears provisioned credentials; to be used only in case of provisioning failures + +* `--reprov` (Optional) + - Resets internal state machine of the device and clears provisioned credentials; to be used only in case the device is to be provisioned again for new credentials after a previous successful provisioning + * `--custom_data ` (Optional) An information string can be sent to the `custom-data` endpoint during provisioning using this argument. (Assumes the provisioning app has an endpoint called `custom-data` - see [provisioning/wifi_prov_mgr](https://github.com/espressif/esp-idf/tree/master/examples/provisioning/wifi_prov_mgr) example for implementation details).