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

Unable to connect to Cloud using Asset Tracker on nRF9160 DK

Hello, I am currently learning to use nRF9160 DK in Guangzhou, China. 

It is weird that my China Mobile cellphone SIM card can be used on this DK to connect to Cloud. However, iBasics SIM and China Telecom NBIOT SIM cannot connect to Cloud. 

While using iBasics, it's LED3 that keeps blinking. While using China Telecom, LED3 blinks first, then LED4 blinks, LED1 and LED4 blinks at last.

The following is from nRF Connect during the entire session for China Telecom

+CSCON: 1

 

 

[00:00:08.419,586]

[0m<inf> asset_tracker: RRC mode: Connected

[0m

 

 

+CEREG: 1,"765E","075D6450",9,,,"11100000","00111000"

 

 

[00:00:10.095,031]

[0m<inf> asset_tracker: Connected to LTE network.

[0m

 

 

[00:00:10.101,623]

[0m<inf> asset_tracker: Connecting to cloud, attempt 1 of 8

[0m

 

 

[00:00:10.109,039]

[0m<inf> asset_tracker: Cloud connection request sent.

[0m

 

 

[00:00:10.115,966]

[0m<inf> asset_tracker: Connection response timeout is set to 30 seconds.

[0m

 

 

[00:00:10.124,664]

[0m<inf> asset_tracker: Network registration status: Connected - home network

[0m

 

 

[00:00:10.133,544]

[0m<inf> asset_tracker: PSM parameter update: TAU: 86400, Active time: -1

[0m

 

[00:00:10.142,242]

[0m<dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECTING

[0m

 

 

[00:00:10.150,695]

[0m<inf> asset_tracker: CLOUD_EVT_CONNECTING

[0m

 

 

[00:00:20.343,505]

[0m<dbg> nrf_cloud_transport.nct_connect: IPv4 address: 54.166.31.114

[0m

 

 

[00:00:20.351,715]

[0m<dbg> nrf_cloud_transport.nct_mqtt_connect: MQTT clean session flag: 0

[0m

 

 

[00:00:25.044,555]

[1;33m<wrn> date_time: sntp_query, error: -116

[0m

 

 

[00:00:32.817,443]

[1;33m<wrn> date_time: sntp_query, error: -116

[0m

 

 

[00:00:38.944,549]

[1;33m<wrn> date_time: sntp_query, error: -116

[0m

 

[00:00:44.977,661]

[1;33m<wrn> date_time: sntp_query, error: -116

[0m

 

 

[00:00:51.057,739]

[1;33m<wrn> date_time: sntp_query, error: -116

[0m

 

 

[00:00:51.064,270]

[1;33m<wrn> date_time: Not getting time from any NTP server

[0m

 

 

[00:00:51.072,357]

[0m<inf> asset_tracker: DATE_TIME_OBTAINED_MODEM

[0m

 

 

+CSCON: 0

 

 

[00:01:16.166,137]

[0m<inf> asset_tracker: RRC mode: Idle

[0m

 

 

+CSCON: 1

 

 

[00:01:21.380,767]

[0m<inf> asset_tracker: RRC mode: Connected

[0m

 

 

+CSCON: 0

 

 

[00:01:43.162,567]

[0m<inf> asset_tracker: RRC mode: Idle

[0m

 

 

+CSCON: 1

 

 

[00:02:13.541,534]

[0m<inf> asset_tracker: RRC mode: Connected

[0m

 

 

+CSCON: 0

 

 

[00:02:35.173,370]

[0m<inf> asset_tracker: RRC mode: Idle

[0m

 

 

[00:03:00.723,693]

[0m<dbg> nrf_cloud_transport.nct_mqtt_connect: mqtt_connect failed -22

[0m

 

 

[00:03:00.732,025]

[0m<dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECTING

[0m

 

 

[00:03:00.740,509]

[0m<inf> asset_tracker: CLOUD_EVT_CONNECTING

[0m

 

 

[00:03:00.746,582]

[1;31m<err> asset_tracker: Failed to connect to cloud, error -7

[0m

 

 

[00:03:00.754,333]

[1;31m<err> asset_tracker: Ensure device has a valid private key

[0m

 

 

[00:03:00.762,145]

[1;31m<err> asset_tracker: Device will reboot in 300 seconds

[0m

 

 

[00:03:00.769,653]

[1;31m<err> asset_tracker: LTE link disconnect

[0m

 

 

+CSCON: 1

 

 

[00:03:01.222,259]

[0m<inf> asset_tracker: RRC mode: Connected

[0m

 

 

+CEREG: 0,"765E","075D6450",9,0,0,"11100000","11100000"

 

 

+CSCON: 0

 

 

[00:03:06.757,415]

[0m<inf> asset_tracker: RRC mode: Idle

[0m

 

 

[00:03:07.170,684]

[1;31m<err> asset_tracker: Shutdown modem

[0m

  • Thank you for the log!

    To investigate the issue further, please use the Trace Collector application in nRF Connect for Desktop to capture a modem trace from the nRF9160 DK when using the China Telecom card to connect (see Collecting a modem trace for the nRF9160 DK). 

    Then provide me with the resulting .bin file and the corresponding log file from the application, as well as the modem FW version, NCS version and HW revision of the nRF9160 DK. 

  • trace-2021-07-05T07-01-26.414Z.bin

    2021-07-05T06:41:13.976Z INFO Application data folder: C:\Users\aaa\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector
    2021-07-05T06:41:14.038Z DEBUG App pc-nrfconnect-tracecollector v1.0.8 official
    2021-07-05T06:41:14.038Z DEBUG App path: C:\Users\aaa\.nrfconnect-apps\node_modules\pc-nrfconnect-tracecollector
    2021-07-05T06:41:14.038Z DEBUG nRFConnect 3.7.0, required by the app is (^3.0.0)
    2021-07-05T06:41:14.038Z DEBUG nRFConnect path: C:\Users\aaa\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-07-05T06:41:14.038Z DEBUG HomeDir: C:\Users\aaa
    2021-07-05T06:41:14.038Z DEBUG TmpDir: C:\Users\aaa\AppData\Local\Temp
    2021-07-05T06:41:18.712Z INFO Device opened
    2021-07-05T06:41:23.578Z INFO Tracefile created: C:\Users\aaa\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector\trace-2021-07-05T06-41-23.572Z.bin
    2021-07-05T07:01:03.104Z INFO Device closed
    2021-07-05T07:01:19.655Z INFO Device opened
    2021-07-05T07:01:26.414Z INFO Tracefile created: C:\Users\aaa\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector\trace-2021-07-05T07-01-26.414Z.bin
    2021-07-05T07:35:43.113Z INFO Tracefile closed
    

    Hello, please check the .bin and log in attachments. Modem FW is mfwnrf9160123 (mfw_nrf9160_1.3.0 does not work for unknow reason, log attached). NCS version 1.6.0; HW version 0.8.3 2019.1.

    2021-07-05T06:36:56.828Z INFO Application data folder: C:\Users\aaa\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2021-07-05T06:36:56.875Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
    2021-07-05T06:36:56.876Z DEBUG App path: C:\Users\aaa\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2021-07-05T06:36:56.876Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-07-05T06:36:56.876Z DEBUG nRFConnect path: C:\Users\aaa\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-07-05T06:36:56.876Z DEBUG HomeDir: C:\Users\aaa
    2021-07-05T06:36:56.876Z DEBUG TmpDir: C:\Users\aaa\AppData\Local\Temp
    2021-07-05T06:36:58.291Z INFO Modem port is opened
    2021-07-05T06:37:01.931Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-07-05T06:37:01.944Z DEBUG modem << I: Starting bootloader
    2021-07-05T06:37:01.946Z DEBUG modem << I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    2021-07-05T06:37:01.948Z DEBUG modem << I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    2021-07-05T06:37:01.950Z DEBUG modem << I: Boot source: none
    2021-07-05T06:37:01.954Z DEBUG modem << I: Swap type: none
    2021-07-05T06:37:02.272Z DEBUG modem << I: Bootloader chainload address offset: 0x10000
    2021-07-05T06:37:02.276Z DEBUG modem << I: Jumping to the first image slot
    2021-07-05T06:37:02.540Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-07-05T06:37:02.543Z DEBUG modem << Flash regionsDomainPermissions
    2021-07-05T06:37:02.547Z DEBUG modem << 00 03 0x00000 0x20000 Securerwxl
    2021-07-05T06:37:02.552Z DEBUG modem << 04 31 0x20000 0x100000 Non-Securerwxl
    2021-07-05T06:37:02.556Z DEBUG modem << Non-secure callable region 0 placed in flash region 2 with size 32.
    2021-07-05T06:37:02.606Z DEBUG modem << SRAM regionDomainPermissions
    2021-07-05T06:37:02.612Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
    2021-07-05T06:37:02.614Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
    2021-07-05T06:37:02.620Z DEBUG modem << PeripheralDomainStatus
    2021-07-05T06:37:02.621Z DEBUG modem << 00 NRF_P0               Non-SecureOK
    2021-07-05T06:37:02.623Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
    2021-07-05T06:37:02.625Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
    2021-07-05T06:37:02.629Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
    2021-07-05T06:37:02.636Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
    2021-07-05T06:37:02.637Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
    2021-07-05T06:37:02.640Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
    2021-07-05T06:37:02.642Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
    2021-07-05T06:37:02.645Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
    2021-07-05T06:37:02.652Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
    2021-07-05T06:37:02.654Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
    2021-07-05T06:37:02.656Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
    2021-07-05T06:37:02.659Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
    2021-07-05T06:37:02.662Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
    2021-07-05T06:37:02.669Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
    2021-07-05T06:37:02.671Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
    2021-07-05T06:37:02.673Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
    2021-07-05T06:37:02.676Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
    2021-07-05T06:37:02.679Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
    2021-07-05T06:37:02.686Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
    2021-07-05T06:37:02.688Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
    2021-07-05T06:37:02.690Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
    2021-07-05T06:37:02.693Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
    2021-07-05T06:37:02.696Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
    2021-07-05T06:37:02.703Z DEBUG modem << 24 NRF_REGULATORS       Non-SecureOK
    2021-07-05T06:37:02.704Z DEBUG modem << 25 NRF_PDM              Non-SecureOK
    2021-07-05T06:37:02.707Z DEBUG modem << 26 NRF_I2S              Non-SecureOK
    2021-07-05T06:37:02.710Z DEBUG modem << 27 NRF_GPIOTE1          Non-SecureOK
    2021-07-05T06:37:02.712Z DEBUG modem << SPM: NS image at 0x20200
    2021-07-05T06:37:02.715Z DEBUG modem << SPM: NS MSP at 0x200257a8
    2021-07-05T06:37:02.720Z DEBUG modem << SPM: NS reset vector at 0x2a0cd
    2021-07-05T06:37:02.722Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
    

  • Hi, the trace file you provided was empty. 

    Did you make sure to enable CONFIG_NRF_MODEM_LIB_TRACE_ENABLED in your application?

    You can also send AT%XMODEMTRACE=1,2 to the modem for good meaure, even though enabling the config should take care of that.

    And then make sure that the file size of the trace increases in the Trace Collector application as the device is running.

Related