MQTT connection dropped with LTE-M – Nordic Q&A – Nordic DevZone

Hi all,

I‘m experiencing issues with MQTT client connection on an nRF9160 board via LTE-M.

Some context: I‘m trying to connect to a MQTT broker via LTE-M (actually public test brokers like HIVEMQ or mosquitto) with a hour keepalive timeout. For LTE-M connectivity, eDRX is enabled (eDRX checks every 60seconds). Like in the examples, a thread is polling the socket for POLLIN, POLLERR, POLLNVAL and POLLHUP events.

At app startup, everything is fine, i‘m able to send and receive MQTT messages. But after some time of inactivity (device in idle, modem in idle for let’s say, 10minutes), I can send messages from the device (QoS0) without errors, but messages never reach broker. Furthermore, none of the incoming messages are received by the device.

It seems like the connection is dropped at some point but polling isn‘t able to notice it.

Am I missing something ? Do I need to set a specific configuration on the socket ?


Read more here: Source link