mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'esp_prov/update_deprecated_api_v5.0' into 'release/v5.0'
esp_prov: Update deprecated APIs (v5.0) See merge request espressif/esp-idf!20793
This commit is contained in:
@ -1,17 +1,10 @@
|
|||||||
****# ESP Provisioning Tool
|
# ESP Provisioning Tool
|
||||||
|
|
||||||
# NAME
|
## Description
|
||||||
`esp_prov` - A python based utility for testing the provisioning examples over a host
|
|
||||||
|
|
||||||
# SYNOPSIS
|
`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:
|
||||||
python esp_prov.py --transport < mode of provisioning : softap \ ble \ console > [ Optional parameters... ]
|
|
||||||
```
|
|
||||||
|
|
||||||
# DESCRIPTION
|
|
||||||
|
|
||||||
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 structures:
|
|
||||||
|
|
||||||
| Endpoint Name | URI (HTTP server on ip:port) | Description |
|
| Endpoint Name | URI (HTTP server on ip:port) | Description |
|
||||||
|---------------|------------------------------|------------------------------------------------------------------------------------------|
|
|---------------|------------------------------|------------------------------------------------------------------------------------------|
|
||||||
@ -22,7 +15,12 @@ Usage of `esp-prov` assumes that the provisioning app has specific protocomm end
|
|||||||
| custom-data | http://ip:port/custom-data | Optional endpoint for sending custom data (refer `wifi_prov_mgr` example) |
|
| custom-data | http://ip:port/custom-data | Optional endpoint for sending custom data (refer `wifi_prov_mgr` example) |
|
||||||
|
|
||||||
|
|
||||||
# PARAMETERS
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
python esp_prov.py --transport < mode of provisioning : softap \ ble \ console > [ Optional parameters... ]
|
||||||
|
```
|
||||||
|
### Parameters
|
||||||
|
|
||||||
* `--help`
|
* `--help`
|
||||||
Print the list of options along with brief descriptions
|
Print the list of options along with brief descriptions
|
||||||
@ -84,9 +82,16 @@ Usage of `esp-prov` assumes that the provisioning app has specific protocomm end
|
|||||||
An information string can be sent to the `custom-data` endpoint during provisioning using this argument.
|
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).
|
(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).
|
||||||
|
|
||||||
# AVAILABILITY
|
|
||||||
|
|
||||||
For Android, a provisioning tool along with source code is available [here](https://github.com/espressif/esp-idf-provisioning-android)
|
### Example Usage
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## Availability
|
||||||
|
|
||||||
|
For Android, a provisioning tool along with source code is available [here](https://github.com/espressif/esp-idf-provisioning-android).
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@ -102,8 +107,4 @@ To install the dependency packages needed, please run the following command:
|
|||||||
bash install.sh --enable-ttfw
|
bash install.sh --enable-ttfw
|
||||||
```
|
```
|
||||||
|
|
||||||
# EXAMPLE USAGE
|
**Note:** For troubleshooting errors with BLE transport, please refer this [link](https://bleak.readthedocs.io/en/latest/troubleshooting.html).
|
||||||
|
|
||||||
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.
|
|
||||||
|
@ -46,7 +46,7 @@ class BLE_Bleak_Client:
|
|||||||
|
|
||||||
print('Discovering...')
|
print('Discovering...')
|
||||||
try:
|
try:
|
||||||
devices = await bleak.discover()
|
devices = await bleak.BleakScanner.discover()
|
||||||
except bleak.exc.BleakDBusError as e:
|
except bleak.exc.BleakDBusError as e:
|
||||||
if str(e) == '[org.bluez.Error.NotReady] Resource Not Ready':
|
if str(e) == '[org.bluez.Error.NotReady] Resource Not Ready':
|
||||||
raise RuntimeError('Bluetooth is not ready. Maybe try `bluetoothctl power on`?')
|
raise RuntimeError('Bluetooth is not ready. Maybe try `bluetoothctl power on`?')
|
||||||
@ -79,7 +79,7 @@ class BLE_Bleak_Client:
|
|||||||
if select != 0:
|
if select != 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
devices = await bleak.discover()
|
devices = await bleak.BleakScanner.discover()
|
||||||
|
|
||||||
self.devname = devices[select - 1].name
|
self.devname = devices[select - 1].name
|
||||||
found_device = devices[select - 1]
|
found_device = devices[select - 1]
|
||||||
|
Reference in New Issue
Block a user