WiFi connection times out after ~2 seconds on Nano RP2040 Connect
When connecting to WiFi using config parameters, the connection times out after roughly 2 seconds with the following message:
>OKTraceback (most recent call last):
File "<stdin>", line 36, in <module>
File "asyncio/core.py", line 1, in run
File "asyncio/core.py", line 1, in run_until_complete
File "asyncio/core.py", line 1, in run_until_complete
File "<stdin>", line 21, in main
File "/lib/mqtt_as/__init__.py", line 778, in connect
File "/lib/mqtt_as/__init__.py", line 766, in wifi_connect
OSError: Wi-Fi connect timed out
I'm on Nano RP2040 and MicroPython 1.26.1 and Nina FW 2.0.0.
When I connect to the WiFi manually before connecting the MQTT client, I get:
Traceback (most recent call last):
File "<stdin>", line 49, in <module>
File "asyncio/core.py", line 1, in run
File "asyncio/core.py", line 1, in run_until_complete
File "asyncio/core.py", line 1, in run_until_complete
File "<stdin>", line 21, in main
File "/lib/mqtt_as/__init__.py", line 800, in connect
File "/lib/mqtt_as/__init__.py", line 313, in _connect
File "ssl.py", line 1, in wrap_socket
File "ssl.py", line 1, in wrap_socket
OSError: [Errno 119] EINPROGRESS
Maybe it's got something to do with that: The else statement here seems to be wrongly indented. It looks like that code should be executed after the for loop completes, so the else statement should maybe be removed?
Maybe it's got something to do with that: The else statement here seems to be wrongly indented. It looks like that code should be executed after the for loop completes, so the else statement should maybe be removed?
The code was designed for everyone to enjoy it. You can always change it to your taste😉
See my comment to https://github.com/peterhinch/micropython-mqtt/issues/174.