Merge branch 'provisioning/update_readme' into 'master'

provisioning: Remove legacy examples reference

Closes IDF-4614

See merge request espressif/esp-idf!16977
This commit is contained in:
Mahavir Jain
2022-01-28 09:32:08 +00:00
3 changed files with 13 additions and 29 deletions

View File

@@ -24,21 +24,3 @@ The Android and iOS provisioning applications allow the user to configure the de
``` ```
The more details about QR code format, you can refer to [QR Code Scan](https://github.com/espressif/esp-idf-provisioning-android#qr-code-scan). The more details about QR code format, you can refer to [QR Code Scan](https://github.com/espressif/esp-idf-provisioning-android#qr-code-scan).
## Legacy Examples
The legacy examples require own implementation of provisioning functions and handlers. The Wi-Fi provisioning component abstracts out most of this complexity and provides a simpler interface and so, that is recommended for use. However, if you want to use lower level provisioning and protocomm APIs, you can check the these examples under legacy/ folder:
* softap_prov
Provisioning involves Wi-Fi station configuration via an HTTP server running on the device, which is initially configured to be in SoftAP mode. After provisioning, device runs in Wi-Fi station mode only and connects to the AP whose credentials were provided during provisioning.
* ble_prov
Provisioning involves Wi-Fi station configuration via BLE service endpoints running on the device initially. After provisioning, BLE is turned off and device runs in Wi-Fi station mode, connecting to the AP whose credentials were provided during provisioning.
* console_prov
Provisioning involves Wi-Fi station configuration via UART console. This is intended for debugging protocomm and provisioning related features.
* custom_config
Similar to softap_prov examples, but allows for configuration of custom (device-local) information during provisioning. This is intended as an example for implementing custom provisioning schemes.
Refer to the README.md files in each example directory for more information.

View File

@@ -91,11 +91,6 @@ Run `pip install -r $IDF_PATH/tools/esp_prov/requirements_linux_extra.txt`
# EXAMPLE USAGE # EXAMPLE USAGE
Please refer to the README.md files with the examples present under `$IDF_PATH/examples/provisioning/`, namely: Please refer to the README.md file with the `wifi_prov_mgr` example present under `$IDF_PATH/examples/provisioning/`.
* `ble_prov` This example uses specific options of the `esp_prov` tool and gives an overview of simple as well as advanced usage scenarios.
* `softap_prov`
* `custom_config`
* `console_prov`
Each of these examples use specific options of the `esp_prov` tool and give an overview to simple as well as advanced usage scenarios.

View File

@@ -2,13 +2,20 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
import importlib.util
import os import os
from types import ModuleType import sys
from importlib.abc import Loader
from typing import Any
def _load_source(name, path): # type: (str, str) -> ModuleType def _load_source(name, path): # type: (str, str) -> Any
from importlib.machinery import SourceFileLoader spec = importlib.util.spec_from_file_location(name, path)
return SourceFileLoader(name, path).load_module(name) module = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = module
assert isinstance(spec.loader, Loader)
spec.loader.exec_module(module)
return module
idf_path = os.environ['IDF_PATH'] idf_path = os.environ['IDF_PATH']