-
Notifications
You must be signed in to change notification settings - Fork 3
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
MQTT connection fails occasionally when using Ethernet connection #9
Comments
@mathieu56000 Anyway - it is really great you've wrote about it. I was trying with multiple modules with the same results. Maybe I am doing some silly mistake :/ . Now I know it is working for you - it gives me very valuable information. Could you please give me a couple of pointers? |
Hi @maniekq , It is OK to power them directly with the ESP32 but I think this is the limit in term of power because when I am connecting something else to the ESP32, the W5500 is not working good at all anymore... So it is technically possible but I will not be very confident about that. I am using a AMS1117 (3.3 or 5) regulator module for that, it convert 12V to 3.3V or 5.5V. Also, I am doing that job for a company and I will soon have to test the stability of the connexion (for more than 6h30) so I will be glad to share my results with you! |
Hi @mathieu56000, |
Hi @maniekq , |
PubSubClient gets disconnected from MQTT broker from time to time (time periods differs significantly - from few minutes to couple of hours).
Looks like PubSubClient is sending malformed TCP/MQTT packet which looks like Disconnect Req, but with very high Msg Len. It causes messages afterwards to be treated as continuation of this message. That includes Ping Request message. After "keep alive" timeout (in my case 15sec x2) PubSubClient decides to disconnect as it has not received Ping Response message.
I couldn't find the problem in RoomHub code. It looks like the problem in W5500 hardware or Arduino Ethernet library.
This is important to fix this as it makes using RoomHub with Ethernet connection unstable.
It doesn't influence version with WiFi connection which seems to be stable.
There are tickets created for this issue in PubSubClient and Ethernet library projects:
arduino-libraries/Ethernet#106
knolleary/pubsubclient#639
Ideas to check:
The text was updated successfully, but these errors were encountered: