Closed mat-l closed 3 years ago
Check if the server port 1883 is active, and if there is encryption on this port or not.
Everything was active. Guess connecting and disconnecting everytime made some trouble after a while. I have switched to robust2 and I am now only connecting once in my mqtt communication class. Therefore the error is gone.
It could be because the old sockets are not garbage-collected?
Describe the bug
File "/umqtt/simple2.py", line 53, in connectOSError: -202
To Reproduce I am using your example code from here (https://github.com/fizista/micropython-umqtt.simple2/blob/master/example_sub.py) to publish every 60 seconds a value to my MQTT broker.
After a while I am getting the connection error above and no mqtt message is published anymore. Even though the function "mqtt_pub" is called every time. Any ideas how I can avoid this error?
Details (please complete the following information):