LTE IoT 4 Click and nrf9160dk connectivity to nrf cloud

Hi All, 

I am using asset_tracker example V1.8.0, it's working fine with nrf9160DK. I am able to see the data on nrf cloud.

The purpose of testing this board was to debug the issue I faced with my custom(nrf9160) board (sim connectivity issue).

My connectivity with the LTE IoT 4 Click board is:

1) I am having a sim connectivity issue with my custom board (nrf9160) so I used the LTE IoT 4 Click board as discussed before and the reasons for using it.

2)Now sim is detecting 

3)Last time device was not added in nrf-cloud but now the device added successfully 

4)But no data, for that I attached the log 

Peripheral<HT>	<HT>	Domain<HT>	<HT>	Status<CR><LF>
00 NRF_P0               Non-Secure<HT>	OK<CR><LF>
01 NRF_CLOCK            Non-Secure<HT>	OK<CR><LF>
02 NRF_RTC0             Non-Secure<HT>	OK<CR><LF>
03 NRF_RTC1             Non-Secure<HT>	OK<CR><LF>
04 NRF_NVMC             Non-Secure<HT>	OK<CR><LF>
05 NRF_UARTE1           Non-Secure<HT>	OK<CR><LF>
06 NRF_UARTE2           Secure<HT>	<HT>	SKIP<CR><LF>
07 NRF_TWIM2            Non-Secure<HT>	OK<CR><LF>
08 NRF_SPIM3            Non-Secure<HT>	OK<CR><LF>
09 NRF_TIMER0           Non-Secure<HT>	OK<CR><LF>
10 NRF_TIMER1           Non-Secure<HT>	OK<CR><LF>
11 NRF_TIMER2           Non-Secure<HT>	OK<CR><LF>
12 NRF_SAADC            Non-Secure<HT>	OK<CR><LF>
13 NRF_PWM0             Non-Secure<HT>	OK<CR><LF>
14 NRF_PWM1             Non-Secure<HT>	OK<CR><LF>
15 NRF_PWM2             Non-Secure<HT>	OK<CR><LF>
16 NRF_PWM3             Non-Secure<HT>	OK<CR><LF>
17 NRF_WDT              Non-Secure<HT>	OK<CR><LF>
18 NRF_IPC              Non-Secure<HT>	OK<CR><LF>
19 NRF_VMC              Non-Secure<HT>	OK<CR><LF>
20 NRF_FPU              Non-Secure<HT>	OK<CR><LF>
21 NRF_EGU0             Non-Secure<HT>	OK<CR><LF>
22 NRF_EGU1             Non-Secure<HT>	OK<CR><LF>
23 NRF_EGU2             Non-Secure<HT>	OK<CR><LF>
24 NRF_EGU3             Non-Secure<HT>	OK<CR><LF>
25 NRF_EGU4             Non-Secure<HT>	OK<CR><LF>
26 NRF_EGU5             Non-Secure<HT>	OK<CR><LF>
27 NRF_DPPIC            Non-Secure<HT>	OK<CR><LF>
28 NRF_REGULATORS       Non-Secure<HT>	OK<CR><LF>
29 NRF_PDM              Non-Secure<HT>	OK<CR><LF>
30 NRF_I2S              Non-Secure<HT>	OK<CR><LF>
31 NRF_GPIOTE1          Non-Secure<HT>	OK<CR><LF>
<CR><LF>
SPM: NS image at 0x20200<CR><LF>
SPM: NS MSP at 0x20021b38<CR><LF>
SPM: NS reset vector at 0x2b6dd<CR><LF>
SPM: prepare to jump to Non-Secure image.<CR><LF>
*** Booting Zephyr OS build v2.7.0-ncs1  ***<CR><LF>
[00:00:00.206,420] <ESC><wrn> at_notif: Already initialized. Nothing to do<ESC><CR><LF>
[00:00:00.213,714] <ESC><inf> asset_tracker: Asset tracker started<ESC><CR><LF>
[00:00:00.219,940] <ESC><inf> watchdog: Watchdog timeout installed. Timeout: 60000<ESC><CR><LF>
[00:00:00.227,569] <ESC><inf> watchdog: Watchdog started<ESC><CR><LF>
[00:00:00.240,295] <ESC><dbg> nrf_cloud_transport.nct_client_id_set: client_id = nrf-351358814108376<ESC><CR><LF>
[00:00:00.249,816] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: accepted_topic: nrf-351358814108376/shadow/get/accepted<ESC><CR><LF>
[00:00:00.261,260] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: rejected_topic: $aws/things/nrf-351358814108376/shadow/get/rejected<ESC><CR><LF>
[00:00:00.273,834] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: update_delta_topic: $aws/things/nrf-351358814108376/shadow/update/delta<ESC><CR><LF>
[00:00:00.286,743] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: update_topic: $aws/things/nrf-351358814108376/shadow/update<ESC><CR><LF>
[00:00:00.298,645] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: shadow_get_topic: $aws/things/nrf-351358814108376/shadow/get<ESC><CR><LF>
[00:00:00.310,607] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
[00:00:00.318,420] <ESC><inf> asset_tracker: Connecting to LTE network.<ESC><CR><LF>
[00:00:00.325,042] <ESC><inf> asset_tracker: This may take several minutes.<ESC><CR><LF>
[00:00:02.033,294] <ESC><inf> asset_tracker: LTE cell changed: Cell ID: 84690705, Tracking area: 36867<ESC><CR><LF>
[00:00:02.149,444] <ESC><inf> asset_tracker: RRC mode: Connected<ESC><CR><LF>
[00:00:03.584,320] <ESC><inf> asset_tracker: Network registration status: Connected - roaming<ESC><CR><LF>
[00:00:0[00:00:03.593,902] <ESC><inf> asset_tracker: PSM parameter update: TAU: -1, Active time: -1<ESC><CR><LF>
3.593,017] <ESC><inf> asset_tracker: Connected to LTE network.<ESC><CR><LF>
[00:00:03.608,428] <ESC><inf> asset_tracker: Connecting to cloud, attempt 1 of 8<ESC><CR><LF>
[00:00:03.615,844] <ESC><inf> asset_tracker: Cloud connection request sent.<ESC><CR><LF>
[00:00:03.622,833] <ESC><inf> asset_tracker: Connection response timeout is set to 30 seconds.<ESC><CR><LF>
[00:00:03.631,591] <ESC><inf> asset_tracker: DATE_TIME_OBTAINED_MODEM<ESC><CR><LF>
[00:00:03.638,061] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
[00:00:03.645,751] <ESC><dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECTING<ESC><CR><LF>
[00:00:03.654,357] <ESC><inf> asset_tracker: CLOUD_EVT_CONNECTING<ESC><CR><LF>
[00:00:03.888,732] <ESC><dbg> nrf_cloud_transport.nct_connect: IPv4 address: 54.237.207.157<ESC><CR><LF>
[00:00:03.897,125] <ESC><dbg> nrf_cloud_transport.nct_mqtt_connect: MQTT clean session flag: 1<ESC><CR><LF>
[00:00:04.584,472] <ESC><inf> asset_tracker: DATE_TIME_OBTAINED_MODEM<ESC><CR><LF>
[00:00:05.905,975] <ESC><dbg> nrf_cloud_transport.nct_mqtt_connect: Using socket send timeout of 60 seconds<ESC><CR><LF>
[00:00:05.915,771] <ESC><dbg> nrf_cloud.nrf_cloud_run: Cloud connection request sent<ESC><CR><LF>
[00:00:08.097,106] <ESC><dbg> nrf_cloud_transport.nct_mqtt_evt_handler: MQTT_EVT_DISCONNECT: result = -128<ESC><CR><LF>
[00:00:08.106,781] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
[00:00:08.114,501] <ESC><dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED<ESC><CR><LF>
[00:00:08.123,260] <ESC><inf> asset_tracker: CLOUD_EVT_DISCONNECTED: 1<ESC><CR><LF>
[00:00:08.129,852] <ESC><inf> asset_tracker: Disconnected by the cloud.<ESC><CR><LF>
[00:00:08.136,535] <ESC><inf> asset_tracker: This can occur during initial nRF Cloud provisioning.<ESC><CR><LF>
[00:00:08.145,568] <ESC><inf> asset_tracker: Attempting reconnect in 10 seconds...<ESC><CR><LF>
[00:00:08.153,228] <ESC><err> nrf_cloud_transport: MQTT input error: -128<ESC><CR><LF>
[00:00:08.160,308] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
[00:00:08.168,029] <ESC><dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED<ESC><CR><LF>
[00:00:08.176,788] <ESC><inf> asset_tracker: CLOUD_EVT_DISCONNECTED: 1<ESC><CR><LF>
[00:00:08.183,380] <ESC><inf> asset_tracker: Disconnected by the cloud.<ESC><CR><LF>
[00:00:08.190,063] <ESC><inf> asset_tracker: This can occur if the device has the wrong nRF Cloud certificates<ESC><CR><LF>
[00:00:08.200,134] <ESC><inf> asset_tracker: or if the device has been removed from nRF Cloud.<ESC><CR><LF>
[00:00:08.208,831] <ESC><inf> asset_tracker: Attempting reconnect in 480 seconds...<ESC><CR><LF>
[00:00:08.216,583] <ESC><dbg> nrf_cloud.nrf_cloud_run: The cloud socket is already closed<ESC><CR><LF>
[00:00:13.533,843] <ESC><inf> asset_tracker: RRC mode: Idle<ESC><CR><LF>

from above log two reasons for not connecting 

a)Wrong certificate 

b)No device added to nrf cloud

5)For certificate addition I have followed the following procedure 

a) Followed the following link to add the certificate to the LTE IoT 4 click Mikroe board

 https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_thingy91%2FUG%2Fthingy91%2Fupdating_certificates%2Fprovisioning_certificate.html

b)Certificates added successfully as you can see on LTE Link Monitor

to verify it I ran the command AT%CMNG=1 and got the following response

 0,6,"0606060606060606060606060606060606060606060606060606060606060606"
%CMNG: 16842753,0,"0000000000000000000000000000000000000000000000000000000000000000"
%CMNG: 16842753,1,"0101010101010101010101010101010101010101010101010101010101010101"
%CMNG: 16842753,2,"0202020202020202020202020202020202020202020202020202020202020202"

is that OK ?

c)Next step was to add the certificates to the asset tracker firmware. For that I did ..

added the certificates and my client ID to certificates.h (in the asset tracker sample) and added CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y to prj.conf

6)Modem FW version is 1.1.0, if need to update it then can you help me with how to update it? In Nrf DK we can load it via the programmer.

Thanks & Regards,

Muhammad Usman

Related