This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
machine.sleep([time_ms], resume_wifi_ble) works just once with resume_wifi_ble=True #259
Closed
Description
Please include the following information when submitting a bug report:
-
Pycom board: WiPy 3.0
-
firmware version: V1.20.0.RC6
-
Exact steps to cause this issue
- I place the machine.sleep(10000, True) within my while loop.
For the first run, the function worked as expected, the wipy slept for 10 seconds, it woke up, automatically reconnected to the Wifi, do some stuff with UDP sockets, and went back to the beginning of the loop with a new machine.sleep(10000, True) - Unfortunately for the 2nd run, it raised an Errno 118 EHOSTUNREACH.
I found that this error come from an incorrect net connection. - I solved it just placing a ConnectToWlan() routine just after waking up [ConnectToWlan() is my routine to perform wlan.init+ wlan,ifconfig+ wlan.connect... which was just intended for the start up, NOT for waking up from a lightsleep). But this is just to solve the issue through a dirty trick.
- I place the machine.sleep(10000, True) within my while loop.
-
What you expected
- Since the value for resume_wifi_ble was True always, it was expected to enables restoring after wakeup any WiFi or BLE connection that was interrupted by light sleep
-
What happened instead
- The True value just enable restoring of the wifi JUST ONCE, this means, for the first run of the while loop. For the second and succesive runs it does not reconnect
Thank you!
Metadata
Metadata
Assignees
Labels
No labels