pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
197 stars 167 forks source link

Pybytes LTE connection no timeout #493

Open zzfjean opened 3 years ago

zzfjean commented 3 years ago

Running G01, 1.20.2.r1, Pybytes 1.6.0

Issue when LTE connection is not possible (due to poor reception, broken antenna etc). Code hangs on Pybytes connection attempt due to no connection timeout defined. Looking at _pybytes_connection line 212 the lte.attach loop is infinite and no timeout is applied.

Expected behaviour:

Devices will often go in and out of range, so a connection will not always be possible. This should not stop main code execution (still reading sensor data and storing locally) but should just set isconnected to False and move on.