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

Disconnected from MQTT. Reason: TCP_DISCONNECTED #305

Open
lbarcella opened this issue Jun 7, 2024 · 2 comments
Open

Disconnected from MQTT. Reason: TCP_DISCONNECTED #305

lbarcella opened this issue Jun 7, 2024 · 2 comments

Comments

@lbarcella
Copy link

lbarcella commented Jun 7, 2024

Hi,
i use PlatformIO with:
platform = espressif32
board = esp32dev

My MQTT server is Mosquitto based
With framework-arduinoespressif32 @ 2.17 all work fine.

The arduino framework is now updated to framework-arduinoespressif32 @ 3.0.0
I have update the wifi events.
In a first time all works fine, but next few minutes the connections to MQTT become very instable

If i use Mosquitto 1.6 on Windows i receive a lot of events TCP_DISCONNECTED and next TCP_CONNECTED
** If i use Mosquitto 2.0 on Linux (Debian) some time i receive the same events **

You can test this issue with your example named FullyFeatured-ESP32.ino and a mosquitto server listen on port 1883

To create this issue you need run the same example on two esp32 and you can see that connection fail more time !
Write into loop function to call mosquito subscribe every 500ms

Any idea?
Thank you
L.

@jeremyvnc
Copy link

jeremyvnc commented Jul 2, 2024

I am running into the same issue. Have you found any workarounds?
I downgraded to Mosquitto 1.6.13 and now it connects fine.

@lbarcella
Copy link
Author

Hi,
yes, by my side i have add the clientid on the client call and all work fine.

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