- Sat Jun 20, 2015 11:57 am
#21032
Update!
Hi guys I am still trying on this and have not given up.
I have stripped the original code back and removed all MQTT elements. The network re connect code is now super stable. Checks network every 20 seconds by the use of a ticker and re establish's connection, with this alone their are no WDT resets and always a guaranteed network connection.
Question: Are there any alternative MQTT library's that work with Arduino IDE and ESP?
How did I come to this conclusion?
I modified the initial sketch to incorporate a push button connected to GPIO 0 that would once pressed connect and subscribe to MQTT broker services.
While monitoring the serial debug window if I did not connect to MQTT server and pull out network re connect all worked fine the system would always re establish network and tick as normal.
If once the network was up and connected and I pushed the button, MQTT would establish a connection and work, receiving message and sending to the broker. In this condition if I power down my wireless router the next time the ticker fires and goes through the normal network checks a WDT reset is encountered.
Summary: It is clear that using the LMleroy MQTT library and re checking network causes a failure.
Getting closer, any alternative MQTT?