nrf9160 mqtt sample disconnect state update

Hi:

I use mqtt_ Sample routine: MQTT is connected to the server, and I shut down the server. At this time, the 9160 status has not been updated, but is still connected. Sometimes it takes several hours to refresh the status.

Kconfig file

config MQTT_KEEPALIVE
	int "Set keepalive"
	default 60

Sometimes it takes several hours to wait for this state:

[15:56:23.863]收←◆<inf> mqtt_simple: MQTT client disconnected: -113[0m
[00:38:02.900,573] [1;31m<err> mqtt_simple: ERROR: mqtt_live: -113[0m
[00:38:02.900,604] [0m<inf> mqtt_simple: Disconnecting MQTT client...[0m
[00:38:02.900,726] [1;31m<err> mqtt_simple: Could not disconnect MQTT client: -128[0m
[00:38:02.900,756] [0m<inf> mqtt_simple: Reconnecting in 60 seconds...[0m

Parents Reply
  • It looks like the trace was stopped too soon. The trace shows that the device is connected to the broker, then subscribing to a topic, then nothing more. The device goes into RRC Idle as expected but it did not run long enough for us to see the expected MQTT PING.

    We would need a raw trace in order to see what goes on in the modem. Would you be able to take a new raw trace? And could you please make a note or somehow indicate when the server is turned off?

Children
Related