Chat freely about anything...

User avatar
By Hassan Ali
#61100 Hi everybody...
I've been working for a while on some ESP-01 modules using the arduino PubSubClient library. I use mosquitto set up on my laptop as a broker. Every thing was working just fine: I was able to subscribe and publish on topics using the aforementioned broker and firmware. However, suddenly the ESP stopped working properly. It can't connect to the broker any more with a "failed, rc=-2 try again in 5 seconds" message appearing all the time. I checked the broker to see if it's working and it has nothing wrong with it: I created other mqtt clients o node red and published some data and I can see it appearing on MQTTLens, so I think the broker has nothing wrong with it.
I tried to check the IP address of my computer with ipconfig in the command window and made sure that it is the same address in the code (note: the code used to work perfectly as it is one day ago).
I tried to restart the broker by stopping and restarting it from the windows services and the same problem persists.

Any ideas? thanks in advance.