forked from espressif/esp-idf
Wifi_provisioning_mgr_test: Allow three attempts to connect to AP before concluding provisioning failure (v4.0)
This commit is contained in:
@ -87,6 +87,7 @@ def test_examples_wifi_prov_mgr(env, extra_data):
|
|||||||
raise RuntimeError("Failed to send apply config")
|
raise RuntimeError("Failed to send apply config")
|
||||||
|
|
||||||
success = False
|
success = False
|
||||||
|
retry = 0
|
||||||
while True:
|
while True:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
print("Wi-Fi connection state")
|
print("Wi-Fi connection state")
|
||||||
@ -96,6 +97,10 @@ def test_examples_wifi_prov_mgr(env, extra_data):
|
|||||||
elif (ret == 0):
|
elif (ret == 0):
|
||||||
print("Provisioning was successful")
|
print("Provisioning was successful")
|
||||||
success = True
|
success = True
|
||||||
|
elif (ret == 3 and retry < 3):
|
||||||
|
retry = retry + 1
|
||||||
|
print("Connection failed.. retry again...: ", ret)
|
||||||
|
continue
|
||||||
break
|
break
|
||||||
|
|
||||||
if not success:
|
if not success:
|
||||||
|
Reference in New Issue
Block a user