|
|
2 ani în urmă | |
|---|---|---|
| .. | ||
| proto | 3 ani în urmă | |
| prov | 3 ani în urmă | |
| security | 3 ani în urmă | |
| transport | 2 ani în urmă | |
| utils | 3 ani în urmă | |
| README.md | 2 ani în urmă | |
| __init__.py | 3 ani în urmă | |
| esp_prov.py | 2 ani în urmă | |
esp_prov - A python-based utility for testing the provisioning examples over a host machine.
Usage of esp-prov assumes that the provisioning app has specific protocomm endpoints active. These endpoints are active in the provisioning examples and accept specific protobuf data structure:
| Endpoint Name | URI (HTTP server on ip:port) | Description |
|---|---|---|
| prov-session | http://ip:port/prov-session | Security endpoint used for session establishment |
| 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) |
python esp_prov.py --transport < mode of provisioning : softap \ ble \ console > [ Optional parameters... ]
--help
Print the list of options along with brief descriptions
--verbose, -v
Sets the verbosity level of output log
--transport <mode>
softap - for SoftAP + HTTPD based provisioningesp_prov tool.ble - for BLE based provisioningconsole - for debugging via console-based provisioninghttpd - the script works the same as for softap. This could be used on any other network interface than WiFi soft AP, e.g. Ethernet or USB.--service_name <name> (Optional)
ble, this specifies the BLE device name to which connection is to be established for provisioned. If not provided, BLE scanning is initiated and a list of nearby devices, as seen by the host, is displayed, of which the target device can be chosen.softap or httpd, this specifies the HTTP server hostname / IP which is running the provisioning service, on the SoftAP network (or any other interface for httpd mode) of the device which is to be provisioned. This defaults to 192.168.4.1:80 if not specified--ssid <AP SSID> (Optional)
--passphrase <AP Password> (Optional)
--ssid option--sec_ver <Security version number>
0 for protocomm_security0 - No security1 for protocomm_security1 - X25519 key exchange + Authentication using Proof of Possession (PoP) + AES-CTR encryption2 for protocomm_security2 - Secure Remote Password protocol (SRP6a) + AES-GCM encryption--pop <Proof of possession string> (Optional)
--sec2_username <SRP6a Username> (Optional)
--sec2_pwd <SRP6a Password> (Optional)
--sec2_gen_cred (Optional)
SRP6a credentials (salt and verifier) from the provided username and password for protocomm endpoint security version 2--sec2_salt_len <SRP6a Salt Length> (Optional)
SRP6a salt length to be used for generating protocomm endpoint security version 2 credentials--sec2_gen_cred option is not set--reset (Optional)
--reprov (Optional)
--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 example for implementation details).
Please refer to the README.md file with the wifi_prov_mgr example present under $IDF_PATH/examples/provisioning/.
This example uses specific options of the esp_prov tool and gives an overview of simple as well as advanced usage scenarios.
For Android, a provisioning tool along with source code is available here.
This requires the following python libraries to run:
bleakprotobufcryptographyTo install the dependency packages needed, please run the following command:
bash install.sh --enable-pytest
Note: For troubleshooting errors with BLE transport, please refer this link.