Closed askpatrickw closed 2 years ago
Is this function the only place in the code where these lines are executed?
pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ssl.create_default_context())
Do you have a device with a debug port where a DEBUG=1 build may show more information about the hang?
No.
I have a networkinit.py
I reuse that does the wifi and time which has these lines. I import networkinit
and it runs.
But it is the first instance of them which is called after the device wakes from sleep.
It always hangs here waiting for the time and never later in my code.py
where I am calling an API for some data.
Debug Build and a Kaluga to capture output. I could set that up.
I'm going to make sure I can reproduce this without the Text display stuff I was doing on the MagTag. I'm sure its not related but just to be sure. If so, I'll try it on the Kaluga with the debug output.
Might take a day or so...
This is a dupe of #62
I'm running a magtag in a 5 minute deep sleep loop.
On wake it connects to the WIFI and sets the system time by getting time from the Adafruit IO API.
This works for a while (~an hour) and then it hangs. Less often I have seen #62.
Environment: Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit MagTag with ESP32S2 Board ID:adafruit_magtag_2.9_grayscale
This is the function I call to set the time.
Opening this for tracking I'll keep looking into it.