Imroy / pubsubclient

A client library for the ESP8266 that provides support for MQTT
MIT License
434 stars 115 forks source link

ESP restarting when publishing #30

Open sticilface opened 9 years ago

sticilface commented 9 years ago

I got a situation where the ESP reboots when publishing any message, restarting the mosquito server fixed the problem immediately.

I have lots of the same binaries running (6 ESPs) so it is not the firmware.

Is there a way to enable debugging of the pubsubclient to work out what the server is sending back on a publish that would cause the ESP to reboot, should this happen again? Then we might be able to implement a fix to stop the ESP rebooting under these circumstances?

Cheers

A

marciogranzotto commented 9 years ago

You could use some tool like http://www.jensd.de/apps/mqttfx/ to monitor the broker's activity. Subscribe to all topics that the ESP is subscribing and try to figure out what is wrong

sticilface commented 9 years ago

I'm using MQTTspy which from a quick glance does the same thing. I was thinking that i needed a closer look at exactly what what being exchanged between the device and the broker..

Testato commented 9 years ago

Are you using the last Stable ESP Arduino Core version ? It solve some auto restart bug. Il 05/ago/2015 12:47, "sticilface" notifications@github.com ha scritto:

I'm using MQTTspy which from a quick glance does the same thing. I was thinking that i needed a closer look at exactly what what being exchanged between the device and the broker..

— Reply to this email directly or view it on GitHub https://github.com/Imroy/pubsubclient/issues/30#issuecomment-127953777.

sticilface commented 9 years ago

Pretty much.

I just did a git pull

Updating fd1d9da..5f99bf8

the only files changed were ESPTOOL, and some FS files (SPIFFS), and documents.

Testato commented 9 years ago

Sorry i'm on a cellphone so I can not control easly, but is there two version and two different Board Manager json link. The development one is not stable, it can become broken every day because it is for development test. So you are tried whith the Stable Json link ? Il 05/ago/2015 13:07, "sticilface" notifications@github.com ha scritto:

Pretty much.

I just did a git pull

Updating fd1d9da..5f99bf8

the only files changed were ESPTOOL, and some FS files, and documents.

— Reply to this email directly or view it on GitHub https://github.com/Imroy/pubsubclient/issues/30#issuecomment-127956281.

Imroy commented 9 years ago

I've used WireShark to capture and view the exchange of messages. It doesn't decode the packets by default though. You have to right-click on a packet, select "Decode as..." from the menu, then select MQTT from the list of protocols.

sticilface commented 9 years ago

Sounds like a good idea. I'll see what i can do next time it does it