Open philipphock opened 6 months ago
same problem also talked about it here but if i use a adafruit_minimqtt from 21.12.2022 OK, ?because it skips the CP's timing?
There is something about Pico W and the negative 116, see https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/issues/177#issuecomment-1780091578
Not much of a contribution, but I just wanted to mention that I am also facing exactly this problem on a similar environment:
Can you try with 9.0.0? This was caught in the 8->9 path that the Pico did errors differently.
Yes indeed. I have just tried to run it with CircuitPython 9.0.3 and it worked fine without the exception I faced with 8.2.10. Thanks for the hint!
@philipphock are you willing to test in CP9? We should be able to close this out
I believe this should be moved to CP issues.
I used the sample code from "https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/blob/main/examples/native_networking/minimqtt_adafruitio_native_networking.py" and modified it to connect to HiveMQ.
It requires tls, so besides changing wifi and mqtt credentials, I also added the is_ssl = True flag.
I can connect but after the loop is called once, the connection fails with an empty Exception:
Traceback (most recent call last): File "", line 69, in
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 1050, in loop
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 1078, in _wait_for_msg
MMQTTException:
Digging deeper into it, and changing line 1078 to just "raise", gives a bit more insights: Traceback (most recent call last): File "", line 69, in
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 1050, in loop
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 1073, in _wait_for_msg
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 1160, in _sock_exact_recv
OSError: -116
But not much more.
EDIT: I use RPi Pico WS, tested with CircuitPython 8 and 9, also the official release libraries and the most recent minimqtt code from here. Connecting to a local broker without credentials works fine.
The full code of the test script is:
The log output is: