فهرست منبع

docs: added documentation for wifi_ctrl endpoint and updated esp_prov readme

harshal.patil 3 سال پیش
والد
کامیت
e7a4062a30
2فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  1. 9 0
      docs/en/api-reference/provisioning/wifi_provisioning.rst
  2. 7 0
      tools/esp_prov/README.md

+ 9 - 0
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://<mdns-hostname>.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
 ^^^^^^^^^^^^^^^^^^^^
 

+ 7 - 0
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 <some string>` (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).