Open jozala opened 5 years ago
After another round of testing with raw TCP connection I think I was able to reproduce the same issue without PubSubClient. I've created issue for Ethernet library: https://github.com/arduino-libraries/Ethernet/issues/106 .
Hello guys, i'm trying to connect to AWS wich request:
wifiClient.loadCACert(ca); wifiClient.loadCertificate(client_cert); wifiClient.loadPrivateKey(client_key);
Via wifi i can do it with no problems. But the ethernet library present on arduino do not have these 3 classes above.
Someone know how to connect to AWS via ethernet shield using ESP32?
Hey,
Ran into this issue and it was because I was calling mqttClient.publish
with an empty string as the topic.
While using ESP32 with W5500 (ethernet), 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 highMsg Len
. It causes messages afterwards to be treated as continuation of this message. That includesPing Request
message. After "keep alive" timeout (in my case 15sec x2) PubSubClient decides to disconnect as it has not receivedPing Response
message.Please find Wireshark file with section of captured packages attached (packet number 136 is the problematic one). 04-07-2019_long_tcp_packet.zip
Hardware used:
Additional information
Mosquitto MQTT broker is set up in local network. I've tried to test Ethernet client itself, by sending messages to TCP server for 24 hours and I haven't spotted any problems. That's why I believe problem might be in PubSubClient, but I wasn't able to find where. In case this is important - code I am using is on GitHub: https://github.com/maniekq/ESP32_W5500_MQTT