This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160-DK board Cloud API - AWS IoT periodic MQTT connection doesn't work.

Hello all,

This is my first post on your DevZone.


Setup details:

nRF9160 DK Board: 0.8.3
nRF Connect SDK tag: 1.2.0
OS: Windows 10 Pro
LTE Network: NB-IoT on B3 and B20, Operator: A1 Slovenia, PSM: No
Modem Firmware: mfw_nrf9160_1.1.1

Short description of our use case:

Our product periodically connects to AWS, does its PUB/SUB, disconnects and goes to sleep.
The time duration from the first boot message to cloud disconnect is around 17 seconds.
During sleep the modem is powered down using "lte_lc_power_off".
On wakeup the whole process repeats including configuring modem again.

Issue:

After power-on or board reset, connection to cloud works only once. Post wakeup from sleep,
"cloud_connect" function gets stuck in lower layer with a message "Created socket 2" and it stays there
with no timeout. I initially thought it might be network issue but reset, either soft (sys_reboot) or
board reboot, leads to a successful connection. However I want to avoid resetting the board on every wakeup.

How to reproduce the issue:

I took the sample application "nrf/samples/nrf9160/cloud_client" and modified it for simple
connect-disconnect-sleep cycle in loop, there is no modem power-off in this test app.

Please refer to the attached main.c, prj.conf, LTE Link monitor log output.
NOTE: In prj.conf file I have removed our product's AWS IoT settings.

Thanks.

/*
 * Copyright (c) 2020 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
 */
#include <zephyr.h>
#include <lte_lc.h>
#include <net/cloud.h>
#include <net/socket.h>

static struct cloud_backend *cloud_backend;

static int ready = 0;
static int disconnected = 0;

void cloud_event_handler(const struct cloud_backend *const backend,
			 const struct cloud_event *const evt,
			 void *user_data)
{
	ARG_UNUSED(user_data);
	ARG_UNUSED(backend);

	switch (evt->type) {
	case CLOUD_EVT_CONNECTED:
		printk("CLOUD_EVT_CONNECTED\n");
		break;
	case CLOUD_EVT_READY:
		printk("CLOUD_EVT_READY\n");
        ready = 1;
		break;
	case CLOUD_EVT_DISCONNECTED:
		printk("CLOUD_EVT_DISCONNECTED\n");
        disconnected = 1;
		break;
	case CLOUD_EVT_ERROR:
		printk("CLOUD_EVT_ERROR\n");
		break;
	case CLOUD_EVT_DATA_SENT:
		printk("CLOUD_EVT_DATA_SENT\n");
		break;
	case CLOUD_EVT_DATA_RECEIVED:
		printk("CLOUD_EVT_DATA_RECEIVED\n");
		printk("Data received from cloud: %s\n", evt->data.msg.buf);
		break;
	case CLOUD_EVT_PAIR_REQUEST:
		printk("CLOUD_EVT_PAIR_REQUEST\n");
		break;
	case CLOUD_EVT_PAIR_DONE:
		printk("CLOUD_EVT_PAIR_DONE\n");
		break;
	case CLOUD_EVT_FOTA_DONE:
		printk("CLOUD_EVT_FOTA_DONE\n");
		break;
	default:
		printk("Unknown cloud event type: %d\n", evt->type);
		break;
	}
}

static void modem_configure(void)
{
#if defined(CONFIG_BSD_LIBRARY)
	if (IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT)) {
		/* Do nothing, modem is already turned on
		 * and connected.
		 */
	} else {
		int err;

		printk("Connecting to LTE network. ");
		printk("This may take several minutes.\n");

		err = lte_lc_init_and_connect();
		if (err) {
			printk("LTE link could not be established.\n");
		}
        else {
		    printk("Connected to LTE network\n");
        }

#if defined(CONFIG_POWER_SAVING_MODE_ENABLE)
		err = lte_lc_psm_req(true);
		if (err) {
			printk("lte_lc_psm_req, error: %d\n", err);
		}

		printk("PSM mode requested\n");
#endif
	}
#endif
}

static int cloud_socket_poll(void) 
{
	int err;

    struct pollfd fds[] = {
		{
			.fd = cloud_backend->config->socket,
			.events = POLLIN
		}
	};

	err = poll(fds, ARRAY_SIZE(fds), cloud_keepalive_time_left(cloud_backend));
    if (err < 0) {
        printk("poll() returned an error: %d\n", err);
        return err;
    }

    if (err == 0) {
        return -1; //timeout is error for our case.
    }

    if ((fds[0].revents & POLLIN) == POLLIN) {
        cloud_input(cloud_backend);
        return 0;
    }

    if ((fds[0].revents & POLLNVAL) == POLLNVAL) {
        printk("Socket error: POLLNVAL\n");
        printk("The cloud socket was unexpectedly closed.\n");
        return -1;
    }

    if ((fds[0].revents & POLLHUP) == POLLHUP) {
        printk("Socket error: POLLHUP\n");
        printk("Connection was closed by the cloud.\n");
        return -1;
    }

    if ((fds[0].revents & POLLERR) == POLLERR) {
        printk("Socket error: POLLERR\n");
        printk("Cloud connection was unexpectedly closed.\n");
        return -1;
    }
	

    return -1;
}

void main(void)
{
	int err;
    int i;

	printk("Cloud client has started\n");

	cloud_backend = cloud_get_binding(CONFIG_CLOUD_BACKEND);
	__ASSERT(cloud_backend != NULL, "%s backend not found",
		 CONFIG_CLOUD_BACKEND);

	err = cloud_init(cloud_backend, cloud_event_handler);
	if (err) {
		printk("Cloud backend could not be initialized, error: %d\n",
			err);
        goto err0;
	}

	modem_configure();

    for (i = 0; i < 2; i++) {
        printk("Connecting to Cloud...\n");
        
        ready = 0;
        disconnected = 0;

        err = cloud_connect(cloud_backend);
        if (err) {
            printk("cloud_connect, error: %d\n", err);
            goto err0;
        }

        //wait for connection
        while (ready == 0) {
            err = cloud_socket_poll();
            if (err < 0) {
                printk("cloud_socket_poll, error: %d\n", err);
                goto err0;
            }
        }

        printk("Disconnecting from Cloud.\n");

        err = cloud_disconnect(cloud_backend);
        if (err) {
            printk("cloud_disconnect, error: %d\n", err);
            goto err0;
        }

        //wait for disconnection.
        while (disconnected == 0) {
            err = cloud_socket_poll();
            if (err < 0) {
                printk("cloud_socket_poll, error: %d\n", err);
                goto err0;
            }
        }

        printk("Sleeping...\n");
        k_sleep(K_SECONDS(10));
    }

err0:
    printk("Done.\n");
    while(1);
}

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

# General config
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_NEWLIB_LIBC_FLOAT_SCANF=y
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_SERIAL=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_REBOOT=y

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

# BSD library
CONFIG_BSD_LIBRARY=y

# DK
CONFIG_DK_LIBRARY=y

# Heap and stacks
# Extended memory heap size needed for encoding nRF Cloud messages to JSON
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Generic cloud API
CONFIG_CLOUD_API=y

# AWS IOT

#
# Cloud Client Sample Settings
#
CONFIG_CLOUD_BACKEND="AWS_IOT"
CONFIG_CLOUD_MESSAGE=""
CONFIG_CLOUD_MESSAGE_PUBLICATION_INTERVAL=600
CONFIG_CLOUD_PUBLICATION_BUTTON_PRESS=n
CONFIG_CLOUD_PUBLICATION_SEQUENTIAL=n

CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_LOG_DEFAULT_LEVEL=4

# CONFIG_NRF_CLOUD=n
# CONFIG_NRF_CLOUD_STATIC_IPV4 is not set
# CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES is not set
# CONFIG_NRF_CLOUD_SEC_TAG=16842753
# CONFIG_NRF_CLOUD_HOST_NAME="a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com"
# CONFIG_NRF_CLOUD_PORT=8883
# CONFIG_NRF_CLOUD_IPV6 is not set
# CONFIG_NRF_CLOUD_MQTT_MESSAGE_BUFFER_LEN=256
# CONFIG_NRF_CLOUD_MQTT_PAYLOAD_BUFFER_LEN=2048
# CONFIG_NRF_CLOUD_LOG_LEVEL_OFF is not set
# CONFIG_NRF_CLOUD_LOG_LEVEL_ERR is not set
# CONFIG_NRF_CLOUD_LOG_LEVEL_WRN is not set
# CONFIG_NRF_CLOUD_LOG_LEVEL_INF=y
# CONFIG_NRF_CLOUD_LOG_LEVEL_DBG is not set
#CONFIG_NRF_CLOUD_LOG_LEVEL=3
# CONFIG_DOWNLOAD_CLIENT is not set
CONFIG_AWS_IOT=y
# CONFIG_AWS_IOT_STATIC_IPV4 is not set
CONFIG_AWS_IOT_SEC_TAG=16842333
CONFIG_AWS_IOT_BROKER_HOST_NAME="your aws iot link"
CONFIG_AWS_IOT_PORT=8883
CONFIG_AWS_IOT_MQTT_RX_TX_BUFFER_LEN=256
CONFIG_AWS_IOT_MQTT_PAYLOAD_BUFFER_LEN=4096
# CONFIG_AWS_IOT_IPV6 is not set
CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=0
CONFIG_AWS_IOT_CLIENT_ID_MAX_LEN=32
CONFIG_AWS_IOT_CLIENT_ID_STATIC="my-thing"
# CONFIG_AWS_IOT_CLIENT_ID_APP is not set
CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y
CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=y
CONFIG_AWS_IOT_TOPIC_UPDATE_ACCEPTED_SUBSCRIBE=y
CONFIG_AWS_IOT_TOPIC_UPDATE_REJECTED_SUBSCRIBE=y
# CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE is not set
# CONFIG_AWS_IOT_TOPIC_DELETE_ACCEPTED_SUBSCRIBE is not set
# CONFIG_AWS_IOT_TOPIC_DELETE_REJECTED_SUBSCRIBE is not set
# CONFIG_AWS_IOT_LOG_LEVEL_OFF is not set
CONFIG_AWS_IOT_LOG_LEVEL_ERR=y
CONFIG_AWS_IOT_LOG_LEVEL_WRN=y
CONFIG_AWS_IOT_LOG_LEVEL_INF=y
CONFIG_AWS_IOT_LOG_LEVEL_DBG=y
CONFIG_MQTT_LOG_LEVEL_ERR=y
CONFIG_MQTT_LOG_LEVEL_WRN=y
CONFIG_MQTT_LOG_LEVEL_INF=y
CONFIG_MQTT_LOG_LEVEL_DBG=y
#CONFIG_MQTT_LOG_LEVEL_DEFAULT=4
#CONFIG_AWS_IOT_LOG_LEVEL=4
CONFIG_LOG_MINIMAL=y
CONFIG_NET_LOG=y


# CONFIG_AWS_JOBS is not set
# CONFIG_AWS_FOTA is not set
CONFIG_CLOUD_API=y

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_NETWORK_MODE_NBIOT=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
CONFIG_LTE_LOCK_BANDS=y
# Band 3 and 20
CONFIG_LTE_LOCK_BAND_MASK="10000000000000000100"
# Slovenia doesn't have LTE-M.
CONFIG_LTE_NETWORK_USE_FALLBACK=n
CONFIG_LTE_NETWORK_TIMEOUT=120
CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_INF=y
CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y
#CONFIG_LTE_LINK_CONTROL_LOG_LEVEL=4

#
# AT Host Library for nrf91
#
CONFIG_AT_HOST_LIBRARY=y
CONFIG_UART_INTERRUPT_DRIVEN=y
# end of AT Host Library for nrf91


2020-03-03T06:55:39.392Z DEBUG modem << D:*** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
2020-03-03T06:55:39.762Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D\x0A
2020-03-03T06:55:39.769Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:39.774Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.778Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.784Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.789Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.794Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.804Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.809Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.813Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.817Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.824Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:39.835Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.045Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.053Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.060Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.064Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.070Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.083Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.091Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.096Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.107Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.113Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.117Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.121Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.126Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.130Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.134Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.138Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.143Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.147Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.151Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.155Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.159Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D\x0A\x0D\x0A\x0D\x0A
2020-03-03T06:55:40.163Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
2020-03-03T06:55:40.167Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.172Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.176Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.180Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.184Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.188Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.192Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.196Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
2020-03-03T06:55:40.200Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.204Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.208Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.212Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.216Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.220Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.224Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.228Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.232Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.236Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.240Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.244Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.248Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.252Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.256Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.261Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.265Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.269Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.273Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.277Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.281Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.285Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.289Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
2020-03-03T06:55:40.293Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
2020-03-03T06:55:40.297Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
2020-03-03T06:55:40.301Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.305Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.309Z DEBUG modem << 02 NRF_RTC0             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.313Z DEBUG modem << 03 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.317Z DEBUG modem << 04 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.321Z DEBUG modem << 05 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.325Z DEBUG modem << 06 NRF_UARTE2           Secure\x09\x09SKIP\x0D\x0A
2020-03-03T06:55:40.329Z DEBUG modem << 07 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.333Z DEBUG modem << 08 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.337Z DEBUG modem << 09 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.341Z DEBUG modem << 10 NRF_TIMER1           Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.345Z DEBUG modem << 11 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.349Z DEBUG modem << 12 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.352Z DEBUG modem << 13 NRF_PWM0             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.357Z DEBUG modem << 14 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.360Z DEBUG modem << 15 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.365Z DEBUG modem << 16 NRF_PWM3             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.368Z DEBUG modem << 17 NRF_WDT              Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.373Z DEBUG modem << 18 NRF_IPC              Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.377Z DEBUG modem << 19 NRF_VMC              Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.380Z DEBUG modem << 20 NRF_FPU              Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.384Z DEBUG modem << 21 NRF_EGU1             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.593Z DEBUG modem << 22 NRF_EGU2             Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.600Z DEBUG modem << 23 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.608Z DEBUG modem << 24 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
2020-03-03T06:55:40.612Z DEBUG modem << 25 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A\x0D\x0A
2020-03-03T06:55:40.615Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
2020-03-03T06:55:40.619Z DEBUG modem << SPM: NS MSP at 0x20026838\x0D\x0A
2020-03-03T06:55:40.629Z DEBUG modem << SPM: NS reset vector at 0xf801\x0D\x0A
2020-03-03T06:55:40.637Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
2020-03-03T06:55:40.644Z DEBUG modem << D: (0x20020aac): Priority 90\x0D\x0A
2020-03-03T06:55:40.651Z DEBUG modem << D: (0x20020aac): Network L3 init done\x0D\x0A
2020-03-03T06:55:40.658Z DEBUG modem << D: (0x20020aac): \x0D\x0A
2020-03-03T06:55:40.663Z DEBUG modem << D: (0x20020aac): On iface 0x20029280\x0D\x0A
2020-03-03T06:55:40.667Z DEBUG modem << D: (0x20020aac): \x0D\x0A
2020-03-03T06:55:40.671Z DEBUG modem << D: (0x20020aac): iface 0x20029280\x0D\x0A
2020-03-03T06:55:40.675Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
2020-03-03T06:55:40.678Z DEBUG modem << Cloud client has started\x0D\x0A
2020-03-03T06:55:40.683Z DEBUG modem << Connecting to LTE network. This may take several minutes.\x0D\x0A
2020-03-03T06:55:40.687Z DEBUG modem << D: Network mode: AT%XSYSTEMMODE=0,1,0,0\x0D\x0A
2020-03-03T06:55:41.805Z DEBUG modem << +CEREG: 2,"27F2","00043B21",9,0,0,"11100000","11100000"\x0D\x0A
2020-03-03T06:55:42.020Z DEBUG modem << D: Network registration status: 2\x0D\x0A
2020-03-03T06:55:44.011Z DEBUG modem << +CEREG: 1,"27F2","00043B21",9,,,"11100000","11100000"\x0D\x0A
2020-03-03T06:55:44.226Z DEBUG modem >> AT+COPS=3,2\x0D\x0A
2020-03-03T06:55:44.430Z DEBUG modem << D: Network registration status: 1\x0D\x0A
2020-03-03T06:55:44.434Z DEBUG modem << Connected to LTE network\x0D\x0A
2020-03-03T06:55:44.439Z DEBUG modem << Connecting to Cloud...\x0D\x0A
2020-03-03T06:55:44.615Z DEBUG modem << OK\x0D\x0A
2020-03-03T06:55:44.837Z DEBUG modem >> AT+COPS?\x0D\x0A
2020-03-03T06:55:45.056Z DEBUG modem << D: IPv4 Address found 3.106.36.26\x0D\x0A
2020-03-03T06:55:45.064Z DEBUG modem << D: (0x20020aac): Created socket 2\x0D\x0A
2020-03-03T06:55:45.072Z DEBUG modem << +COPS: 0,2,"29340",9\x0D\x0A
2020-03-03T06:55:45.081Z DEBUG modem << OK\x0D\x0A
2020-03-03T06:55:45.290Z DEBUG modem >> AT%XCBAND\x0D\x0A
2020-03-03T06:55:45.511Z DEBUG modem << %XCBAND: 3\x0D\x0A
2020-03-03T06:55:45.521Z DEBUG modem << OK\x0D\x0A
2020-03-03T06:55:45.736Z DEBUG modem >> AT+CGDCONT?\x0D\x0A
2020-03-03T06:55:45.956Z DEBUG modem << +CGDCONT: 0,"IPV4V6","internet.simobil.si","100.67.29.12 2A00:1A20:2100:4258:4ED1:D1DD:2867:921E",0,0\x0D\x0A
2020-03-03T06:55:45.963Z DEBUG modem << OK\x0D\x0A
2020-03-03T06:55:46.181Z DEBUG modem >> AT+CGACT?\x0D\x0A
2020-03-03T06:55:46.401Z DEBUG modem << +CGACT: 0,1\x0D\x0A
2020-03-03T06:55:46.409Z DEBUG modem << OK\x0D\x0A
2020-03-03T06:55:56.009Z DEBUG modem << D: (0x20020aac): Connect completed\x0D\x0A
2020-03-03T06:55:56.226Z DEBUG modem << D: (0x20020aac): Encoding Protocol Description. Str:MQTT%c: (%p): << msg type:0x%02x length:0x%08x\x0D\x0A
2020-03-03T06:55:56.233Z DEBUG modem <<  Size:00000004.\x0D\x0A
2020-03-03T06:55:56.457Z DEBUG modem << D: (0x20020aac): >> str_size:00000006 cur:0x20024f26, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.466Z DEBUG modem << D: (0x20020aac): >> val:0004 cur:0x20024f26, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.472Z DEBUG modem << D: (0x20020aac): Encoding Protocol Version 04.\x0D\x0A
2020-03-03T06:55:56.477Z DEBUG modem << D: (0x20020aac): >> val:04 cur:0x20024f2c, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.481Z DEBUG modem << D: (0x20020aac): >> val:00 cur:0x20024f2d, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.486Z DEBUG modem << D: (0x20020aac): Encoding Keep Alive Time 003c.\x0D\x0A
2020-03-03T06:55:56.497Z DEBUG modem << D: (0x20020aac): >> val:003c cur:0x20024f2e, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.507Z DEBUG modem << D: (0x20020aac): Encoding Client Id. Str:my-thing Size:0000000d.\x0D\x0A
2020-03-03T06:55:56.513Z DEBUG modem << D: (0x20020aac): >> str_size:0000000f cur:0x20024f30, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.519Z DEBUG modem << D: (0x20020aac): >> val:000d cur:0x20024f30, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.524Z DEBUG modem << D: (0x20020aac): << msg type:0x10 length:0x00000019\x0D\x0A
2020-03-03T06:55:56.528Z DEBUG modem << D: (0x20020aac): >> length:0x00000019 cur:0x00000000, end:0x00000000\x0D\x0A
2020-03-03T06:55:56.532Z DEBUG modem << D: (0x20020aac): Fixed header length = 02\x0D\x0A
2020-03-03T06:55:56.537Z DEBUG modem << D: (0x20020aac): >> val:10 cur:0x20024f24, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.540Z DEBUG modem << D: (0x20020aac): >> length:0x00000019 cur:0x20024f25, end:0x20025021\x0D\x0A
2020-03-03T06:55:56.545Z DEBUG modem << D: (0x20020aac): Connect completed\x0D\x0A
2020-03-03T06:55:57.112Z DEBUG modem << D: (0x20020aac): state:0x00000002\x0D\x0A
2020-03-03T06:55:57.336Z DEBUG modem << D: (0x20020aac): >> cur:0x20024e21, end:0x20024e23\x0D\x0A
2020-03-03T06:55:57.345Z DEBUG modem << D: (0x20020aac): << val:20\x0D\x0A
2020-03-03T06:55:57.350Z DEBUG modem << D: (0x20020aac): length:0x00000002\x0D\x0A
2020-03-03T06:55:57.564Z DEBUG modem << D: (0x20020aac): [CID 0x200202a0]: Received MQTT_PKT_TYPE_CONNACK!\x0D\x0A
2020-03-03T06:55:57.572Z DEBUG modem << D: (0x20020aac): >> cur:0x20024e23, end:0x20024e25\x0D\x0A
2020-03-03T06:55:57.579Z DEBUG modem << D: (0x20020aac): << val:00\x0D\x0A
2020-03-03T06:55:57.583Z DEBUG modem << D: (0x20020aac): >> cur:0x20024e24, end:0x20024e25\x0D\x0A
2020-03-03T06:55:57.593Z DEBUG modem << D: (0x20020aac): << val:00\x0D\x0A
2020-03-03T06:55:57.602Z DEBUG modem << D: (0x20020aac): [CID 0x200202a0]: session_present_flag: 0\x0D\x0A
2020-03-03T06:55:57.609Z DEBUG modem << D: (0x20020aac): [CID 0x200202a0]: return_code: 0\x0D\x0A
2020-03-03T06:55:57.617Z DEBUG modem << D: MQTT client connected!\x0D\x0A
2020-03-03T06:55:57.623Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/my-thing/shadow/get/accepted\x0D\x0A
2020-03-03T06:55:57.627Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/my-thing/shadow/get/rejected\x0D\x0A
2020-03-03T06:55:57.631Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/my-thing/shadow/update/accepted\x0D\x0A
2020-03-03T06:55:57.636Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/my-thing/shadow/update/rejected\x0D\x0A
2020-03-03T06:55:57.640Z DEBUG modem << D: (0x20020aac): [CID 0x200202a0]:[State 0x06]: >> message id 0xa474 topic count 0x0004\x0D\x0A
2020-03-03T06:55:57.644Z DEBUG modem << D: (0x20020aac): >> val:a474 cur:0x20024f26, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.648Z DEBUG modem << D: (0x20020aac): >> str_size:0000002f cur:0x20024f28, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.653Z DEBUG modem << D: (0x20020aac): >> val:002d cur:0x20024f28, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.657Z DEBUG modem << D: (0x20020aac): >> val:01 cur:0x20024f57, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.661Z DEBUG modem << D: (0x20020aac): >> str_size:0000002f cur:0x20024f58, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.665Z DEBUG modem << D: (0x20020aac): >> val:002d cur:0x20024f58, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.670Z DEBUG modem << D: (0x20020aac): >> val:01 cur:0x20024f87, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.673Z DEBUG modem << D: (0x20020aac): >> str_size:00000032 cur:0x20024f88, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.677Z DEBUG modem << D: (0x20020aac): >> val:0030 cur:0x20024f88, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.682Z DEBUG modem << D: (0x20020aac): >> val:01 cur:0x20024fba, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.687Z DEBUG modem << D: (0x20020aac): >> str_size:00000032 cur:0x20024fbb, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.691Z DEBUG modem << D: (0x20020aac): >> val:0030 cur:0x20024fbb, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.695Z DEBUG modem << D: (0x20020aac): >> val:01 cur:0x20024fed, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.698Z DEBUG modem << D: (0x20020aac): << msg type:0x82 length:0x000000c8\x0D\x0A
2020-03-03T06:55:57.704Z DEBUG modem << D: (0x20020aac): >> length:0x000000c8 cur:0x00000000, end:0x00000000\x0D\x0A
2020-03-03T06:55:57.707Z DEBUG modem << D: (0x20020aac): Fixed header length = 03\x0D\x0A
2020-03-03T06:55:57.711Z DEBUG modem << D: (0x20020aac): >> val:82 cur:0x20024f23, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.715Z DEBUG modem << D: (0x20020aac): >> length:0x000000c8 cur:0x20024f24, end:0x20025021\x0D\x0A
2020-03-03T06:55:57.719Z DEBUG modem << D: (0x20020aac): [0x200202a0]: Transport writing 203 bytes.\x0D\x0A
2020-03-03T06:55:57.723Z DEBUG modem << D: (0x20020aac): [0x200202a0]: Transport write complete.\x0D\x0A
2020-03-03T06:55:57.727Z DEBUG modem << D: (0x20020aac): [CID 0x200202a0]:[State 0x06]: << result 0x00000000\x0D\x0A
2020-03-03T06:55:57.731Z DEBUG modem << CLOUD_EVT_CONNECTED\x0D\x0A
2020-03-03T06:55:57.736Z DEBUG modem << CLOUD_EVT_READY\x0D\x0A
2020-03-03T06:55:57.740Z DEBUG modem << Disconnecting from Cloud.\x0D\x0A
2020-03-03T06:55:57.744Z DEBUG modem << D: (0x20020aac): [0x200202a0]: Transport writing 2 bytes.\x0D\x0A
2020-03-03T06:55:57.748Z DEBUG modem << D: (0x20020aac): [0x200202a0]: Transport write complete.\x0D\x0A
2020-03-03T06:55:57.752Z DEBUG modem << D: (0x20020aac): Closing socket 2\x0D\x0A
2020-03-03T06:55:57.756Z DEBUG modem << D: MQTT_EVT_DISCONNECT: result = 0\x0D\x0A
2020-03-03T06:55:57.760Z DEBUG modem << CLOUD_EVT_DISCONNECTED\x0D\x0A
2020-03-03T06:55:57.764Z DEBUG modem << Sleeping...\x0D\x0A
2020-03-03T06:56:07.334Z DEBUG modem << Connecting to Cloud...\x0D\x0A
2020-03-03T06:56:07.544Z DEBUG modem << D: IPv4 Address found 3.106.36.26\x0D\x0A
2020-03-03T06:56:07.776Z DEBUG modem << D: (0x20020aac): Created socket 2\x0D\x0A

  • Hello, 

    Thanks for the detailed ticket. I'm not able to reproduce at the moment. Can you please provide a modem trace as well?

    Thanks!

    Kind regards,
    Øyvind

  • Hi,

    Thanks for your response. Please find attached the modem trace and corresponding LTE link monitor output log. On second connection attempt when connect call is stuck the trace size did not increased further, I waited for 10 minutes and pressed the stop capture button.

    Regards.

    7178.trace-2020-03-03T14-25-58.427Z.bin

    2020-03-03T14:26:07.200Z INFO Application data folder: C:\Users\Temp\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2020-03-03T14:26:07.336Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
    2020-03-03T14:26:07.337Z DEBUG App path: C:\Users\Temp\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2020-03-03T14:26:07.337Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.2.0)
    2020-03-03T14:26:07.337Z DEBUG nRFConnect path: C:\Users\Temp\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-03-03T14:26:07.337Z DEBUG HomeDir: C:\Users\Temp
    2020-03-03T14:26:07.337Z DEBUG TmpDir: C:\Users\Temp\AppData\Local\Temp
    2020-03-03T14:26:10.524Z INFO Modem port is opened
    2020-03-03T14:26:10.541Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2020-03-03T14:26:16.342Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-03-03T14:26:16.352Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.365Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.369Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.372Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.376Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.401Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.410Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.413Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.417Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.420Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.423Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.432Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.435Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.437Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.443Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.449Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.453Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.457Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.460Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.488Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.490Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.492Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.496Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.498Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.501Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.506Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.510Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.517Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.520Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.521Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.523Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-03-03T14:26:16.524Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
    2020-03-03T14:26:16.528Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
    2020-03-03T14:26:16.531Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.533Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.535Z DEBUG modem << 02 NRF_RTC0             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.536Z DEBUG modem << 03 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.537Z DEBUG modem << 04 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.539Z DEBUG modem << 05 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.540Z DEBUG modem << 06 NRF_UARTE2           Secure\x09\x09SKIP\x0D\x0A
    2020-03-03T14:26:16.542Z DEBUG modem << 07 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.544Z DEBUG modem << 08 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.547Z DEBUG modem << 09 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.548Z DEBUG modem << 10 NRF_TIMER1           Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.552Z DEBUG modem << 11 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.556Z DEBUG modem << 12 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.557Z DEBUG modem << 13 NRF_PWM0             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.578Z DEBUG modem << 14 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.583Z DEBUG modem << 15 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.585Z DEBUG modem << 16 NRF_PWM3             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.587Z DEBUG modem << 17 NRF_WDT              Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.588Z DEBUG modem << 18 NRF_IPC              Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.590Z DEBUG modem << 19 NRF_VMC              Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.593Z DEBUG modem << 20 NRF_FPU              Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.595Z DEBUG modem << 21 NRF_EGU1             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.598Z DEBUG modem << 22 NRF_EGU2             Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.600Z DEBUG modem << 23 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.602Z DEBUG modem << 24 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
    2020-03-03T14:26:16.606Z DEBUG modem << 25 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A\x0D\x0A
    2020-03-03T14:26:16.613Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-03-03T14:26:16.616Z DEBUG modem << SPM: NS MSP at 0x20026858\x0D\x0A
    2020-03-03T14:26:16.618Z DEBUG modem << SPM: NS reset vector at 0xf801\x0D\x0A
    2020-03-03T14:26:16.620Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-03-03T14:26:16.742Z DEBUG modem << D: (0x20020ad0): Priority 90\x0D\x0A
    2020-03-03T14:26:16.750Z DEBUG modem << D: (0x20020ad0): Network L3 init done\x0D\x0A
    2020-03-03T14:26:16.752Z DEBUG modem << D: (0x20020ad0): \x0D\x0A
    2020-03-03T14:26:16.755Z DEBUG modem << D: (0x20020ad0): On iface 0x200292a0\x0D\x0A
    2020-03-03T14:26:16.758Z DEBUG modem << D: (0x20020ad0): \x0D\x0A
    2020-03-03T14:26:16.762Z DEBUG modem << D: (0x20020ad0): iface 0x200292a0\x0D\x0A
    2020-03-03T14:26:16.764Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
    2020-03-03T14:26:16.777Z DEBUG modem << I: UART check failed: 1. Dropping buffer and retrying.\x0D\x0A
    2020-03-03T14:26:16.787Z DEBUG modem << Cloud client has started with Modem Trace.\x0D\x0A
    2020-03-03T14:26:16.799Z DEBUG modem << Connecting to LTE network. This may take several minutes.\x0D\x0A
    2020-03-03T14:26:16.830Z DEBUG modem << D: Network mode: AT%XSYSTEMMODE=0,1,0,0\x0D\x0A
    2020-03-03T14:26:19.010Z DEBUG modem << +CEREG: 2,"27F2","00043B21",9,0,0,"11100000","11100000"\x0D\x0A
    2020-03-03T14:26:19.033Z DEBUG modem << D: Network registration status: 2\x0D\x0A
    2020-03-03T14:26:21.024Z DEBUG modem << +CEREG: 1,"27F2","00043B21",9,,,"11100000","11100000"\x0D\x0A
    2020-03-03T14:26:21.054Z DEBUG modem << D: Network registration status: 1\x0D\x0A
    2020-03-03T14:26:21.057Z DEBUG modem << Connected to LTE network\x0D\x0A
    2020-03-03T14:26:21.072Z DEBUG modem >> AT+COPS=3,2\x0D\x0A
    2020-03-03T14:26:21.079Z DEBUG modem << Connecting to Cloud...\x0D\x0A
    2020-03-03T14:26:21.086Z DEBUG modem << OK\x0D\x0A
    2020-03-03T14:26:21.111Z DEBUG modem >> AT+COPS?\x0D\x0A
    2020-03-03T14:26:21.148Z DEBUG modem << +COPS: 0,2,"29340",9\x0D\x0A
    2020-03-03T14:26:21.153Z DEBUG modem << OK\x0D\x0A
    2020-03-03T14:26:21.217Z DEBUG modem >> AT%XCBAND\x0D\x0A
    2020-03-03T14:26:21.244Z DEBUG modem << %XCBAND: 3\x0D\x0A
    2020-03-03T14:26:21.249Z DEBUG modem << OK\x0D\x0A
    2020-03-03T14:26:21.296Z DEBUG modem >> AT+CGDCONT?\x0D\x0A
    2020-03-03T14:26:21.323Z DEBUG modem << +CGDCONT: 0,"IPV4V6","internet.simobil.si","100.66.117.181 2A00:1A20:2100:31EF:B417:070C:044E:65CE",0,0\x0D\x0A
    2020-03-03T14:26:21.333Z DEBUG modem << OK\x0D\x0A
    2020-03-03T14:26:21.386Z DEBUG modem >> AT+CGACT?\x0D\x0A
    2020-03-03T14:26:21.398Z DEBUG modem << +CGACT: 0,1\x0D\x0A
    2020-03-03T14:26:21.401Z DEBUG modem << OK\x0D\x0A
    2020-03-03T14:26:21.517Z DEBUG modem << D: IPv4 Address found 13.211.230.91\x0D\x0A
    2020-03-03T14:26:21.524Z DEBUG modem << D: (0x20020ad0): Created socket 2\x0D\x0A
    2020-03-03T14:26:33.953Z DEBUG modem << D: (0x20020ad0): Connect completed\x0D\x0A
    2020-03-03T14:26:33.961Z DEBUG modem << D: (0x20020ad0): Encoding Protocol Description. Str:MQTT%c: (%p): << msg type:0x%02x length:0x%08x\x0D\x0A
    2020-03-03T14:26:33.964Z DEBUG modem <<  Size:00000004.\x0D\x0A
    2020-03-03T14:26:33.969Z DEBUG modem << D: (0x20020ad0): >> str_size:00000006 cur:0x20024f4a, end:0x20025045\x0D\x0A
    2020-03-03T14:26:33.974Z DEBUG modem << D: (0x20020ad0): >> val:0004 cur:0x20024f4a, end:0x20025045\x0D\x0A
    2020-03-03T14:26:33.979Z DEBUG modem << D: (0x20020ad0): Encoding Protocol Version 04.\x0D\x0A
    2020-03-03T14:26:33.996Z DEBUG modem << D: (0x20020ad0): >> val:04 cur:0x20024f50, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.001Z DEBUG modem << D: (0x20020ad0): >> val:00 cur:0x20024f51, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.006Z DEBUG modem << D: (0x20020ad0): Encoding Keep Alive Time 003c.\x0D\x0A
    2020-03-03T14:26:34.023Z DEBUG modem << D: (0x20020ad0): >> val:003c cur:0x20024f52, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.031Z DEBUG modem << D: (0x20020ad0): Encoding Client Id. Str:virtual-bin-1 Size:0000000d.\x0D\x0A
    2020-03-03T14:26:34.039Z DEBUG modem << D: (0x20020ad0): >> str_size:0000000f cur:0x20024f54, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.066Z DEBUG modem << D: (0x20020ad0): >> val:000d cur:0x20024f54, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.072Z DEBUG modem << D: (0x20020ad0): << msg type:0x10 length:0x00000019\x0D\x0A
    2020-03-03T14:26:34.077Z DEBUG modem << D: (0x20020ad0): >> length:0x00000019 cur:0x00000000, end:0x00000000\x0D\x0A
    2020-03-03T14:26:34.080Z DEBUG modem << D: (0x20020ad0): Fixed header length = 02\x0D\x0A
    2020-03-03T14:26:34.089Z DEBUG modem << D: (0x20020ad0): >> val:10 cur:0x20024f48, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.091Z DEBUG modem << D: (0x20020ad0): >> length:0x00000019 cur:0x20024f49, end:0x20025045\x0D\x0A
    2020-03-03T14:26:34.123Z DEBUG modem << D: (0x20020ad0): Connect completed\x0D\x0A
    2020-03-03T14:26:35.112Z DEBUG modem << D: (0x20020ad0): state:0x00000002\x0D\x0A
    2020-03-03T14:26:35.122Z DEBUG modem << D: (0x20020ad0): >> cur:0x20024e45, end:0x20024e47\x0D\x0A
    2020-03-03T14:26:35.124Z DEBUG modem << D: (0x20020ad0): << val:20\x0D\x0A
    2020-03-03T14:26:35.125Z DEBUG modem << D: (0x20020ad0): length:0x00000002\x0D\x0A
    2020-03-03T14:26:35.135Z DEBUG modem << D: (0x20020ad0): [CID 0x200202a0]: Received MQTT_PKT_TYPE_CONNACK!\x0D\x0A
    2020-03-03T14:26:35.138Z DEBUG modem << D: (0x20020ad0): >> cur:0x20024e47, end:0x20024e49\x0D\x0A
    2020-03-03T14:26:35.140Z DEBUG modem << D: (0x20020ad0): << val:00\x0D\x0A
    2020-03-03T14:26:35.142Z DEBUG modem << D: (0x20020ad0): >> cur:0x20024e48, end:0x20024e49\x0D\x0A
    2020-03-03T14:26:35.159Z DEBUG modem << D: (0x20020ad0): << val:00\x0D\x0A
    2020-03-03T14:26:35.188Z DEBUG modem << D: (0x20020ad0): [CID 0x200202a0]: session_present_flag: 0\x0D\x0A
    2020-03-03T14:26:35.190Z DEBUG modem << D: (0x20020ad0): [CID 0x200202a0]: return_code: 0\x0D\x0A
    2020-03-03T14:26:35.195Z DEBUG modem << D: MQTT client connected!\x0D\x0A
    2020-03-03T14:26:35.198Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/virtual-bin-1/shadow/get/accepted\x0D\x0A
    2020-03-03T14:26:35.209Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/virtual-bin-1/shadow/get/rejected\x0D\x0A
    2020-03-03T14:26:35.212Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/virtual-bin-1/shadow/update/accepted\x0D\x0A
    2020-03-03T14:26:35.214Z DEBUG modem << D: Subscribing to AWS shadow topic: $aws/things/virtual-bin-1/shadow/update/rejected\x0D\x0A
    2020-03-03T14:26:35.216Z DEBUG modem << D: (0x20020ad0): [CID 0x200202a0]:[State 0x06]: >> message id 0x5056 topic count 0x0004\x0D\x0A
    2020-03-03T14:26:35.227Z DEBUG modem << D: (0x20020ad0): >> val:5056 cur:0x20024f4a, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.229Z DEBUG modem << D: (0x20020ad0): >> str_size:0000002f cur:0x20024f4c, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.266Z DEBUG modem << D: (0x20020ad0): >> val:002d cur:0x20024f4c, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.278Z DEBUG modem << D: (0x20020ad0): >> val:01 cur:0x20024f7b, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.280Z DEBUG modem << D: (0x20020ad0): >> str_size:0000002f cur:0x20024f7c, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.283Z DEBUG modem << D: (0x20020ad0): >> val:002d cur:0x20024f7c, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.308Z DEBUG modem << D: (0x20020ad0): >> val:01 cur:0x20024fab, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.311Z DEBUG modem << D: (0x20020ad0): >> str_size:00000032 cur:0x20024fac, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.317Z DEBUG modem << D: (0x20020ad0): >> val:0030 cur:0x20024fac, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.324Z DEBUG modem << D: (0x20020ad0): >> val:01 cur:0x20024fde, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.328Z DEBUG modem << D: (0x20020ad0): >> str_size:00000032 cur:0x20024fdf, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.332Z DEBUG modem << D: (0x20020ad0): >> val:0030 cur:0x20024fdf, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.334Z DEBUG modem << D: (0x20020ad0): >> val:01 cur:0x20025011, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.336Z DEBUG modem << D: (0x20020ad0): << msg type:0x82 length:0x000000c8\x0D\x0A
    2020-03-03T14:26:35.337Z DEBUG modem << D: (0x20020ad0): >> length:0x000000c8 cur:0x00000000, end:0x00000000\x0D\x0A
    2020-03-03T14:26:35.370Z DEBUG modem << D: (0x20020ad0): Fixed header length = 03\x0D\x0A
    2020-03-03T14:26:35.373Z DEBUG modem << D: (0x20020ad0): >> val:82 cur:0x20024f47, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.377Z DEBUG modem << D: (0x20020ad0): >> length:0x000000c8 cur:0x20024f48, end:0x20025045\x0D\x0A
    2020-03-03T14:26:35.380Z DEBUG modem << D: (0x20020ad0): [0x200202a0]: Transport writing 203 bytes.\x0D\x0A
    2020-03-03T14:26:35.381Z DEBUG modem << D: (0x20020ad0): [0x200202a0]: Transport write complete.\x0D\x0A
    2020-03-03T14:26:35.384Z DEBUG modem << D: (0x20020ad0): [CID 0x200202a0]:[State 0x06]: << result 0x00000000\x0D\x0A
    2020-03-03T14:26:35.387Z DEBUG modem << CLOUD_EVT_CONNECTED\x0D\x0A
    2020-03-03T14:26:35.389Z DEBUG modem << CLOUD_EVT_READY\x0D\x0A
    2020-03-03T14:26:35.391Z DEBUG modem << Disconnecting from Cloud.\x0D\x0A
    2020-03-03T14:26:35.398Z DEBUG modem << D: (0x20020ad0): [0x200202a0]: Transport writing 2 bytes.\x0D\x0A
    2020-03-03T14:26:35.424Z DEBUG modem << D: (0x20020ad0): [0x200202a0]: Transport write complete.\x0D\x0A
    2020-03-03T14:26:35.427Z DEBUG modem << D: (0x20020ad0): Closing socket 2\x0D\x0A
    2020-03-03T14:26:35.429Z DEBUG modem << D: MQTT_EVT_DISCONNECT: result = 0\x0D\x0A
    2020-03-03T14:26:35.430Z DEBUG modem << CLOUD_EVT_DISCONNECTED\x0D\x0A
    2020-03-03T14:26:35.433Z DEBUG modem << Sleeping...\x0D\x0A
    2020-03-03T14:26:45.374Z DEBUG modem << Connecting to Cloud...\x0D\x0A
    2020-03-03T14:26:45.387Z DEBUG modem << D: IPv4 Address found 13.211.230.91\x0D
    2020-03-03T14:26:45.395Z DEBUG modem << D: (0x20020ad0): Created socket 2\x0D\x0A
    

  • An update from my side. I was able to reproduce the error here. Failing at the same time. I have got a modem trace and forwarded it to our R&D team. 

    Will get back to you when I know more. 

    -Øyvind

Related