Page 1 of 1

MQTT keep alive dies when not publishing

Posted: Tue Mar 12, 2019 5:40 am
by fmuller-pi
Hi,

I am facing an issue with my MQTT connection where my Google Cloud tells me that there is no more connection with my device because there was no keep alive when I don't publish anything for a while...
Also, after I subscribed successfully to my config, the config is only sent down to my device if I actually publish something to the Cloud first...
To me, this isn't how it should work, since you could totally just subscribe to a config without publishing, and the keep alive should be done as long as you established a prior connection to the Cloud and that internet connection is OK...
I am using the most up to date ESP RTOS SDK example.
Does anyone have an idea about what should be done here?

Thanks,

Re: MQTT keep alive dies when not publishing

Posted: Sat Jul 27, 2019 12:55 am
by fmuller-pi
This issue was actually linked to the problem described here:
https://bbs.espressif.com/viewtopic.php?f=7&t=27609

The all MQTTRun task was just broken, not ack the PINGRESP coming from the Cloud properly and therefore leading to the Cloud closing the connection for lack of keep-alive pinging...

Cheers