nrf9160: repeative send on mqtt results in failure

nrf modem: 1.3.4

sdk: 2.3.0

Custom board.

We have an asset tracker that caches events when out of connectivity zone. We can accumulate 10-100 messages depending upon the duration. Once in a while, when emptying the cache the socket/mqtt does not return and after 15 minutes the watchdog would reset the CPU. So overcome this challenge, it set a timeout on the socket to 15 seconds.

err = setsockopt(client.transport.tls.sock, SOL_SOCKET , SO_SNDTIMEO, &timeout_mqtt, sizeof(timeout_mqtt));
if (err)
{
	#ifdef DEBUG_PRINT_MQTT
		printf("failed to set send timeout. err: %d. errno: %d\n", err, errno);
	#endif
}
2023-12-06 - modem trace on fw 91-22.log

This is allowing our application to continue and not reset but after 15 seconds error -11 is return followed by closing of the socket and mqtt connection. This is happening around the same time at the 16/17th message (each message is sent with a second delay in between to allow mqtt to do its thing).

00> CACHE, 12-07T 2:53:58.517Z,  INFO, Sending event: 16 of 99. eventCounter: 120
00>  MQTT, 12-07T 2:53:58.518Z,  INFO, Publishing mqtt msg id: 1037, 
00> Publishing
00> [00:07:55.668,853] <inf> nrf_modem: send() fd 0x0, len 178, blocking
00> [00:07:55.676,086] <inf> nrf_modem: RPC_IP_STATUS_NTF fd 0xff, RPC flow ctrl on
00> [00:07:55.876,098] <inf> nrf_modem: RPC_IP_SEND_RES fd 0x0, result RPC_IP_ERR_NO_MEM
00> [00:08:10.876,739] <err> net_mqtt: Transport write failed, err_code = -11, closing connection
00> [00:08:10.877,258] <inf> net_mqtt_sock_tls: Closing socket 0
00> [00:08:10.877,685] <dbg> net_sock: z_impl_zsock_close: (main): close: ctx=0x2001108c, fd=0
00> [00:08:10.878,234] <inf> nrf_modem: close() fd 0x0
00> [00:08:10.885,406] <inf> nrf_modem: RPC_IP_CLOSE_RES fd 0x0, result RPC_IP_ERR_OK
00> [00:08:10.885,894] <inf> nrf_modem: poll() fd 0x0, nval:1
00>  MQTT, 12-07T 2:54:13.740Z, ERROR, mqtt_evt_handler, client disconnected: -11
00>  MQTT, 12-07T 2:54:13.741Z, ERROR, mqttSend, publish failed. mqttState: 0, err: -11, errno: 11

even though it happens at "sending event 16 of 99" everytime, it does not always happen. Sometimes it will happen within 5 mintues of running the code, other times it could be hours. LTE connectivity is not changed during this time as I am doing this simulated caching test from my work desk.

Once the socket and connection is closed by the mqtt.c, the next attempt to connect on mqtt results in errno -12 (ENOMEM).


Summary of issues:
1. Mqtt data transfer freezer without timeout on socket (resulting in watchdog reset after 15 minutes)
2. Mqtt data transfer returns -11 with timeout on socket following by -12 (ENOMEM) for next mqtt connection attempts
3. There is any way to get prints as well as trace over RTT? I collected trace but i am not sure if this event was captured in it.

Here are my proj.conf settings and I have also attached a trace.

#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic

# General config
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_NANO=n #disable for 64-bit long long support
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

CONFIG_HW_STACK_PROTECTION=y #added on 2023-11-24 to detect stack overflow

CONFIG_PM=y
# # Required to disable default behavior of deep sleep on timeout
CONFIG_PM_DEVICE=y

#to implement our own error handler so we can store critical data before rebooting
CONFIG_RESET_ON_FATAL_ERROR=n

# Main
CONFIG_NCS_SAMPLES_DEFAULTS=n
#we want to be able to reboot
CONFIG_REBOOT=y
CONFIG_FPU=y

#added on 2023-11-27 to deal with ENOMEM error on mqtt connect
#after mqtt send returns -11 
CONFIG_NRF_MODEM_LIB_HEAP_SIZE=4096 
CONFIG_NRF_MODEM_LIB_SENDMSG_BUF_SIZE=2048
CONFIG_POSIX_MAX_FDS=10
CONFIG_NET_BUF_RX_COUNT=32
CONFIG_NET_BUF_TX_COUNT=32
CONFIG_NET_PKT_RX_COUNT=16
CONFIG_NET_PKT_TX_COUNT=16

CONFIG_HEAP_MEM_POOL_SIZE=28672
CONFIG_MAIN_STACK_SIZE=28672
CONFIG_ISR_STACK_SIZE=10240
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=12288

#Watchdog
CONFIG_WATCHDOG=y

# Following 2 are added to avoid k_timeout_t error
CONFIG_DATE_TIME=y

#nrfx drivers
#set all to no for power measurement
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y


#for RTT
# disabled for RTT Modem trace
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG_BACKEND_UART=n

CONFIG_THREAD_NAME=y

#dont halt but reset the system on panic
CONFIG_TFM_HALT_ON_CORE_PANIC=n

# for modem trace. not working as of 2023-12-06
CONFIG_LOG_BACKEND_RTT=n

CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y
CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_RTT=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS_POSIX_NAMES=y

#Zephyr http api - sockets
CONFIG_HTTP_CLIENT=y

# SMS
CONFIG_SMS=y

# nRF modem library
# Modem library
CONFIG_NRF_MODEM_LIB=y
CONFIG_NRF_MODEM_LIB_SYS_INIT=n
CONFIG_MODEM_INFO=y #for nrf temperature

# LTE link control
#use 60 seconds timeout
CONFIG_LTE_NETWORK_TIMEOUT=45
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
CONFIG_LTE_NETWORK_MODE_LTE_M=y

#Bands
CONFIG_LTE_LOCK_BANDS=y
# BANDS FOR US/CAN: 2, 4, 5, 12, 13, 17, 25, 26. BANDS FOR CHINA: 8
# BANDS FOR CHILE: 3, 5
CONFIG_LTE_LOCK_BAND_MASK="0000010001100000011110"
CONFIG_LTE_LC_TAU_PRE_WARNING_NOTIFICATIONS=y
#psm

#101 = minuts, 1010 = 10 (10 minutes PSM)
#001 - 1 hours       00001 (1) = 1 hours, 01010 = 10 hours, 00110 = 6 hours, 11010 = 26 hours
CONFIG_LTE_PSM_REQ_RPTAU="00100110"
#000 - 2 second      00001 (2) = 2 seconds on time, 00011 = 6 second on time
CONFIG_LTE_PSM_REQ_RAT="00000011"

# Library for buttons and LEDs
CONFIG_DK_LIBRARY=n

#flash with nvs
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
# CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# FOTA library
CONFIG_FOTA_DOWNLOAD=y
CONFIG_FOTA_DOWNLOAD_PROGRESS_EVT=y

# Download client
CONFIG_DOWNLOAD_CLIENT=y
# CONFIG_DOWNLOAD_CLIENT_TLS=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_2048=y
CONFIG_NET_SOCKETS_TLS_SET_MAX_FRAGMENT_LENGTH=n

# DFU Target
CONFIG_DFU_TARGET=y

# Modem key management
CONFIG_MODEM_KEY_MGMT=y

# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y

# MQTT
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=y 

#17 minutes, in seconds
CONFIG_MQTT_KEEPALIVE=1020
CONFIG_MQTT_CLEAN_SESSION=n
CONFIG_MQTT_TLS_SESSION_CACHING=y

# GPIO
CONFIG_GPIO=y

# ADC
CONFIG_ADC=y
CONFIG_ADC_NRFX_SAADC=y
CONFIG_ADC_ASYNC=n

CONFIG_I2C_NRFX=y
CONFIG_I2C=y
# CONFIG_NRFX_TWI=y

CONFIG_AT_MONITOR=y

and my mqttSend function:

int mqttSend()// uint8_t *data_to_send , uint16_t len)
{
	int err = 0;
	uint8_t pubAckCheckCounter = 0;

	mydbg_MqttEvents.noOfMqttSendAttempted++;

	// err = mqttDataPublish(&client,MQTT_QOS_1_AT_LEAST_ONCE,lteMsgString, myLteMsgStringLength);
	err = mqttDataPublish(&client,MQTT_QOS_0_AT_MOST_ONCE,lteMsgString, myLteMsgStringLength);
	if (err != 0) 
	{
		#ifdef DEBUG_PRINT_MQTT
			printf(" MQTT, %s, ERROR, mqttSend, publish failed. mqttState: %d, err: %d, errno: %d\n", 
			myFormattedDateTime(), mqttIsConnected, err, errno);
		#endif

		mydbg_MqttEvents.noOfFailedMqttSends++;
		mydbg_MqttEvents.lastMqttSendError = err;
		lastMqttCommFailedWithEAGAIN = true;

		//we came here because mqttDataPublish returned -11 and closed the socket and connection.
		//just restart the thread.
		//Also tried without restarting thread and the effect on being able to create the subsequent mqtt
		//connection is the same with -12 (ENOMEM)
		stopMqttThread();
		return ERROR_FAILURE;
	}
	else
	{
		lastMqttCommFailedWithEAGAIN = false;
		mydbg_MqttEvents.noOfMqttMsgsSent++;

		#ifdef DEBUG_PRINT_MQTT
			printf(" MQTT, %s,  INFO, mqttSend, sent the MQTT data\n",
			myFormattedDateTime());
		#endif

		#if defined(UNITTEST_MQTT) && defined(ENABLE_PRINTS)
			if (enum_myMqttUntitTest == unittest_mqtt_ignorePubAck)
			{
				return ERROR_SUCCESS;
			}
		#endif
		
		return ERROR_SUCCESS;	

	}
	
	return ERROR_FAILURE;
			
}

Thank you for your continued support

Regards

Noaman

Parents
  • Hi,

    The ENOMEM error comes because you have filled up the shared buffers between the modem and application cores with messages to send.

    In this case, it happens because the server doesn't acknowledge the (TCP) packets. This means that the modem has to keep trying to send the packets, rather than clearing them from their buffers.

    While you can't see the socket error, you can see that the server doesn't respond (or the modem doesn't receive the responses) in this exported IP trace:

    2023-12-06 - modem trace on fw 91-22.pcapng

    What server are you using?

    Are you able to get any logs or IP traces from the server to see if it receives the packets as it should?

    Best regards,

    Didrik

  • Hi Didrik,

    I repeated the test while monitoring clouqMqtt logs. From the logs I can tell that the broker did not get any messages from the client, not even the first one from the batch of 16 (or 100 if the error) had not occurred.

    Last successful msg was sent at 12-11T18:23:34.945Z after which the messages starting from 12-11T18:29:57.342Z did not make it to the Mqtt broker. The next batch at 18:32 made it after a reconnection to the broker. Please not that between 18:23 and 18:29 the lte connection was idle on psm. Could psm be causing any issues?

    device printk logs:

    00>  MQTT, 12-11T18:23:14.708Z,  INFO, Publishing mqtt msg id: 1000, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003503000001016311120043888c1079921f05131b64020d080000a816046577537c220400000002"}
    00>  MQTT, 12-11T18:23:14.713Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:15.  3Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:15.  4Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231899511032b50
    00> CACHE, 12-11T18:23:15.715Z,  INFO, Sending event: 1 of 99. eventCounter: 4
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:15.716Z,  INFO, Publishing mqtt msg id: 1001, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003504000001026211120043888c1079921f05131b64020d080000a816046577537c220400000002"}
    00>  MQTT, 12-11T18:23:15.721Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:15.961Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:15.962Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 500117023189960694a850
    00> CACHE, 12-11T18:23:16.723Z,  INFO, Sending event: 2 of 99. eventCounter: 5
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:16.730Z,  INFO, Publishing mqtt msg id: 1002, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003505000001036111120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:16.740Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:17. 21Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:17. 22Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231899711052f50
    00> CACHE, 12-11T18:23:17.742Z,  INFO, Sending event: 3 of 99. eventCounter: 6
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:17.743Z,  INFO, Publishing mqtt msg id: 1003, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003506000001046011120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:17.748Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:17.962Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:17.963Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231899807063550
    00> CACHE, 12-11T18:23:18.750Z,  INFO, Sending event: 4 of 99. eventCounter: 7
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:18.751Z,  INFO, Publishing mqtt msg id: 1004, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003507000001055f11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:18.757Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:19.  2Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:19.  3Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231899911072350
    00> CACHE, 12-11T18:23:19.758Z,  INFO, Sending event: 5 of 99. eventCounter: 8
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:19.759Z,  INFO, Publishing mqtt msg id: 1005, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003508000001065e11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:19.764Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:20. 42Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:20. 43Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231900014983950
    00> CACHE, 12-11T18:23:20.766Z,  INFO, Sending event: 6 of 99. eventCounter: 9
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:20.767Z,  INFO, Publishing mqtt msg id: 1006, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003509000001075d11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:20.772Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:21. 21Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:21. 22Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 500117023190011109ac50
    00> CACHE, 12-11T18:23:21.773Z,  INFO, Sending event: 7 of 99. eventCounter: 10
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:21.781Z,  INFO, Publishing mqtt msg id: 1007, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e60200350a000001085c11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:21.791Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:22.143Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:22.144Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231900223010955
    00> CACHE, 12-11T18:23:22.793Z,  INFO, Sending event: 8 of 99. eventCounter: 11
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:22.794Z,  INFO, Publishing mqtt msg id: 1008, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e60200350b000001095b11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:22.799Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:23. 82Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:23. 82Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 50011702319003189113e5
    00> CACHE, 12-11T18:23:23.801Z,  INFO, Sending event: 9 of 99. eventCounter: 12
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:23.808Z,  INFO, Publishing mqtt msg id: 1009, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e60200350c0000010a5a11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:23.818Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:24.123Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:24.123Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231900423012915
    00> CACHE, 12-11T18:23:24.820Z,  INFO, Sending event: 10 of 99. eventCounter: 13
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:24.821Z,  INFO, Publishing mqtt msg id: 1010, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e60200350d0000010b5911120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:24.826Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:23:25.828Z,  INFO, Sending event: 11 of 99. eventCounter: 14
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:25.835Z,  INFO, Publishing mqtt msg id: 1011, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e60200350e0000010c5811120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:25.846Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:23:26.847Z,  INFO, Sending event: 12 of 99. eventCounter: 15
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:26.854Z,  INFO, Publishing mqtt msg id: 1012, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e60200350f0000010d5711120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:26.865Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:23:27.866Z,  INFO, Sending event: 13 of 99. eventCounter: 16
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:27.867Z,  INFO, Publishing mqtt msg id: 1013, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e6020035100000010e5611120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:27.872Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:27.968Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:27.968Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231900807713c85
    00>  MQTT, 12-11T18:23:28.208Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:28.208Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231900831714f95
    00>  MQTT, 12-11T18:23:28.682Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:28.682Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 50011702319008321159b5
    00>  MQTT, 12-11T18:23:28.683Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:28.684Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231900832316b85
    00> CACHE, 12-11T18:23:28.874Z,  INFO, Sending event: 14 of 99. eventCounter: 17
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:28.875Z,  INFO, Publishing mqtt msg id: 1014, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e6020035110000010f5511120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:28.880Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:29.165Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:29.165Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 50011702319009270179d5
    00> CACHE, 12-11T18:23:29.882Z,  INFO, Sending event: 15 of 99. eventCounter: 18
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:29.883Z,  INFO, Publishing mqtt msg id: 1015, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003512000001105411120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:29.888Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:30.123Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:30.123Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 50011702319010230188f5
    00> CACHE, 12-11T18:23:30.889Z,  INFO, Sending event: 16 of 99. eventCounter: 19
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:30.891Z,  INFO, Publishing mqtt msg id: 1016, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003513000001115311120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:30.896Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:31.183Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:31.183Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 50011702319011270198b5
    00> CACHE, 12-11T18:23:31.897Z,  INFO, Sending event: 17 of 99. eventCounter: 20
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:31.899Z,  INFO, Publishing mqtt msg id: 1017, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003514000001125211120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:31.903Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:32.123Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:32.123Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231901223020865
    00> CACHE, 12-11T18:23:32.905Z,  INFO, Sending event: 18 of 99. eventCounter: 21
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:32.912Z,  INFO, Publishing mqtt msg id: 1018, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003515000001135111120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:32.923Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:33.263Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:33.263Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231901334921015
    00> CACHE, 12-11T18:23:33.924Z,  INFO, Sending event: 19 of 99. eventCounter: 22
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:33.932Z,  INFO, Publishing mqtt msg id: 1019, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003516000001145011120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:33.942Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:34.264Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:34.265Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231901431022905
    00> CACHE, 12-11T18:23:34.944Z,  INFO, Sending event: 20 of 99. eventCounter: 23
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:23:34.945Z,  INFO, Publishing mqtt msg id: 1020, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1c25100c0000e602003517000001154f11120043888c1079921f05131b64020d080000a816046577537d220400000002"}
    00>  MQTT, 12-11T18:23:34.950Z,  INFO, mqttSend, sent the MQTT data
    00>  MQTT, 12-11T18:23:35.342Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:23:35.342Z,  INFO, mqtt_evt_handler, PUBLISH result=0 len=11, payload: 
    00> 5001170231901543023e25
    00> EVENT, 12-11T18:23:35.950Z,  INFO, Will NOT Disconnect, reason: 3, LTEConnected: 1, psmGranted: 1, ModemState: roaming, ModemPower: 1, currentEventMotionState: 3, previousEventMotionState: 3, LTEMotionFrequency: 120, LTEIdleFrequency: 900
    00>   LTE, 12-11T18:23:47.555Z,  INFO, lte_handler, Time Since Last Idle: 0, RRC mode: Idle
    00>   GPS, 12-11T18:24: 5.950Z,  INFO, gps is off
    00> WATCH, 12-11T18:26: 4.571Z,  INFO, watchdogTimerCallback
    00> WATCH, 12-11T18:26: 4.572Z,  INFO, WDT Feed: 0
    00>   ACC, 12-11T18:28:47.754Z,  INFO,     accIntCallback, ACC Int Triggered
    00> EVENT, 12-11T18:28:47.755Z,   ACC,   submitSensorWork, work que result: 1
    00> EVENT, 12-11T18:28:47.757Z,  INFO, mySensorWorkHandle, timeSinceLastMotionInterrupt: 453, acc State: 0, No ongoing event, changing to motionStateMoving,  Starting Motion event
    00> EVENT, 12-11T18:28:48.358Z,  INFO, WDT Feed Motion Event: 0
    00>   LTE, 12-11T18:28:53.514Z,  INFO, Reading temperature  LTE, 12-11T18:28:53.521Z,  INFO, temperature is : %XTEMP: 23
    00> 
    00> OK
    00> 
    00> 
    00> SENSR, 12-11T18:28:53.521Z,  INFO, getNrf9160Temp, nrf temperature read successfully: 23
    00>   GPS, 12-11T18:28:53.522Z,  INFO, gps is on
    00>   GPS, 12-11T18:28:55.568Z, INFO, GPS was off, now turned it on: 0
    00> PACKT, 12-11T18:28:55.689Z,   GPS, Getting gps. Motion frequency :120. GPS Timeout: 60, myLteConfig.getSatsWhenIdle: 1, myLteConfig.getSatsWhenIdle: 1
    00>   GPS, 12-11T18:28:56. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:28:57. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:28:58. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:28:59. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:  . 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 1. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 2. 45Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 3. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 4. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 5. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 6. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 7. 45Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 8. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29: 9. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:10. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:11. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:12. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:13. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:14. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:15. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:16. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:17. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:18. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:19. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:20. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:21. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:22. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:23. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:24. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:25. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:26. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:27. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:28. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:29. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:30. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:31. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:32. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:33. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:34. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:35. 46Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:36. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:37. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:38. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:39. 49Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:40. 49Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:41. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:42. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:43. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   ACC, 12-11T18:29:43.806Z,  INFO,     accIntCallback, ACC Int Triggered
    00> EVENT, 12-11T18:29:43.807Z,   ACC,   submitSensorWork, work que result: 1
    00> EVENT, 12-11T18:29:43.809Z,  INFO, mySensorWorkHandle, timeSinceLastMotionInterrupt: 56, acc State: 0, Event already in progress,   GPS, 12-11T18:29:44. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:45. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:46. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:47. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:48. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:49. 49Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:50. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:51. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:52. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:53. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:54. 48Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00>   GPS, 12-11T18:29:55. 47Z,  INFO, fix: 0.000000, 0.000000, 0, 0, 0, 0, 0, 0.000, 0
    00> In compile external gps message. gotFix: 0, TTF: 60
    00> GPS: gotFix: 0, TTF: 60, tracked Sats: 0, sats used in fix: 0, speed: 0, accuracy: 0, heading: 0000
    00>  MQTT, 12-11T18:29:57.324Z,  INFO, MQTT state: 4, MQTT Thread Running:1
    00>  MQTT, 12-11T18:29:57.324Z,  INFO, MQTT state: 4, MQTT Thread Running:1
    00>  MQTT, 12-11T18:29:57.325Z,  INFO, MQTT state: 4, MQTT Thread Running:1
    00>  MQTT, 12-11T18:29:57.325Z,  INFO, mqtt state: 4, mqtt thread state: 1
    00>  MQTT, 12-11T18:29:57.326Z,  INFO, MQTT state: 4, MQTT Thread Running:1
    00> CACHE, 12-11T18:29:57.333Z,  INFO, processAndCacheEve, WILL attempt to send event. assetflo connectivity ok: 0
    00> CACHE, 12-11T18:29:57.333Z,  INFO, cache event count: 99
    00> CACHE, 12-11T18:29:57.335Z,  INFO, Sending event: 0 of 99. eventCounter: 104
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:29:57.342Z,  INFO, Publishing mqtt msg id: 1021, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec686d0001016311120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:29:57.353Z,  INFO, mqttSend, sent the MQTT data
    00>   LTE, 12-11T18:29:57.559Z,  INFO, lte_handler, Time Since Last Idle: 370, RRC mode: Active
    00> CACHE, 12-11T18:29:58.354Z,  INFO, Sending event: 1 of 99. eventCounter: 105
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:29:58.356Z,  INFO, Publishing mqtt msg id: 1022, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec696d0001026211120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:29:58.360Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:29:59.362Z,  INFO, Sending event: 2 of 99. eventCounter: 106
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:29:59.369Z,  INFO, Publishing mqtt msg id: 1023, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec6a6d0001036111120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:29:59.379Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30:  .381Z,  INFO, Sending event: 3 of 99. eventCounter: 107
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30:  .382Z,  INFO, Publishing mqtt msg id: 1024, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec6b6d0001046011120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30:  .387Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 1.388Z,  INFO, Sending event: 4 of 99. eventCounter: 108
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 1.395Z,  INFO, Publishing mqtt msg id: 1025, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec6c6d0001055f11120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 1.406Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 2.407Z,  INFO, Sending event: 5 of 99. eventCounter: 109
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 2.409Z,  INFO, Publishing mqtt msg id: 1026, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec6d6d0001065e11120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 2.414Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 3.415Z,  INFO, Sending event: 6 of 99. eventCounter: 110
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 3.417Z,  INFO, Publishing mqtt msg id: 1027, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec6e6d0001075d11120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 3.421Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 4.423Z,  INFO, Sending event: 7 of 99. eventCounter: 111
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 4.430Z,  INFO, Publishing mqtt msg id: 1028, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec6f6d0001085c11120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 4.440Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 5.442Z,  INFO, Sending event: 8 of 99. eventCounter: 112
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 5.449Z,  INFO, Publishing mqtt msg id: 1029, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec706d0001095b11120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 5.459Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 6.461Z,  INFO, Sending event: 9 of 99. eventCounter: 113
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 6.468Z,  INFO, Publishing mqtt msg id: 1030, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec716d00010a5a11120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 6.479Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 7.480Z,  INFO, Sending event: 10 of 99. eventCounter: 114
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 7.487Z,  INFO, Publishing mqtt msg id: 1031, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec726d00010b5911120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 7.498Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 8.499Z,  INFO, Sending event: 11 of 99. eventCounter: 115
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 8.500Z,  INFO, Publishing mqtt msg id: 1032, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec736d00010c5811120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 8.505Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30: 9.507Z,  INFO, Sending event: 12 of 99. eventCounter: 116
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30: 9.508Z,  INFO, Publishing mqtt msg id: 1033, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec746d00010d5711120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30: 9.513Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30:10.514Z,  INFO, Sending event: 13 of 99. eventCounter: 117
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30:10.522Z,  INFO, Publishing mqtt msg id: 1034, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec756d00010e5611120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30:10.532Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30:11.533Z,  INFO, Sending event: 14 of 99. eventCounter: 118
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30:11.541Z,  INFO, Publishing mqtt msg id: 1035, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec766d00010f5511120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30:11.551Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30:12.552Z,  INFO, Sending event: 15 of 99. eventCounter: 119
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30:12.560Z,  INFO, Publishing mqtt msg id: 1036, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec776d0001105411120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>  MQTT, 12-11T18:30:12.570Z,  INFO, mqttSend, sent the MQTT data
    00> CACHE, 12-11T18:30:13.572Z,  INFO, Sending event: 16 of 99. eventCounter: 120
    00> CEREG: +CEREG: 5,5,"753A","009F337B",7,,,"11100000","11100000"
    00> 
    00> OK
    00> 
    00> 
    00>  MQTT, 12-11T18:30:13.579Z,  INFO, Publishing mqtt msg id: 1037, 
    00> Publishing
    00> {"channel":"lte","topic":"location","data":"ffff003971ff11101163856f5b1626100c0100e6f7f5ec786d0001115311120043888c1079921f05131b64020d080000a816046577552322040000003e"}
    00>   LTE, 12-11T18:30:20. 31Z,  INFO, lte_handler, Time Since Last Idle: 0, RRC mode: Idle
    00>   LTE, 12-11T18:30:21. 60Z,  INFO, lte_handler, Time Since Last Idle: 1, RRC mode: Active
    00>  MQTT, 12-11T18:30:28.796Z, ERROR, mqtt_evt_handler, client disconnected: -11
    00>  MQTT, 12-11T18:30:28.797Z, ERROR, mqttSend, publish failed. mqttState: 0, err: -11, errno: 11
    00>   LTE, 12-11T18:30:28.797Z,  INFO, waiting for Idle before disconnect. sem result: 0
    00>  MQTT, 12-11T18:30:28.798Z,  INFO, In Mqtt loop
    00>  MQTT, 12-11T18:30:28.798Z, ERROR, POLLNVAL
    00>  MQTT, 12-11T18:30:28.798Z, ERROR, loop: Disconnecting MQTT client
    00>   LTE, 12-11T18:30:33.798Z,  INFO, waiting for Idle before disconnect. sem result: -11
    00>   LTE, 12-11T18:30:38.798Z,  INFO, waiting for Idle before disconnect. sem result: -11

    cloudmqtt logs:

    2023-12-11 18:23:18: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:19: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:19: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:19: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:19: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:20: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:20: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:20: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:20: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:21: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:21: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:21: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:21: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:22: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:22: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:22: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:22: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:23: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:23: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:23: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:23: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:24: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:24: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:24: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:24: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:28: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:28: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:29: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:29: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:29: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:29: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:30: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:30: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:30: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:30: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:31: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:31: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:31: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:31: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:31: Socket error on client 5G11101168897f7, disconnecting.
    2023-12-11 18:23:31: New client connected from xxxxxxxxxxxxxx as 5G11101168897f7 (c0, k1020, u'assetTag').
    2023-12-11 18:23:31: No will message specified.
    2023-12-11 18:23:31: Sending CONNACK to 5G11101168897f7 (1, 0)
    2023-12-11 18:23:31: Received SUBSCRIBE from 5G11101168897f7
    2023-12-11 18:23:31: 	push/11101168897f/ (QoS 1)
    2023-12-11 18:23:31: Sending SUBACK to 5G11101168897f7
    2023-12-11 18:23:32: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:32: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:32: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:32: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:32: Received PUBLISH from 5G11101168897f7 (d0, q1, r0, m1733, 'feed/', ... (548 bytes))
    2023-12-11 18:23:32: Sending PUBACK to 5G11101168897f7 (Mid: 1733)
    2023-12-11 18:23:32: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (548 bytes))
    2023-12-11 18:23:32: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101168897f/', ... (12 bytes))
    2023-12-11 18:23:32: Sending PUBLISH to 5G11101168897f7 (d0, q0, r0, m0, 'push/11101168897f/', ... (12 bytes))
    2023-12-11 18:23:33: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:33: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:33: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:33: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:34: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:34: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:34: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:34: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:35: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:35: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:23:35: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:23:35: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:39: New connection from xxxxxxxxxxx on port 24339.
    2023-12-11 18:32:40: Client 5G11101163856f6 already connected, closing old connection.
    2023-12-11 18:32:40: Socket error on client 5G11101163856f6, disconnecting.
    2023-12-11 18:32:40: New client connected from xxxxxxxxx as 5G11101163856f6 (c0, k1020, u'assetTag').
    2023-12-11 18:32:40: No will message specified.
    2023-12-11 18:32:40: Sending CONNACK to 5G11101163856f6 (1, 0)
    2023-12-11 18:32:41: Received SUBSCRIBE from 5G11101163856f6
    2023-12-11 18:32:41: 	push/11101163856f/ (QoS 1)
    2023-12-11 18:32:41: Sending SUBACK to 5G11101163856f6
    2023-12-11 18:32:41: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:41: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:41: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:41: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:42: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:42: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:42: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:42: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:43: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:43: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:43: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:43: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:44: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:44: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:44: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:44: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:45: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:45: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:45: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:45: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:46: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:46: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:46: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:46: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:47: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:47: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:47: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:47: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:48: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:48: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:48: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:48: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:49: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:49: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:49: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:49: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:50: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:50: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:50: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:50: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:51: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:51: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:51: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:51: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:52: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:52: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:52: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:52: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:53: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:53: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:53: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:53: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:55: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:55: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:55: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:55: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:55: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:55: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:55: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:55: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:57: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:57: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:57: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:57: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:57: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:57: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:57: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:57: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:59: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:59: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:59: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:59: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:59: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:59: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:32:59: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:32:59: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:33:01: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:33:01: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:33:01: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:33:01: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:33:02: Received PUBLISH from 5G11101163856f6 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:33:02: Sending PUBLISH to mqttjs_4801a218 (d0, q0, r0, m0, 'feed/', ... (168 bytes))
    2023-12-11 18:33:02: Received PUBLISH from mqttjs_4801a218 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:33:02: Sending PUBLISH to 5G11101163856f6 (d0, q0, r0, m0, 'push/11101163856f/', ... (11 bytes))
    2023-12-11 18:34:04: New connection from 216.168.185.225 on port 24339.
    2023-12-11 18:35:22: Socket error on client 5G11101165166f6, disconnecting.
    2023-12-11 18:35:22: New client connected from xxxxxxxxx as 5G11101165166f6 (c0, k1020, u'assetTag').
    2023-12-11 18:35:22: No will message specified.
    2023-12-11 18:35:22: Sending CONNACK to 5G11101165166f6 (1, 0)
    2023-12-11 18:35:23: Received SUBSCRIBE from 5G11101165166f6
    2023-12-11 18:35:23: 	push/11101165166f/ (QoS 1)
    2023-12-11 18:35:23: Sending SUBACK to 5G11101165166f6

    Three important questions:

    1. How do we avoid this situation where the modem keeps waiting for a response from the server

    2. How do we prevent the buffer from getting full (monitoring heap, message que etc.)

    3. How do we get out of both scenarios: a) modem keeps waiting for a response, and b) buffer is full.

  • I had another look at the trace, this time looking at the time between when the device tries to send data.

    For the first few sends, the time between is relatively short, at 90-190 seconds. The first time it fails, 434 seconds had passed since the last packet was exchanged. After that, the interval was around 1000 seconds each time. How long is the MQTT and TCP timeouts on the server?

    Another possible cause is a NAT timeout in the network (though that is typically a bigger problem for UDP, for TCP the timeouts we have seen are usually much longer). Are you able to see what, if any, IP packets arrive at the server?

    Stratosphere said:
    Could psm be causing any issues?

    PSM shouldn't cause any issues with sending. Besides, PSM was not granted by the network in the modem trace you shared.

    Stratosphere said:

    1. How do we avoid this situation where the modem keeps waiting for a response from the server

    2. How do we prevent the buffer from getting full (monitoring heap, message que etc.)

    3. How do we get out of both scenarios: a) modem keeps waiting for a response, and b) buffer is full.

    The best way is probably to have some flow control in the application. The send() function will return when the message has been placed in the modem's buffer, not when it actually has been sent on-air. So the only way the application has of knowing that the message has been received by the server is to receive an akc (on the application level) by the server. For MQTT, you can use QoS1 or 2 for this.

    Closing the socket should be enough to recover from the full buffer.

  • Hi, I have the same issues described above. Modem firmware 1.3.6 and nRF Connect SDK 2.6.0. Using MQTT QOS 1 to an AWS IoT broker and only publishing the next message in the queue after receiving the previous PUBACK. Also, the socket send timeout is configured to 15 seconds.

    During heavy upstream publish traffic, the underlying function '

    mqtt_transport_write_msg' occasionally returns -EAGAIN (-11) and causes the client to disconnect. Our logic calls for the device to try reconnecting via 'mqtt_connect' every five seconds, but my experience is the same as above, that this sometimes fails with -ENOMEM (-12). Depending on the situation this will either eventually resolve itself and allow a reconnect, or our 'connection monitor thread' will reboot the device after 30 minutes. 
    My questions are:
    1. When '
    mqtt_transport_write_msg' fails with -EAGAIN, is this because the send buffer is full, or because the send() timed out according to the 15s timeout policy?
    2. You mention that closing the socket should be enough to recover from the full buffer. It looks like this should be performed automatically by 'client_disconnect' in the MQTT driver. Do you have any ideas why the subsequent mqtt_connect call does not always work? What is the next step if mqtt_connect fails? Would toggling the modem off and on be appropriate or is there another way to reset from the error?
Reply
  • Hi, I have the same issues described above. Modem firmware 1.3.6 and nRF Connect SDK 2.6.0. Using MQTT QOS 1 to an AWS IoT broker and only publishing the next message in the queue after receiving the previous PUBACK. Also, the socket send timeout is configured to 15 seconds.

    During heavy upstream publish traffic, the underlying function '

    mqtt_transport_write_msg' occasionally returns -EAGAIN (-11) and causes the client to disconnect. Our logic calls for the device to try reconnecting via 'mqtt_connect' every five seconds, but my experience is the same as above, that this sometimes fails with -ENOMEM (-12). Depending on the situation this will either eventually resolve itself and allow a reconnect, or our 'connection monitor thread' will reboot the device after 30 minutes. 
    My questions are:
    1. When '
    mqtt_transport_write_msg' fails with -EAGAIN, is this because the send buffer is full, or because the send() timed out according to the 15s timeout policy?
    2. You mention that closing the socket should be enough to recover from the full buffer. It looks like this should be performed automatically by 'client_disconnect' in the MQTT driver. Do you have any ideas why the subsequent mqtt_connect call does not always work? What is the next step if mqtt_connect fails? Would toggling the modem off and on be appropriate or is there another way to reset from the error?
Children
No Data
Related