wifi_prov_mgr: Add config options to switch transport and support for custom data

Config options have been set such that BLE transport will be the default for ESP32
and SoftAP will be the default for ESP-S2.

CMakeLists.txt for all provisioning examples applicable for ESP32-S2 have also been updated
as these now work fine on ESP32-S2

Signed-off-by: Piyush Shah <piyush@espressif.com>
This commit is contained in:
Piyush Shah
2020-01-03 21:06:10 +05:30
committed by bot
parent 156ae68275
commit 9ee5f3e8ce
9 changed files with 107 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ esp_prov.config_throw_except = True
@ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_examples_wifi_prov_mgr(env, extra_data):
# Acquire DUT
dut1 = env.get_dut("wifi_prov_mgr", "examples/provisioning/manager", dut_class=ttfw_idf.ESP32DUT)
dut1 = env.get_dut("wifi_prov_mgr", "examples/provisioning/wifi_prov_mgr", dut_class=ttfw_idf.ESP32DUT)
# Get binary file
binary_file = os.path.join(dut1.app.binary_path, "wifi_prov_mgr.bin")
@@ -78,6 +78,10 @@ def test_examples_wifi_prov_mgr(env, extra_data):
if not esp_prov.establish_session(transport, security):
raise RuntimeError("Failed to start session")
print("Sending Custom Data")
if not esp_prov.custom_data(transport, security, "My Custom Data"):
raise RuntimeError("Failed to send custom data")
print("Sending Wifi credential to DUT")
if not esp_prov.send_wifi_config(transport, security, ap_ssid, ap_password):
raise RuntimeError("Failed to send Wi-Fi config")