espressif / esp-mqtt

ESP32 mqtt component
Apache License 2.0
603 stars 255 forks source link

MQTT disconnects every 1 second? (IDFGH-2522) #141

Closed vivekalways closed 4 years ago

vivekalways commented 4 years ago

Hi i m using ethernet to connect mqtt publish.

i m getting mqtt client is disconnected every 1 second.

Error m getting is E (35302) MQTT_CLIENT: Client has not connected mqtt_writeE (35372) MQTT_CLIENT: Error transport connect I (35372) MQTT_CLIENT: Reconnect after 10000 ms I (35372) TW_MQTT: MQTT_EVENT_DISCONNECTED

I tired to connect through wifi, but i didnt get any disconnect scenario.

Please help me.

ESP-Marius commented 4 years ago

Hi, thanks for reporting this issue!

Could you please post the full log and explain a bit more in detail what you are doing? (which version are you running, how are you connecting?)

The error you posted here shows you trying to subscribe to a topic when the client is not connected and after that you have a connect that fails. You say you are disconnected ever 1 second, can you show the error where this happens? Are you able to successfully connect to the broker in the first place (i.e. you get the MQTT_EVENT_CONNECTED event?)

david-cermak commented 4 years ago

@vivekalways Any updates?

vivekalways commented 4 years ago

@david-cermak solved the issues.The problem is the esp pin configuration.

david-cermak commented 4 years ago

@vivekalways Thanks for the update! Closing the issue.