pubsubclient icon indicating copy to clipboard operation
pubsubclient copied to clipboard

ESP restarting when publishing

Open sticilface opened this issue 9 years ago • 7 comments

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

sticilface avatar Aug 04 '15 17:08 sticilface

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

marciogranzotto avatar Aug 04 '15 17:08 marciogranzotto

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..

sticilface avatar Aug 05 '15 10:08 sticilface

Are you using the last Stable ESP Arduino Core version ? It solve some auto restart bug. Il 05/ago/2015 12:47, "sticilface" [email protected] 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.

Testato avatar Aug 05 '15 11:08 Testato

Pretty much.

I just did a git pull

Updating fd1d9da..5f99bf8

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

sticilface avatar Aug 05 '15 11:08 sticilface

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" [email protected] 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.

Testato avatar Aug 05 '15 12:08 Testato

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.

Imroy avatar Aug 05 '15 21:08 Imroy

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

sticilface avatar Aug 05 '15 21:08 sticilface