Hi,
I'm having issues maintain the connection to a MQTT server. I'm able to establish the connection, keeping this alive and pub/sub some massages, but after some time (~5 min) the client disconnects. After this happens I'm usually unable to immediately establish connection to the server again and I'm unable to make DNS lookup for about 20 sec.
This makes me suspect the connection to the LTE network.
I'm using SDK 0.4.0 and mfw_nrf9160_0.7.0-29.alpha. I'm connection to Telia Denmark NB-Iot.
Here is a section of my own debugging output, in the square brackets to the left is the time in sec:
[005.220 lte tl2] LTE Link Connecting ...
[018.240 lte tl2] LTE Link Connected!
[018.260 lte tl2] MQTT Link Connecting...
[019.820 lte tl2] IPv4 Address found 0x1f769033
[036.740 lte tl2] OK: mqtt_connect 0
[037.560 lte tl2] [mqtt_evt_handler:235] MQTT client connected!
[037.560 lte tl2] Subscribing to: devices/rsa_test_device_1/messages/devicebound/# len 48
[038.060 lte tl2] [mqtt_evt_handler:282] SUBACK packet id: 1234
...
[414.560 lte tl2] [mqtt_evt_handler:242] MQTT client disconnected -22
[414.570 lte tl2] MQTT Link Connecting...
[414.590 lte tl2] ERROR: getaddrinfo failed 22
[414.590 lte tl2] Broker using 51.144.118.31
[414.610 lte tl3] ERROR: mqtt_connect -114
[414.640 lte tl3] ERROR: mqtt_connect -114
[414.660 lte tl3] ERROR: mqtt_connect -114
[414.690 lte tl3] ERROR: mqtt_connect -114
[414.710 lte tl3] ERROR: mqtt_connect -114
[414.710 lte tl2] FAILED: mqtt_connect -114
[414.730 lte tl2] MQTT Link Connecting...
[414.740 lte tl2] ERROR: getaddrinfo failed 22
[414.750 lte tl2] Broker using 51.144.118.31
[414.770 lte tl3] ERROR: mqtt_connect -114
[414.800 lte tl3] ERROR: mqtt_connect -114
[414.820 lte tl3] ERROR: mqtt_connect -114
[414.850 lte tl3] ERROR: mqtt_connect -114
[414.870 lte tl3] ERROR: mqtt_connect -114
[414.870 lte tl2] FAILED: mqtt_connect -114
...
[433.740 lte tl2] MQTT Link Connecting...
[435.420 lte tl2] IPv4 Address found 0x1f769033
[459.210 lte tl2] OK: mqtt_connect 0
The only thing I'm doing when it fails is keeping the MQTT alive with: mqtt_live(&client) and mqtt_input(&client);
Do you know if there is any reported issues with NB-Iot and 0.7.0-29.alpha? Or do you have another idea of what is failing?