-
Notifications
You must be signed in to change notification settings - Fork 49
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
[BUG] <mqtt reconnects the question> #116
Comments
If a PINGRESP is not received within the specified timeout, the connection is assumed to be dead and a re-connection attempt is made. Is that not the case? |
Yes, but sometimes the module won't trigger reconnection. Now my practice is to disconnect the WIFI and reconnect the MQTT after the module does not reconnect the MQTT within the specified time, so as to trigger the MQTT connection |
This should not happen. How do you determine that the connection is dead and needs re-connecting? |
Now I am testing, if this happens in the future I will post log screenshots, please do not close this discussion yet |
This log is present in your logs - https://github.com/FreeRTOS/iot-reference-esp32/blob/main/main/networking/mqtt/core_mqtt_agent_manager.c#L890. After that |
I'll give it a try. |
Hi, I have a question. In normal use, the network instability of WIFI causes the retention timeout, and occasionally triggers mqtt reconnection. How to solve this situation? For example, when I am in China, the customer requires to connect to AWS in South Korea, but the network environment in China is poor, sometimes the external network will be banned, which will result in no problem in the network of the module, but the module may not receive the response from the server after sending mqtt ping. After that, the module has a probability of not reconnecting. Only when the module's WIFI connection is disconnected, the reconnection will continue to connect to the MQTT.
The text was updated successfully, but these errors were encountered: