Open heximcz opened 1 year ago
The negative errno value was reported on https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/issues/101#issuecomment-1281650450 and supposedly fixed in CP 8.0.0 beta specifically for Pico W (https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/issues/101#issuecomment-1281728775).
Hello Vladak, I don't have a problem with CP. A newer version of Adafruit_CircuitPython_MiniMQTT than 7.3.2 does not work for me. Now I try the latest version of CP and Adafruit_CircuitPython_MiniMQTT and the problem is still the same. I had to revert to Adafruit_CircuitPython_MiniMQTT 7.3.2.
in loop() the call to receive generates an exception from if nothing is received but its ok for nothing to be received if nothing was sent.
loop() ->_wait_for_msg() ->_sock_exact_recv(1
I'm going to patch by adding a parameter to _wait_for_msg() to return silently if there's no data received and only set this in the loop call
After updating MiniMQTT from version 7.3.2 to 7.4.1, I have a problem with the loop() function, which, upon closer investigation, throws an MMQTTException (this issue occurs every second call). The exact link where the error occurs is here: L1035. For my purposes, I am modified the line to return an error.
Here is a snippet from the testing code:
Here is the output from Thonny's debugging console:
In version 7.3.2, the loop() function worked without any issues. From what I have investigated, it appears that the error is not affected by whether I am using the original CircuitPython 8.0.5 or the latest version 8.2.6.
Links to my complete example code and the MiniMQTT wrapper.
Hardware: Raspberry Pico W
Broker: Mosquitto 2.0.18
Can I modify my code as I'm writing below, but it doesn't seem very elegant to me, especially since it worked in the previous version.
Thank you and have a great day!