Exploring Connectivity Options for AWS IoT: Do We Need IoT SIM Cards?

Hi,

      I am currently working with the nRF9160DK board, using SDK version 2.5.1, and I have encountered an issue regarding connectivity to the AWS IoT cloud.

I have successfully connected my board to MQTT and have been able to publish and subscribe to topics using a regular SIM card with a data pack,so I confirmed that internet connection is done. However, when attempting to connect to AWS IoT using the same SIM card in the provided sample code, I am experiencing connectivity issues.

I have ensured that I configured all necessary parameters in the sample code given, including:

  • CONFIG_AWS_IOT_BROKER_HOST_NAME
  • CONFIG_MQTT_HELPER_SEC_TAG
  • CONFIG_AWS_IOT_CLIENT_ID_STATIC

Despite this, I am not receiving the expected output,
After flashing the sample, we can receive those two lines in the image. I'm not getting the remaining lines.


and I'm uncertain whether the SIM card compatibility could be a factor, or if there might be an issue with my code implementation.

Could you please provide guidance on whether an IoT-specific SIM card (LTE-M or NB-IoT) is required for connecting to AWS IoT? Additionally, I would appreciate any insights or troubleshooting tips you may have regarding this connectivity issue.

Thank you in advance for your assistance.

Parents
  • Hi,

    Did you run unmodified AWS IoT sample?

    Can you provide full log which you get when running the sample?

    Best regards,
    Dejan

  • Hi,
        Yeah i used unmodified aws iot sample but just added few things like certificate related changes like below

    • CONFIG_AWS_IOT_BROKER_HOST_NAME
    • CONFIG_MQTT_HELPER_SEC_TAG
    • CONFIG_AWS_IOT_CLIENT_ID_STATIC
      my output

      my sample code main.c
      /*
       * Copyright (c) 2020 Nordic Semiconductor ASA
       *
       * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
       */
      
      #include <zephyr/kernel.h>
      #include <zephyr/sys/reboot.h>
      #include <zephyr/dfu/mcuboot.h>
      #include <zephyr/logging/log.h>
      #include <zephyr/logging/log_ctrl.h>
      #include <zephyr/net/conn_mgr_connectivity.h>
      #include <zephyr/net/conn_mgr_monitor.h>
      #include <net/aws_iot.h>
      #include <stdio.h>
      #include <stdlib.h>
      #include <hw_id.h>
      #include <modem/modem_info.h>
      
      #include "json_payload.h"
      
      /* Register log module */
      LOG_MODULE_REGISTER(aws_iot_sample, CONFIG_AWS_IOT_SAMPLE_LOG_LEVEL);
      
      /* Macros used to subscribe to specific Zephyr NET management events. */
      #define L4_EVENT_MASK (NET_EVENT_L4_CONNECTED | NET_EVENT_L4_DISCONNECTED)
      #define CONN_LAYER_EVENT_MASK (NET_EVENT_CONN_IF_FATAL_ERROR)
      
      #define MODEM_FIRMWARE_VERSION_SIZE_MAX 50
      
      /* Macro called upon a fatal error, reboots the device. */
      #define FATAL_ERROR()					\
      	LOG_ERR("Fatal error! Rebooting the device.");	\
      	LOG_PANIC();					\
      	IF_ENABLED(CONFIG_REBOOT, (sys_reboot(0)))
      
      /* Zephyr NET management event callback structures. */
      static struct net_mgmt_event_callback l4_cb;
      static struct net_mgmt_event_callback conn_cb;
      
      /* Forward declarations. */
      static void shadow_update_work_fn(struct k_work *work);
      static void connect_work_fn(struct k_work *work);
      static void aws_iot_event_handler(const struct aws_iot_evt *const evt);
      
      /* Work items used to control some aspects of the sample. */
      static K_WORK_DELAYABLE_DEFINE(shadow_update_work, shadow_update_work_fn);
      static K_WORK_DELAYABLE_DEFINE(connect_work, connect_work_fn);
      
      /* Static functions */
      
      static int app_topics_subscribe(void)
      {
      	int err;
      	static const char custom_topic[] = "iot/example";
      	static const char custom_topic_2[] = "iot/example_2";
      
      	const struct aws_iot_topic_data topics_list[CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT] = {
      		[0].str = custom_topic,
      		[0].len = strlen(custom_topic),
      		[1].str = custom_topic_2,
      		[1].len = strlen(custom_topic_2)
      	};
      
      	err = aws_iot_subscription_topics_add(topics_list, ARRAY_SIZE(topics_list));
      	if (err) {
      		LOG_ERR("aws_iot_subscription_topics_add, error: %d", err);
      		FATAL_ERROR();
      		return err;
      	}
      
      	return 0;
      }
      
      static int aws_iot_client_init(void)
      {
      	int err;
      	struct aws_iot_config config = { 0 };
      
      #if defined(CONFIG_AWS_IOT_SAMPLE_DEVICE_ID_USE_HW_ID)
      	char device_id[HW_ID_LEN] = { 0 };
      
      	/* Get unique hardware ID, can be used as AWS IoT MQTT broker device/client ID. */
      	err = hw_id_get(device_id, ARRAY_SIZE(device_id));
      	if (err) {
      		LOG_ERR("Failed to retrieve device ID, error: %d", err);
      		FATAL_ERROR();
      		return err;
      	}
      
      	/* To use HW ID as MQTT device/client ID set the CONFIG_AWS_IOT_CLIENT_ID_APP option.
      	 * Otherwise the ID set by CONFIG_AWS_IOT_CLIENT_ID_STATIC is used.
      	 */
      	config.client_id = device_id;
      	config.client_id_len = strlen(device_id);
      
      	LOG_INF("Hardware ID: %s", device_id);
      #endif /* CONFIG_AWS_IOT_SAMPLE_DEVICE_ID_USE_HW_ID */
      
      	err = aws_iot_init(&config, aws_iot_event_handler);
      	if (err) {
      		LOG_ERR("AWS IoT library could not be initialized, error: %d", err);
      		FATAL_ERROR();
      		return err;
      	}
      
      	/* Add application specific non-shadow topics to the AWS IoT library.
      	 * These topics will be subscribed to when connecting to the broker.
      	 */
      	err = app_topics_subscribe();
      	if (err) {
      		LOG_ERR("Adding application specific topics failed, error: %d", err);
      		FATAL_ERROR();
      		return err;
      	}
      
      	return 0;
      }
      
      /* System Workqueue handlers. */
      
      static void shadow_update_work_fn(struct k_work *work)
      {
      	int err;
      	char message[CONFIG_AWS_IOT_SAMPLE_JSON_MESSAGE_SIZE_MAX] = "NRF Device";
      	struct payload payload = {
      		.state.reported.uptime = k_uptime_get(),
      		.state.reported.app_version = CONFIG_AWS_IOT_SAMPLE_APP_VERSION,
      	};
      	struct aws_iot_data tx_data = {
      		.qos = MQTT_QOS_0_AT_MOST_ONCE,
      		.topic.type = AWS_IOT_SHADOW_TOPIC_UPDATE,
      	};
      
      	if (IS_ENABLED(CONFIG_MODEM_INFO)) {
      		char modem_version_temp[MODEM_FIRMWARE_VERSION_SIZE_MAX];
      
      		err = modem_info_get_fw_version(modem_version_temp,
      						ARRAY_SIZE(modem_version_temp));
      		if (err) {
      			LOG_ERR("modem_info_get_fw_version, error: %d", err);
      			FATAL_ERROR();
      			return;
      		}
      
      		payload.state.reported.modem_version = modem_version_temp;
      	}
      
      	err = json_payload_construct(message, sizeof(message), &payload);
      	if (err) {
      		LOG_ERR("json_payload_construct, error: %d", err);
      		FATAL_ERROR();
      		return;
      	}
      
      	tx_data.ptr = message;
      	tx_data.len = strlen(message);
      
      	LOG_INF("Publishing message: %s to AWS IoT shadow", message);
      
      	err = aws_iot_send(&tx_data);
      	if (err) {
      		LOG_ERR("aws_iot_send, error: %d", err);
      		FATAL_ERROR();
      		return;
      	}
      
      	(void)k_work_reschedule(&shadow_update_work,
      				K_SECONDS(CONFIG_AWS_IOT_SAMPLE_PUBLICATION_INTERVAL_SECONDS));
      }
      
      static void connect_work_fn(struct k_work *work)
      {
      	int err;
      
      	LOG_INF("Connecting to AWS IoT");
      
      	err = aws_iot_connect(NULL);
      	if (err) {
      		LOG_ERR("aws_iot_connect, error: %d", err);
      	}
      
      	LOG_INF("Next connection retry in %d seconds",
      		CONFIG_AWS_IOT_SAMPLE_CONNECTION_RETRY_TIMEOUT_SECONDS);
      
      	(void)k_work_reschedule(&connect_work,
      				K_SECONDS(CONFIG_AWS_IOT_SAMPLE_CONNECTION_RETRY_TIMEOUT_SECONDS));
      }
      
      /* Functions that are executed on specific connection-related events. */
      
      static void on_aws_iot_evt_connected(const struct aws_iot_evt *const evt)
      {
      	(void)k_work_cancel_delayable(&connect_work);
      
      	/* If persistent session is enabled, the AWS IoT library will not subscribe to any topics.
      	 * Topics from the last session will be used.
      	 */
      	if (evt->data.persistent_session) {
      		LOG_WRN("Persistent session is enabled, using subscriptions "
      			"from the previous session");
      	}
      
      	/* Mark image as working to avoid reverting to the former image after a reboot. */
      #if defined(CONFIG_BOOTLOADER_MCUBOOT)
      	boot_write_img_confirmed();
      #endif
      
      	/* Start sequential updates to AWS IoT. */
      	(void)k_work_reschedule(&shadow_update_work, K_NO_WAIT);
      }
      
      static void on_aws_iot_evt_disconnected(void)
      {
      	(void)k_work_cancel_delayable(&shadow_update_work);
      	(void)k_work_reschedule(&connect_work, K_SECONDS(5));
      }
      
      static void on_aws_iot_evt_fota_done(const struct aws_iot_evt *const evt)
      {
      	int err;
      
      	/* Tear down MQTT connection. */
      	(void)aws_iot_disconnect();
      	(void)k_work_cancel_delayable(&connect_work);
      
      	/* If modem FOTA has been carried out, the modem needs to be reinitialized.
      	 * This is carried out by bringing the network interface down/up.
      	 */
      	if (evt->data.image & DFU_TARGET_IMAGE_TYPE_ANY_MODEM) {
      		LOG_INF("Modem FOTA done, reinitializing the modem");
      
      		err = conn_mgr_all_if_down(true);
      		if (err) {
      			LOG_ERR("conn_mgr_all_if_down, error: %d", err);
      			FATAL_ERROR();
      			return;
      		}
      
      		err = conn_mgr_all_if_up(true);
      		if (err) {
      			LOG_ERR("conn_mgr_all_if_up, error: %d", err);
      			FATAL_ERROR();
      			return;
      		}
      
      	} else if (evt->data.image & DFU_TARGET_IMAGE_TYPE_ANY_APPLICATION) {
      		LOG_INF("Application FOTA done, rebooting");
      		IF_ENABLED(CONFIG_REBOOT, (sys_reboot(0)));
      	} else {
      		LOG_WRN("Unexpected FOTA image type");
      	}
      }
      
      static void on_net_event_l4_connected(void)
      {
      	(void)k_work_reschedule(&connect_work, K_SECONDS(5));
      }
      
      static void on_net_event_l4_disconnected(void)
      {
      	(void)aws_iot_disconnect();
      	(void)k_work_cancel_delayable(&connect_work);
      	(void)k_work_cancel_delayable(&shadow_update_work);
      }
      
      /* Event handlers */
      
      static void aws_iot_event_handler(const struct aws_iot_evt *const evt)
      {
      	switch (evt->type) {
      	case AWS_IOT_EVT_CONNECTING:
      		LOG_INF("AWS_IOT_EVT_CONNECTING");
      		break;
      	case AWS_IOT_EVT_CONNECTED:
      		LOG_INF("AWS_IOT_EVT_CONNECTED");
      		on_aws_iot_evt_connected(evt);
      		break;
      	case AWS_IOT_EVT_READY:
      		LOG_INF("AWS_IOT_EVT_READY");
      		break;
      	case AWS_IOT_EVT_DISCONNECTED:
      		LOG_INF("AWS_IOT_EVT_DISCONNECTED");
      		on_aws_iot_evt_disconnected();
      		break;
      	case AWS_IOT_EVT_DATA_RECEIVED:
      		LOG_INF("AWS_IOT_EVT_DATA_RECEIVED");
      
      		LOG_INF("Received message: \"%.*s\" on topic: \"%.*s\"", evt->data.msg.len,
      									 evt->data.msg.ptr,
      									 evt->data.msg.topic.len,
      									 evt->data.msg.topic.str);
      		break;
      	case AWS_IOT_EVT_PUBACK:
      		LOG_INF("AWS_IOT_EVT_PUBACK, message ID: %d", evt->data.message_id);
      		break;
      	case AWS_IOT_EVT_PINGRESP:
      		LOG_INF("AWS_IOT_EVT_PINGRESP");
      		break;
      	case AWS_IOT_EVT_FOTA_START:
      		LOG_INF("AWS_IOT_EVT_FOTA_START");
      		break;
      	case AWS_IOT_EVT_FOTA_ERASE_PENDING:
      		LOG_INF("AWS_IOT_EVT_FOTA_ERASE_PENDING");
      		break;
      	case AWS_IOT_EVT_FOTA_ERASE_DONE:
      		LOG_INF("AWS_FOTA_EVT_ERASE_DONE");
      		break;
      	case AWS_IOT_EVT_FOTA_DONE:
      		LOG_INF("AWS_IOT_EVT_FOTA_DONE");
      		on_aws_iot_evt_fota_done(evt);
      		break;
      	case AWS_IOT_EVT_FOTA_DL_PROGRESS:
      		LOG_INF("AWS_IOT_EVT_FOTA_DL_PROGRESS, (%d%%)", evt->data.fota_progress);
      		break;
      	case AWS_IOT_EVT_ERROR:
      		LOG_INF("AWS_IOT_EVT_ERROR, %d", evt->data.err);
      		break;
      	case AWS_IOT_EVT_FOTA_ERROR:
      		LOG_INF("AWS_IOT_EVT_FOTA_ERROR");
      		break;
      	default:
      		LOG_WRN("Unknown AWS IoT event type: %d", evt->type);
      		break;
      	}
      }
      
      static void l4_event_handler(struct net_mgmt_event_callback *cb,
      			     uint32_t event,
      			     struct net_if *iface)
      {
      	switch (event) {
      	case NET_EVENT_L4_CONNECTED:
      		LOG_INF("Network connectivity established");
      		on_net_event_l4_connected();
      		break;
      	case NET_EVENT_L4_DISCONNECTED:
      		LOG_INF("Network connectivity lost");
      		on_net_event_l4_disconnected();
      		break;
      	default:
      		/* Don't care */
      		return;
      	}
      }
      
      static void connectivity_event_handler(struct net_mgmt_event_callback *cb,
      				       uint32_t event,
      				       struct net_if *iface)
      {
      	if (event == NET_EVENT_CONN_IF_FATAL_ERROR) {
      		LOG_ERR("NET_EVENT_CONN_IF_FATAL_ERROR");
      		FATAL_ERROR();
      		return;
      	}
      }
      
      int main(void)
      {
      	LOG_INF("The AWS IoT sample started, version: %s", CONFIG_AWS_IOT_SAMPLE_APP_VERSION);
      
      	int err;
      
      	/* Setup handler for Zephyr NET Connection Manager events. */
      	net_mgmt_init_event_callback(&l4_cb, l4_event_handler, L4_EVENT_MASK);
      	net_mgmt_add_event_callback(&l4_cb);
      
      	/* Setup handler for Zephyr NET Connection Manager Connectivity layer. */
      	net_mgmt_init_event_callback(&conn_cb, connectivity_event_handler, CONN_LAYER_EVENT_MASK);
      	net_mgmt_add_event_callback(&conn_cb);
      
      	/* Connecting to the configured connectivity layer.
      	 * Wi-Fi or LTE depending on the board that the sample was built for.
      	 */
      	LOG_INF("Bringing network interface up and connecting to the network");
      
      	err = conn_mgr_all_if_up(true);
      	if (err) {
      		LOG_ERR("conn_mgr_all_if_up, error: %d", err);
      		FATAL_ERROR();
      		return err;
      	}
      
      	err = aws_iot_client_init();
      	if (err) {
      		LOG_ERR("aws_iot_client_init, error: %d", err);
      		FATAL_ERROR();
      		return err;
      	}
      
      	/* Resend connection status if the sample is built for QEMU x86.
      	 * This is necessary because the network interface is automatically brought up
      	 * at SYS_INIT() before main() is called.
      	 * This means that NET_EVENT_L4_CONNECTED fires before the
      	 * appropriate handler l4_event_handler() is registered.
      	 */
      	if (IS_ENABLED(CONFIG_BOARD_QEMU_X86)) {
      		conn_mgr_mon_resend_status();
      	}
      
      	return 0;
      }
      


    and prj.conf

    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # General
    CONFIG_LOG=y
    CONFIG_LOG_BUFFER_SIZE=2048
    CONFIG_HW_ID_LIBRARY=y
    CONFIG_ASSERT=y
    CONFIG_JSON_LIBRARY=y
    
    # Heap and stacks
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=y
    CONFIG_NET_IPV4=y
    CONFIG_NET_CONNECTION_MANAGER=y
    
    # AWS IoT library
    CONFIG_AWS_IOT_CLIENT_ID_MAX_LEN=50
    CONFIG_AWS_IOT=y
    CONFIG_AWS_IOT_CLIENT_ID_STATIC="iotconsole-0fa49f1f-46d5-4d99-8753-fe7983a9352f"
    CONFIG_AWS_IOT_BROKER_HOST_NAME="a3dnd3kgq72p80-ats.iot.us-east-2.amazonaws.com"
    CONFIG_AWS_IOT_SEC_TAG=78534251
    CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=2
    CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_LAST_WILL=y
    
    # MQTT - Maximum MQTT keepalive timeout specified by AWS IoT Core
    CONFIG_MQTT_KEEPALIVE=1200
    CONFIG_MQTT_CLEAN_SESSION=y
    

    and additionally i added like this my certificates here is it right or wrong way.
    where could be the issue ?


    If sim not problem is it problem from certificate side or anything else?

  • Hi,

    Which board did you build for? What was your build target? Could you provide your build command?

    Best regards,
    Dejan

  • Hi,

    I'm using the nRF9160DK board version 1.1.0. In my Visual Studio Code build configuration, I've set the board to "nrf9160dk_nrf9160_ns" and the revision to "1.1.0". I've also configured the project by selecting the "prj.conf" option in the configuration settings. I select the "Build after generating configuration" checkbox, and the build starts automatically. I didn't input any explicit build command, as it's handled within the Visual Studio Code environment based on the configured settings.

    Let me know if you need any further information.

  • Hi,

    Do you have any other nrf9160-dk board which you could use to test unmodified AWS IoT sample in NCS v2.6.0?

    Best regards,
    Dejan

  • Hi,
       

    Thank you for your response. I've indeed attempted the AWS IoT sample on another NRF9160-DK board, and unfortunately, encountered the same issue with the two-line output even after removing the SIM card.

    Regarding the asset tracking output, I'm pleased to share that after updating the board controller hex file for external flash, I'm now able to successfully obtain the asset tracking output. As per our previous conversation where you requested the asset tracking sample code output log, I've attached the log output for your reference.

    [00:10:01.291,931] <inf> app_event_manager: APP_EVT_DATA_GET_ALL
    [00:10:01.292,572] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, LOCATION)
    [00:10:01.293,334] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:10:01.294,616] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:10:01.294,952] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:10:01.379,760] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    *** Booting nRF Connect SDK d96769faceca ***
    Attempting to boot slot 0.
    Attempting to boot from address 0x8200.
    Verifying signature against key 0.
    Hash: 0xb0...7c
    Firmware signature verified.
    Firmware version 1
    *** Booting nRF Connect SDK d96769faceca ***
    *** Booting nRF Connect SDK d96769faceca ***
    [00:00:00.255,218] <inf> app_event_manager: APP_EVT_START
    [00:00:00.492,248] <inf> nrf_modem_lib_trace: Trace thread ready
    [00:00:00.499,877] <inf> nrf_modem_lib_trace: Trace level override: 2
    [00:00:00.500,122] <inf> app_event_manager: MODEM_EVT_INITIALIZED
    [00:00:00.566,894] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTING
    [00:00:01.291,137] <inf> app_event_manager: DATA_EVT_CONFIG_INIT
    %CESQ: 64,3,18,2
    +CEREG: 2,"4006","034A1710",7
    [00:00:02.095,764] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    +CSCON: 1
    %CESQ: 67,3,24,3
    +CGEV: ME PDN ACT 0,0
    [00:00:03.307,098] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
    [00:00:03.308,593] <inf> app_event_manager: CLOUD_EVT_CONNECTING
    +CNEC_ESM: 50,0
    %MDMEV: SEARCH STATUS 2
    +CEREG: 1,"4006","034A1710",7,,,"00001010","11000001"
    %XTIME: "0A","4240511154630A","01"
    [00:00:03.413,665] <inf> app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
    [00:00:03.414,367] <inf> app_event_manager: DATA_EVT_DATE_TIME_OBTAINED
    [00:00:06.450,622] <inf> app_event_manager: CLOUD_EVT_CONFIG_RECEIVED
    [00:00:06.454,986] <inf> app_event_manager: DATA_EVT_CONFIG_SEND
    [00:00:06.456,146] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:00:07.168,792] <inf> app_event_manager: CLOUD_EVT_CONNECTED
    [00:00:07.170,104] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, MOD_STAT, BAT, ENV, LOCATION)
    [00:00:07.170,928] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:00:07.172,790] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:00:07.173,675] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:00:07.174,407] <inf> app_event_manager: LOCATION_MODULE_EVT_AGNSS_NEEDED
    [00:00:07.242,919] <inf> app_event_manager: MODEM_EVT_MODEM_STATIC_DATA_READY
    *** Booting nRF Connect SDK d96769faceca ***
    Attempting to boot slot 0.
    Attempting to boot from address 0x8200.
    Verifying signature against key 0.
    Hash: 0xb0...7c
    Firmware signature verified.
    Firmware version 1
    Setting monotonic counter (version: 1, slot: 0)
    *** Booting nRF Connect SDK d96769faceca ***
    *** Booting nRF Connect SDK d96769faceca ***
    [00:00:00.255,218] <inf> app_event_manager: APP_EVT_START
    [00:00:00.492,156] <inf> nrf_modem_lib_trace: Trace thread ready
    [00:00:00.499,786] <inf> nrf_modem_lib_trace: Trace level override: 2
    [00:00:00.500,030] <inf> app_event_manager: MODEM_EVT_INITIALIZED
    [00:00:00.573,120] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTING
    [00:00:01.291,320] <inf> app_event_manager: DATA_EVT_CONFIG_INIT
    %CESQ: 65,3,19,2
    +CEREG: 2,"4006","034A1710",7
    [00:00:01.732,849] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    +CSCON: 1
    %CESQ: 67,3,24,3
    +CGEV: ME PDN ACT 0,0
    [00:00:02.945,678] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
    [00:00:02.947,174] <inf> app_event_manager: CLOUD_EVT_CONNECTING
    +CNEC_ESM: 50,0
    %MDMEV: SEARCH STATUS 2
    +CEREG: 1,"4006","034A1710",7,,,"00001010","11000001"
    [00:00:02.951,934] <inf> app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
    %XTIME: "0A","4240511164630A","01"
    [00:00:02.967,803] <inf> app_event_manager: DATA_EVT_DATE_TIME_OBTAINED
    [00:00:06.169,799] <inf> app_event_manager: CLOUD_EVT_CONFIG_RECEIVED
    [00:00:06.174,011] <inf> app_event_manager: DATA_EVT_CONFIG_SEND
    [00:00:06.175,170] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:00:06.904,205] <inf> app_event_manager: CLOUD_EVT_CONNECTED
    [00:00:06.905,548] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, MOD_STAT, BAT, ENV, LOCATION)
    [00:00:06.906,372] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:00:06.908,203] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:00:06.909,210] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:00:06.909,881] <inf> app_event_manager: LOCATION_MODULE_EVT_AGNSS_NEEDED
    [00:00:06.976,959] <inf> app_event_manager: MODEM_EVT_MODEM_STATIC_DATA_READY
    [00:00:07.091,125] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    +CSCON: 0
    %CESQ: 255,0,255,0
    [00:01:41.526,763] <wrn> location: GNSS timed out possibly due to too short GNSS time windows
    %CESQ: 65,3,17,2
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,5110,49,70,27,101753,0
    %CESQ: 255,0,255,0
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,0,5110,49,70,26,102050,0,0,"0052A40C","310260","A2E3",65535,0,1026,22,37,23,102059,0,0
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,0,5110,49,70,28,103924,0,0,"0052A40C","310260","A2E3",65535,0,1026,22,37,25,103933,0,0,"02982901","311580","1101",65535,0,5035,354,59,24,103942,0,0,"0328CB03","311480","CF03",65535,0,5230,146,54,24,103999,0,0
    [00:01:44.459,838] <inf> app_event_manager: LOCATION_MODULE_EVT_CLOUD_LOCATION_DATA_READY
    [00:01:44.460,510] <inf> app_event_manager: DATA_EVT_DATA_READY
    [00:01:44.471,649] <inf> app_event_manager: DATA_EVT_CLOUD_LOCATION_DATA_SEND
    [00:01:44.475,891] <inf> app_event_manager: DATA_EVT_DATA_SEND_BATCH
    [00:01:44.476,684] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:01:44.476,928] <inf> app_event_manager: CLOUD_EVT_CLOUD_LOCATION_UNKNOWN
    [00:01:44.477,630] <inf> app_event_manager: LOCATION_MODULE_EVT_INACTIVE
    [00:01:44.478,851] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    %CESQ: 64,3,18,2
    %MDMEV: SEARCH STATUS 2
    +CSCON: 1
    %CESQ: 66,3,23,3
    +CSCON: 0
    %CESQ: 255,0,255,0
    [00:05:01.291,931] <inf> app_event_manager: APP_EVT_DATA_GET_ALL
    [00:05:01.292,572] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, LOCATION)
    [00:05:01.293,334] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:05:01.294,616] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:05:01.294,982] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:05:01.382,965] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    %CESQ: 64,3,16,2
    %CESQ: 68,3,25,3
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,5110,49,70,28,392314,0
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,0,5110,49,70,26,392545,0,0,"02982901","311580","1101",65535,0,5035,354,60,11,392553,0,0,"0052A40C","310260","A2E3",65535,0,1026,22,36,23,392562,0,0,"0328CB03","311480","CF03",65535,0,5230,146,53,27,392619,0,0
    [00:06:33.092,926] <inf> app_event_manager: LOCATION_MODULE_EVT_CLOUD_LOCATION_DATA_READY
    [00:06:33.093,597] <inf> app_event_manager: DATA_EVT_DATA_READY
    [00:06:33.104,797] <inf> app_event_manager: DATA_EVT_CLOUD_LOCATION_DATA_SEND
    [00:06:33.109,161] <inf> app_event_manager: DATA_EVT_DATA_SEND_BATCH
    [00:06:33.109,924] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:06:33.110,168] <inf> app_event_manager: CLOUD_EVT_CLOUD_LOCATION_UNKNOWN
    [00:06:33.110,900] <inf> app_event_manager: LOCATION_MODULE_EVT_INACTIVE
    [00:06:33.112,121] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    %CESQ: 64,3,17,2
    %MDMEV: SEARCH STATUS 2
    +CSCON: 1
    %CESQ: 66,3,23,3
    +CSCON: 0
    +CSCON: 1
    +CSCON: 0
    %CESQ: 255,0,255,0
    [00:10:01.291,931] <inf> app_event_manager: APP_EVT_DATA_GET_ALL
    [00:10:01.292,572] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, LOCATION)
    [00:10:01.293,334] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:10:01.294,616] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:10:01.294,952] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:10:01.383,666] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    %CESQ: 63,3,18,2
    %CESQ: 68,3,25,3
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,5110,49,70,28,691834,0
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,0,5110,49,70,27,692065,0,0,"02982901","311580","1101",65535,0,5035,354,59,22,692074,0,0,"0052A40C","310260","A2E3",65535,0,1026,22,36,23,692083,0,0,"0328CB03","311480","CF03",65535,0,5230,146,53,26,692140,0,0
    [00:11:32.625,976] <inf> app_event_manager: LOCATION_MODULE_EVT_CLOUD_LOCATION_DATA_READY
    [00:11:32.626,770] <inf> app_event_manager: DATA_EVT_DATA_READY
    [00:11:32.637,908] <inf> app_event_manager: DATA_EVT_CLOUD_LOCATION_DATA_SEND
    [00:11:32.642,150] <inf> app_event_manager: DATA_EVT_DATA_SEND_BATCH
    [00:11:32.642,944] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:11:32.643,188] <inf> app_event_manager: CLOUD_EVT_CLOUD_LOCATION_UNKNOWN
    [00:11:32.643,890] <inf> app_event_manager: LOCATION_MODULE_EVT_INACTIVE
    [00:11:32.645,111] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    %CESQ: 65,3,17,2
    %MDMEV: SEARCH STATUS 2
    +CSCON: 1
    %CESQ: 66,3,23,3
    +CSCON: 0
    %CESQ: 255,0,255,0
    [00:15:01.291,931] <inf> app_event_manager: APP_EVT_DATA_GET_ALL
    [00:15:01.292,572] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, LOCATION)
    [00:15:01.293,334] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:15:01.294,616] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:15:01.294,952] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:15:01.381,439] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    %CESQ: 64,3,18,2
    %CESQ: 68,3,25,3
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,5110,49,70,28,991354,0
    %NCELLMEAS: 0,"034A1710","310410","4006",65535,0,5110,49,70,28,991584,0,0,"02982901","311580","1101",65535,0,5035,354,59,24,991593,0,0,"0052A40C","310260","A2E3",65535,0,1026,22,36,16,991602,0,0,"0328CB03","311480","CF03",65535,0,5230,146,53,14,991659,0,0
    [00:16:32.158,447] <inf> app_event_manager: LOCATION_MODULE_EVT_CLOUD_LOCATION_DATA_READY
    [00:16:32.159,149] <inf> app_event_manager: DATA_EVT_DATA_READY
    [00:16:32.170,379] <inf> app_event_manager: DATA_EVT_CLOUD_LOCATION_DATA_SEND
    [00:16:32.174,713] <inf> app_event_manager: DATA_EVT_DATA_SEND_BATCH
    [00:16:32.175,506] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:16:32.175,750] <inf> app_event_manager: CLOUD_EVT_CLOUD_LOCATION_UNKNOWN
    [00:16:32.176,483] <inf> app_event_manager: LOCATION_MODULE_EVT_INACTIVE
    [00:16:32.177,703] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    %CESQ: 64,3,16,2
    %MDMEV: SEARCH STATUS 2
    +CSCON: 1
    %CESQ: 67,3,23,3
    +CSCON: 0
    %CESQ: 255,0,255,0
    [00:20:01.291,931] <inf> app_event_manager: APP_EVT_DATA_GET_ALL
    [00:20:01.292,572] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, LOCATION)
    [00:20:01.293,426] <inf> app_event_manager: LOCATION_MODULE_EVT_ACTIVE
    [00:20:01.294,708] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:20:01.295,043] <inf> app_event_manager: SENSOR_EVT_FUEL_GAUGE_NOT_SUPPORTED
    [00:20:01.382,537] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY

    However, I'm facing difficulties with AWS IoT connectivity. Despite the successful asset tracking output, the AWS IoT sample seems unable to connect. Could you provide guidance on what might be causing this issue based on the information provided?

  • Hi,

    In order to check if there is a problem with your SIM card, you could try to program at_client sample and execute the following AT commands: %XSYSTEMMODE, +CFUN, %XSIM, +CEREG, %MDMEV, +CIMI, %XICCID and +CNUM.
    For more information about AT commands, you can follow the link nrf9160 AT Command Reference Guide.

    Best regards,
    Dejan

Reply Children
  • Hi,

    I appreciate your guidance on using the AT_client sample and running specific AT commands to diagnose any potential SIM card issues on the NRF9160DK board. However, I have a query regarding the suspicion of a SIM card issue, especially considering that the NRF multiservice code and asset tracking code are connecting without apparent issues.

    Attached below log , you'll find the outputs of the AT commands you've recommended execpt +CNUM: %XSYSTEMMODE, +CFUN, %XSIM, +CEREG, %MDMEV, +CIMI, and %XICCID. I would appreciate it if you could review these outputs and verify if there are any anomalies or issues that might indicate a problem with the SIM card or modem functionality.

    07:13:00.531	Error: 'AT+CFUN=4 ' timed out
    07:13:51.967	Error: AT%XSYSTEMMODE failed: phone failure
    07:14:28.151	Error: AT%XSYSTEMMODE=1 failed: phone failure
    AT%XSIM?%XSIM: 1
    OK
    
    2024-04-16T13:28:22.748Z DEBUG modem >> AT%XSYSTEMMODE?
    2024-04-16T13:28:22.786Z DEBUG modem << %XSYSTEMMODE: 1,0,1,0
    2024-04-16T13:28:22.789Z DEBUG modem << OK
    
    
    2024-04-16T12:54:30.607Z DEBUG modem >> AT%XSIM=1
    2024-04-16T12:54:30.633Z DEBUG modem << OK
    2024-04-16T12:54:30.643Z DEBUG modem >> AT%XSIM?
    2024-04-16T12:54:30.661Z DEBUG modem << %XSIM: 1
    2024-04-16T12:54:30.665Z DEBUG modem << OK
    2024-04-16T12:54:30.673Z DEBUG modem >> AT+CPIN?
    2024-04-16T12:54:30.692Z DEBUG modem << +CPIN: READY
    2024-04-16T12:54:30.696Z DEBUG modem << OK
    2024-04-16T12:54:30.707Z DEBUG modem >> AT+CPINR="SIM PIN"
    2024-04-16T12:54:30.742Z DEBUG modem << +CPINR: "SIM PIN",3
    2024-04-16T12:54:30.747Z DEBUG modem << OK
    2024-04-16T12:54:30.755Z DEBUG modem >> AT+CIMI
    2024-04-16T12:54:30.780Z DEBUG modem << 310170424406460
    2024-04-16T12:54:30.783Z DEBUG modem << OK
    2024-04-16T12:54:30.786Z INFO IMSIdentity: 310170424406460
    2024-04-16T12:54:43.223Z DEBUG modem >> AT+CFUN=21
    2024-04-16T12:54:43.253Z DEBUG modem << OK
    2024-04-16T12:56:33.575Z DEBUG modem >> AT%XSIM=1
    2024-04-16T12:56:33.606Z DEBUG modem << OK
    2024-04-16T12:57:33.966Z DEBUG modem >> AT%XSIM?
    2024-04-16T12:57:34.018Z DEBUG modem << %XSIM: 1
    2024-04-16T12:57:34.034Z DEBUG modem << OK
    2024-04-16T12:57:34.055Z DEBUG modem >> AT+CPIN?
    2024-04-16T12:57:34.078Z DEBUG modem << +CPIN: READY
    2024-04-16T12:57:34.085Z DEBUG modem << OK
    2024-04-16T12:57:34.104Z DEBUG modem >> AT+CPINR="SIM PIN"
    2024-04-16T12:57:34.141Z DEBUG modem << +CPINR: "SIM PIN",3
    2024-04-16T12:57:34.147Z DEBUG modem << OK
    2024-04-16T12:57:34.176Z DEBUG modem >> AT+CIMI
    2024-04-16T12:57:34.208Z DEBUG modem << 310170424406460
    2024-04-16T12:57:34.216Z DEBUG modem << OK
    2024-04-16T12:57:34.220Z INFO IMSIdentity: 310170424406460
    
    
    2024-04-16T13:35:38.446Z DEBUG modem >> AT+CFUN?
    2024-04-16T13:35:38.484Z DEBUG modem << +CFUN: 1
    2024-04-16T13:35:38.498Z DEBUG modem << OK
    2024-04-16T13:35:38.534Z DEBUG modem >> AT+CGSN=1
    2024-04-16T13:35:38.590Z DEBUG modem << +CGSN: "351516172687873"
    2024-04-16T13:35:38.594Z DEBUG modem << OK
    2024-04-16T13:35:38.616Z DEBUG modem >> AT+CGMI
    2024-04-16T13:35:38.639Z DEBUG modem << Nordic Semiconductor ASA
    2024-04-16T13:35:38.642Z DEBUG modem << OK
    2024-04-16T13:35:38.672Z DEBUG modem >> AT+CGMM
    2024-04-16T13:35:38.720Z DEBUG modem << nRF9160-SICA
    2024-04-16T13:35:38.724Z DEBUG modem << OK
    2024-04-16T13:35:38.727Z DEBUG modem >> AT+CGMR
    2024-04-16T13:35:38.760Z DEBUG modem << mfw_nrf9160_1.3.6
    2024-04-16T13:35:38.764Z DEBUG modem << OK
    2024-04-16T13:35:38.768Z INFO Nordic Semiconductor ASA nRF9160-SICA [mfw_nrf9160_1.3.6] SerNr: 351516172687873
    2024-04-16T13:35:38.769Z DEBUG modem >> AT+CEMODE?
    2024-04-16T13:35:38.793Z DEBUG modem << +CEMODE: 2
    2024-04-16T13:35:38.797Z DEBUG modem << OK
    2024-04-16T13:35:38.806Z DEBUG modem >> AT%XCBAND=?
    2024-04-16T13:35:38.836Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,18,19,20,25,26,28,66)
    2024-04-16T13:35:38.842Z DEBUG modem << OK
    2024-04-16T13:35:38.852Z DEBUG modem >> AT+CMEE?
    2024-04-16T13:35:38.884Z DEBUG modem << +CMEE: 1
    2024-04-16T13:35:38.889Z DEBUG modem << OK
    2024-04-16T13:35:38.893Z DEBUG modem >> AT+CNEC?
    2024-04-16T13:35:38.918Z DEBUG modem << +CNEC: 24
    2024-04-16T13:35:38.922Z DEBUG modem << OK
    2024-04-16T13:35:38.951Z DEBUG modem >> AT+CGEREP?
    2024-04-16T13:35:38.992Z DEBUG modem << +CGEREP: 1,0
    2024-04-16T13:35:38.998Z DEBUG modem << OK
    2024-04-16T13:35:39.005Z DEBUG modem >> AT+CIND=1,1,1
    2024-04-16T13:35:39.041Z DEBUG modem << OK
    2024-04-16T13:35:39.046Z DEBUG modem >> AT+CEREG=5
    2024-04-16T13:35:39.073Z DEBUG modem << OK
    2024-04-16T13:35:39.077Z DEBUG modem >> AT+CEREG?
    2024-04-16T13:35:39.112Z DEBUG modem << +CEREG: 5,1,"4006","034A1710",7,,,"11100000","11100000"
    2024-04-16T13:35:39.118Z DEBUG modem << OK
    2024-04-16T13:35:39.146Z DEBUG modem >> AT+COPS=3,2
    2024-04-16T13:35:39.196Z DEBUG modem << OK
    2024-04-16T13:35:39.228Z DEBUG modem >> AT+COPS?
    2024-04-16T13:35:39.268Z DEBUG modem << +COPS: 0,2,"310410",7
    2024-04-16T13:35:39.275Z DEBUG modem << OK
    2024-04-16T13:35:39.305Z DEBUG modem >> AT%XCBAND
    2024-04-16T13:35:39.329Z DEBUG modem << %XCBAND: 12
    2024-04-16T13:35:39.332Z DEBUG modem << OK
    2024-04-16T13:35:39.362Z DEBUG modem >> AT+CGDCONT?
    2024-04-16T13:35:39.402Z DEBUG modem << +CGDCONT: 0,"IP","m2m.com.attz","10.163.59.3",0,0
    2024-04-16T13:35:39.409Z DEBUG modem << OK
    2024-04-16T13:35:39.421Z DEBUG modem >> AT+CGACT?
    2024-04-16T13:35:39.450Z DEBUG modem << +CGACT: 0,1
    2024-04-16T13:35:39.454Z DEBUG modem << OK
    2024-04-16T13:35:39.483Z DEBUG modem >> AT%CESQ=1
    2024-04-16T13:35:39.512Z DEBUG modem << OK
    2024-04-16T13:35:39.547Z DEBUG modem >> AT+CESQ
    2024-04-16T13:35:39.583Z DEBUG modem << +CESQ: 99,99,255,255,21,65
    2024-04-16T13:35:39.590Z DEBUG modem << OK
    2024-04-16T13:35:39.621Z DEBUG modem >> AT%XSIM=1
    2024-04-16T13:35:39.657Z DEBUG modem << OK
    2024-04-16T13:35:39.682Z DEBUG modem >> AT%XSIM?
    2024-04-16T13:35:39.719Z DEBUG modem << %XSIM: 1
    2024-04-16T13:35:39.727Z DEBUG modem << OK
    2024-04-16T13:35:39.740Z DEBUG modem >> AT+CPIN?
    2024-04-16T13:35:39.766Z DEBUG modem << +CPIN: READY
    2024-04-16T13:35:39.771Z DEBUG modem << OK
    2024-04-16T13:35:39.798Z DEBUG modem >> AT+CPINR="SIM PIN"
    2024-04-16T13:35:39.835Z DEBUG modem << +CPINR: "SIM PIN",3
    2024-04-16T13:35:39.842Z DEBUG modem << OK
    2024-04-16T13:35:39.874Z DEBUG modem >> AT+CIMI
    2024-04-16T13:35:39.917Z DEBUG modem << 310170424406460
    2024-04-16T13:35:39.921Z DEBUG modem << OK
    2024-04-16T13:35:39.925Z INFO IMSIdentity: 310170424406460
    
    
    
    2024-04-16T13:03:16.668Z DEBUG modem >> AT+CEREG?
    2024-04-16T13:03:16.706Z DEBUG modem << +CEREG: 5,1,"4006","034A1710",7,,,"11100000","11100000"
    2024-04-16T13:03:16.725Z DEBUG modem << OK
    2024-04-16T13:03:16.728Z DEBUG modem >> AT+COPS=3,2
    2024-04-16T13:03:16.753Z DEBUG modem << OK
    2024-04-16T13:03:16.759Z DEBUG modem >> AT+COPS?
    2024-04-16T13:03:16.791Z DEBUG modem << +COPS: 0,2,"310410",7
    2024-04-16T13:03:16.797Z DEBUG modem << OK
    2024-04-16T13:03:16.827Z DEBUG modem >> AT%XCBAND
    2024-04-16T13:03:16.849Z DEBUG modem << %XCBAND: 12
    2024-04-16T13:03:16.854Z DEBUG modem << OK
    2024-04-16T13:03:16.865Z DEBUG modem >> AT+CGDCONT?
    2024-04-16T13:03:16.893Z DEBUG modem << +CGDCONT: 0,"IP","m2m.com.attz","10.180.114.132",0,0
    2024-04-16T13:03:16.899Z DEBUG modem << OK
    2024-04-16T13:03:16.928Z DEBUG modem >> AT+CGACT?
    2024-04-16T13:03:16.952Z DEBUG modem << +CGACT: 0,1
    2024-04-16T13:03:16.957Z DEBUG modem << OK
    
    AT%MDMEV=1
    OK
    
    
    2024-04-16T14:56:11.902Z DEBUG modem >> AT%XICCID=890117124244064608
    2024-04-16T14:56:11.938Z DEBUG modem << %XICCID: 89011712274244064608
    2024-04-16T14:56:11.942Z DEBUG modem << OK

    Your expertise in this matter is invaluable, and I look forward to your insights and guidance on how to proceed further.

    Thank you for your attention to this matter.

  • Hi,

    Thank you for providing additional information.

    Regarding modem traces, you could try to enable modem tracing using snippets. Snippets can be used with west like this:

    west build -p -b nrf9160dk_nrf9160_ns -S nrf91-modem-trace-uart



    Best regards,
    Dejan


  • Hi ,
          

    I'm currently facing some challenges with West build, but I recently came across AWS IoT code from a provided link aws_iot_tutorial.zip. Surprisingly, it's working flawlessly, allowing me to successfully post data to the subscribed sensor/temperature topic, as evidenced by the attached screenshot.


    However, I'm encountering connectivity issues with the sample AWS IoT code provided by NRF samples. Despite following the same steps, it fails to establish a connection. Could you please enlighten me on the key differences between these two codes? I'm particularly curious about why one version connects successfully while the other encounters difficulties.

    Your insights into these differences and potential reasons behind the connectivity issues would be immensely helpful.

    Thank you for your time and assistance.

  • Hi,

    I see that the sample has recently been updated to work in NCS v2.6.0. You could try to look at the differences between prj.conf and main.c in unmodified sample and in the sample that you linked to.

    Best regards,
    Dejan

Related