eclipse-paho / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
https://eclipse.org/paho
Other
1.37k stars 757 forks source link

MQTT auto disconnected after KeepAlive time #219

Closed HoangPhuongPKH closed 12 months ago

HoangPhuongPKH commented 3 years ago

Hi all, Sorry about my English, I'm working with MQTT and STM32, FreeRTOS and lwIP I followed this a example https://github.com/eziya/STM32F4_HAL_ETH_MQTT_CLIENT No problem if publish to STM32 topic subscribed every second. But, if I connect to broker (mosquitto), then do nothing, after 60s keepalive, STM32 send PINGREQ and moquitto send back, but I debug that STM32 did not recevied PINGREQ and then disconnected. In this example, if STM32 reconnect if disconnected, but at 4 times, it can't connected. Anyone can help me, thanks!

scaprile commented 3 years ago

You must be able to determine where the broker response gets lost, "STM32" is not the name of a module, analyze your application and determine where you have the problem. Then If you have a problem with an STM32 application, place an issue in that application repo, or go to an ST forum and ask there If you have a problem with lwIP, go to the lwIP forum and ask there If you have a problem specific to Paho, then ask here, please properly describe what you send, what you get, what you expect to get, and why.

Ivan-Bolshakov commented 3 years ago

Hello, I have the same problem right now. if you have solved the problem, I will be very grateful for the answer

scaprile commented 3 years ago

Hello, I have the same problem right now. if you have solved the problem, I will be very grateful for the answer

Same answer: https://github.com/eclipse/paho.mqtt.embedded-c/issues/219#issuecomment-796828932

icraggs commented 12 months ago

I think we are adressing the issue (see the referenced commit above).