Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP restarts on MQTT.connect #1072

Open
nygma2004 opened this issue Jan 25, 2025 · 3 comments
Open

ESP restarts on MQTT.connect #1072

nygma2004 opened this issue Jan 25, 2025 · 3 comments

Comments

@nygma2004
Copy link

I am puzzled by this issue, I picked up some projects that I used a few years ago, and when I re-compile them and upload to the ESP the watchdog timer re-starts the ESP during MQTT.connect.
I am using the ArduinoIDE 2.3.4, PubSubClient 2.8 installed and I updated the rest of my libs, boards.
I found some article suggesting to change the MQTT_SOCKET_TIMEOUT from 15 to 1, but that just results in rc=-4.
I have an older laptop, with older ArdunioIDE, older board, but same PubSubClient 2.8 and after re-compiling the project it works. Connects to MQTT without any issues.
And this keeps coming up in the log file:

1737838075: New connection from 192.168.1.129:59095 on port 1883.
1737838078: Client <unknown> has exceeded timeout, disconnecting.

I am completely clueless.
And this happens from the first connection attempts after boot. I checked the client id is unique (I add the end of the mac address to it).

@partofthething
Copy link

Having the same issue. It WDT resets on connect every time.

@nygma2004
Copy link
Author

I started commenting parts of my code out. Once of the less necessary function was using Neopixel LEDs. I was using FastLED. Once that is all commented out MQTT was working again. I have a discussion on this here: FastLED/FastLED#1884
I will dig a bit deeper. I will also test rolling my ESP board support to earlier versions like 2.7.4. but for that I probably need to roll some of the other libraries back as well.

@nygma2004
Copy link
Author

Did a bit more testing, and after downgrading FastLED to 3.3.3 (that was the version I used when I originally coded my sketch) MQTT still works. Everything else looks to be on the latest version, only FastLED needed to be downgraded.
I am leaving this here in case somebody needs a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants