Error -11 when connecting to nRF Cloud

Hi

I'm just starting out to test the nRF9160 DK board and have just flashed the NB-IoT Asset Tracker as per the introductory video uploaded by Nordic here:

https://www.youtube.com/watch?v=rMvW3HXLErk&t=583s

However, I'm running into an issue with [0m<inf> app_event_manager: CLOUD_EVT_CONNECTION_TIMEOUT when setting things up. As the iBasis SIM card doesn't seem to work in my area, I have utilised by own sim card from WirelessLogic, and have confirmed with them that there is sufficient data left in the sim card.

Any help is very much appreciated, thanks!

  • please flash the AT Client sample to your DK (available as pre-compiled image) and run through the following sequence: 

    Hi, I have done that and the following is the output. At the final bit the output didn't quite seem to fully match up with your provided sample but I've tried my best to run as many of hte commands as I could. Below is the output. Thanks.

    AT+CFUN?+CFUN: 0
    
    OK
    
    AT%XSYSTEMMODE=0,1,1,2
    
    OK
    
    AT+CGMRmfw_nrf9160_1.3.2
    
    OK
    
    AT%MDMEV=1
    
    OK
    
    AT%XMODEMSLEEP=1,1000,60000
    
    O%XMODEMSLEEP: 4
    
    K
    
    AT+CFUN?
    
    AT+CFUN?
    
    +CFUN: 0
    
    OK
    
    AT+CEREG=5
    
    OK
    
    AT%CESQ=1
    
    OK
    
    AT%XSYSTEMMODE?
    
    %XSYSTEMMODE: 1,0,0,0
    
    OK
    
    AT+CFUN=1
    
    OK
    
    %CESQ: 45,2,3,0
    
    +CEREG: 2,"0421","07B56F78",7
    
    %CESQ: 45,2,10,1
    
    +CEREG: 5,"0421","07B56F78",7,,,"11100000","11100000"
    
    AT+COPS=3,2
    
    OK
    
    AT+COPS?
    
    +COPS: 0,2,"23410",7
    
    OK
    
    AT%XCBAND
    
    %XCBAND: 20
    
    OK
    
    AT+CGDCONT?
    
    +CGDCONT: 0,"IP","wlapn.com","10.111.7.191",0,0
    
    OK
    
    AT+CGACT?
    
    +CGACT: 0,1
    
    OK
    
    %XMODEMSLEEP: 4,0
    
    ERROR
    
    %CESQ: 44,2,5,0
    
    %CESQ: 52,2,16,2
    
    +CEREG: 5,"0421","07B56F82",7,,,"11100000","11100000"
    
    AT+COPS=3,2
    
    OK
    
    AT+COPS?
    
    +COPS: 0,2,"23410",7
    
    OK
    
    AT%XCBAND%XCBAND: 20
    
    OK
    
    AT+CGDCONT?
    
    +CGDCONT: 0,"IP","wlapn.com","10.111.7.191",0,0
    
    OK
    
    AT+CGACT?
    
    +CGACT: 0,1
    
    OK
    
    %CESQ: 47,2,13,1
    
    %CESQ: 49,2,19,2
    
    %CESQ: 44,2,16,2
    
    AT+CFUN=1
    
    OK
    
    %XMODEMSLEEP: 4,0
    
    ERROR
    
    %CESQ: 52,2,13,1
    
    %CESQ: 47,2,15,2
    
    %CESQ: 43,2,10,1
    
    %CESQ: 46,2,15,2
    
    %CESQ: 41,2,9,1
    
    %CESQ: 43,2,14,2
    
    %CESQ: 40,2,8,1
    
    %CESQ: 44,2,14,2
    
    %CESQ: 41,2,8,1
    
    %CESQ: 39,1,3,0
    
    %CESQ: 40,2,8,1
    
    %CESQ: 45,2,12,1
    
    %CESQ: 45,2,17,2

  • Additionally, I just tried the Asset_tracker v2 HEX file again, and it gave a different error this time (error 104). If it's of any use, the log is attached below. Thanks.

    [00:02:01.526,184] 
    
    [0m<inf> app_event_manager: APP_EVT_DATA_GET_ALL
    
    [0m
    
    [00:02:01.526,855] 
    
    [0m<inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, NEIGHBOR_CELLS, MOD_STAT)
    
    [0m
    
    [00:02:01.527,770] 
    
    [0m<inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    
    [0m
    
    [00:02:01.530,639] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 5 -22
    
    [0m
    
    [00:02:01.531,158] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 8 -22
    
    [0m
    
    [00:02:01.531,768] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 3 -22
    
    [0m
    
    [00:02:01.534,484] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 21 -22
    
    [0m
    
    [00:02:01.534,973] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 20 -5
    
    [0m
    
    [00:02:01.535,003] 
    
    [1;31m<err> modem_info_params: Network data not obtained: -93
    
    [0m
    
    [00:02:01.535,003] 
    
    [1;31m<err> modem_module: modem_info_params_get, error: -11
    
    [0m
    
    [00:02:01.535,095] 
    
    [0m<inf> app_event_manager: MODEM_EVT_MODEM_STATIC_DATA_NOT_READY
    
    [0m
    
    [00:02:01.637,969] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 5 -22
    
    [0m
    
    [00:02:01.638,519] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 8 -22
    
    [0m
    
    [00:02:01.639,068] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 3 -22
    
    [0m
    
    [00:02:01.647,766] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 21 -22
    
    [0m
    
    [00:02:01.648,223] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 20 -5
    
    [0m
    
    [00:02:01.648,254] 
    
    [1;31m<err> modem_info_params: Network data not obtained: -93
    
    [0m
    
    [00:02:01.648,284] 
    
    [1;31m<err> modem_module: modem_info_params_get, error: -11
    
    [0m
    
    [00:02:01.648,345] 
    
    [0m<inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_NOT_READY
    
    [0m
    
    [00:02:01.651,458] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 5 -22
    
    [0m
    
    [00:02:01.652,130] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 8 -22
    
    [0m
    
    [00:02:01.652,770] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 3 -22
    
    [0m
    
    %NCELLMEAS: 1
    
    +CEREG: 2
    
    [00:02:01.750,762] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 21 -22
    
    [0m
    
    [00:02:01.751,251] 
    
    [1;31m<err> modem_info_params: Link data not obtained: 20 -5
    
    [0m
    
    [00:02:01.751,281] 
    
    [1;31m<err> modem_info_params: Network data not obtained: -93
    
    [0m
    
    [00:02:01.751,312] 
    
    [1;31m<err> modem_module: modem_info_params_get, error: -11
    
    [0m
    
    [00:02:01.751,373] 
    
    [0m<inf> app_event_manager: MODEM_EVT_BATTERY_DATA_NOT_READY
    
    [0m
    
    [00:02:01.759,307] 
    
    [0m<inf> app_event_manager: MODEM_EVT_NEIGHBOR_CELLS_DATA_NOT_READY
    
    [0m
    
    [00:02:01.759,918] 
    
    [0m<inf> app_event_manager: MODEM_EVT_LTE_DISCONNECTED
    
    [0m
    
    [00:02:01.760,498] 
    
    [0m<inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    
    [0m
    
    [00:02:01.761,352] 
    
    [0m<inf> app_event_manager: DATA_EVT_DATA_READY
    
    [0m
    
    %CESQ: 65,3,22,3
    
    +CEREG: 2,"242A","00378F15",9
    
    +CSCON: 1
    
    %CESQ: 66,3,27,3
    
    [00:02:03.482,818] 
    
    [0m<inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    
    [0m
    
    +CGEV: ME PDN ACT 0,0
    
    AT+CGDCONT?
    
    +CNEC_ESM: 50,0
    
    %MDMEV: SEARCH STATUS 2
    
    +CEREG: 5,"242A","00378F15",9,,,"00001010","11000001"
    
    +CIND: "service",1
    
    +CIND: "roam",1
    
    %XTIME: ,"22701190814280","01"
    
    +CGDCONT: 0,"IP","wlapn.com","10.111.7.191",0,0
    
    OK
    
    AT+CGACT?
    
    +CGACT: 0,1
    
    OK
    
    [00:02:05.461,608] 
    
    [0m<inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
    
    [0m
    
    [00:02:05.462,219] 
    
    [0m<inf> app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
    
    [0m
    
    [00:02:05.463,592] 
    
    [1;33m<wrn> cloud_module: Cloud connection establishment in progress
    
    [0m
    
    [00:02:05.463,592] 
    
    [1;33m<wrn> cloud_module: New connection attempt in 32 seconds if not successful
    
    [0m
    
    [00:02:05.463,745] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTING
    
    [0m
    
    [00:02:05.473,114] 
    
    [0m<inf> app_event_manager: DATA_EVT_DATE_TIME_OBTAINED
    
    [0m
    
    %CESQ: 65,3,22,3
    
    %CESQ: 66,3,27,3
    
    +CSCON: 0
    
    %CESQ: 67,3,22,3
    
    %CESQ: 67,3,28,4
    
    %CESQ: 255,0,255,0
    
    [00:02:37.463,775] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
    
    [0m
    
    [00:02:37.464,263] 
    
    [1;31m<err> nrf_cloud_integration: nrf_cloud_connect, error: -11
    
    [0m
    
    [00:02:37.464,294] 
    
    [1;31m<err> cloud_module: cloud_connect failed, error: -11
    
    [0m
    
    [00:02:37.464,294] 
    
    [1;33m<wrn> cloud_module: Cloud connection establishment in progress
    
    [0m
    
    [00:02:37.464,324] 
    
    [1;33m<wrn> cloud_module: New connection attempt in 64 seconds if not successful
    
    [0m
    
    [00:03:10.415,252] 
    
    [0m<inf> app_event_manager: UI_EVT_BUTTON_DATA_READY
    
    [0m
    
    [00:03:10.415,588] 
    
    [0m<inf> app_event_manager: DATA_EVT_UI_DATA_READY
    
    [0m
    
    [00:03:41.464,477] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
    
    [0m
    
    [00:03:41.464,965] 
    
    [1;31m<err> nrf_cloud_integration: nrf_cloud_connect, error: -11
    
    [0m
    
    [00:03:41.464,996] 
    
    [1;31m<err> cloud_module: cloud_connect failed, error: -11
    
    [0m
    
    [00:03:41.464,996] 
    
    [1;33m<wrn> cloud_module: Cloud connection establishment in progress
    
    [0m
    
    [00:03:41.465,026] 
    
    [1;33m<wrn> cloud_module: New connection attempt in 128 seconds if not successful
    
    [0m
    
    %CESQ: 64,3,23,3
    
    %NCELLMEAS: 0,"00378F15","23415","242A",65535,6254,103,63,20,241428,6254,104,61,16,0,0
    
    %CESQ: 255,0,255,0
    
    [00:04:01.526,184] 
    
    [0m<inf> app_event_manager: APP_EVT_DATA_GET_ALL
    
    [0m
    
    [00:04:01.526,824] 
    
    [0m<inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, NEIGHBOR_CELLS)
    
    [0m
    
    [00:04:01.527,770] 
    
    [0m<inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    
    [0m
    
    [00:04:01.550,445] 
    
    [0m<inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    
    [0m
    
    [00:04:01.573,516] 
    
    [0m<inf> app_event_manager: MODEM_EVT_BATTERY_DATA_READY
    
    [0m
    
    [00:04:01.912,872] 
    
    [0m<inf> app_event_manager: MODEM_EVT_NEIGHBOR_CELLS_DATA_READY
    
    [0m
    
    [00:04:01.913,726] 
    
    [0m<inf> app_event_manager: DATA_EVT_DATA_READY
    
    [0m
    
    %CESQ: 63,3,23,3
    
    %MDMEV: SEARCH STATUS 2
    
    [00:04:56.166,748] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTING
    
    [0m
    
    %CESQ: 63,3,29,4
    
    +CSCON: 1
    
    +CSCON: 0
    
    %CESQ: 62,3,23,3
    
    %CESQ: 62,3,30,4
    
    %CESQ: 255,0,255,0
    
    [00:05:49.465,179] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
    
    [0m
    
    [00:05:49.465,698] 
    
    [1;33m<wrn> cloud_module: Cloud connection establishment in progress
    
    [0m
    
    [00:05:49.465,698] 
    
    [1;33m<wrn> cloud_module: New connection attempt in 256 seconds if not successful
    
    [0m
    
    [00:05:49.465,850] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTING
    
    [0m
    
    %CESQ: 62,3,23,3
    
    %MDMEV: SEARCH STATUS 2
    
    +CEREG: 5,"242A","00378F1F",9,,,"00001010","11000001"
    
    AT+COPS=3,2
    
    OK
    
    AT+COPS?
    
    +COPS: 0,2,"23415",9
    
    OK
    
    AT%XCBAND
    
    %XCBAND: 20
    
    OK
    
    AT+CGDCONT?
    
    +CGDCONT: 0,"IP","wlapn.com","10.111.7.191",0,0
    
    OK
    
    AT+CGACT?
    
    +CGACT: 0,1
    
    OK
    
    [00:05:53.895,050] 
    
    [0m<inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    
    [0m
    
    %CESQ: 61,3,29,4
    
    +CSCON: 1
    
    %CESQ: 61,3,24,3
    
    %NCELLMEAS: 0,"00378F1F","23415","242A",16,6254,104,64,23,355936,6254,103,62,20,0,361013
    
    [00:06:01.526,184] 
    
    [0m<inf> app_event_manager: APP_EVT_DATA_GET_ALL
    
    [0m
    
    [00:06:01.526,824] 
    
    [0m<inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, NEIGHBOR_CELLS, GNSS)
    
    [0m
    
    [00:06:01.533,294] 
    
    [0m<inf> app_event_manager: GNSS_EVT_ACTIVE
    
    [0m
    
    [00:06:01.533,752] 
    
    [0m<inf> app_event_manager: GNSS_EVT_AGPS_NEEDED
    
    [0m
    
    [00:06:01.534,576] 
    
    [0m<inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    
    [0m
    
    [00:06:01.535,003] 
    
    [1;33m<wrn> data_module: Failed to request A-GPS data, error: -13
    
    [0m
    
    [00:06:01.535,003] 
    
    [1;33m<wrn> data_module: This is expected to fail if we are not in a connected state
    
    [0m
    
    [00:06:01.583,618] 
    
    [0m<inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    
    [0m
    
    [00:06:01.632,965] 
    
    [0m<inf> app_event_manager: MODEM_EVT_BATTERY_DATA_READY
    
    [0m
    
    [00:06:01.643,585] 
    
    [0m<inf> app_event_manager: MODEM_EVT_NEIGHBOR_CELLS_DATA_READY
    
    [0m
    
    [00:06:03.094,757] 
    
    [1;31m<err> nrf_cloud: nRF cloud connect failed -104
    
    [0m
    
    [00:06:03.094,848] 
    
    [0m<inf> app_event_manager: CLOUD_EVT_CONNECTING
    
    [0m
    
    +CSCON: 0
    
    %CESQ: 67,3,23,3
    
    %CESQ: 62,3,26,3
    
    %CESQ: 255,0,255,0
    
    [00:07:09.763,916] 
    
    [0m<inf> app_event_manager: GNSS_EVT_TIMEOUT
    
    [0m
    
    [00:07:09.764,373] 
    
    [0m<inf> app_event_manager: GNSS_EVT_INACTIVE
    
    [0m
    
    [00:07:09.764,831] 
    
    [0m<inf> app_event_manager: DATA_EVT_DATA_READY
    
    [0m

  • Tester013 said:
    If it's of any use, the log is attached below. Thanks.

    Thanks a lot for the logs! Just two minor remarks: if you share logs, could you please use our Insert -> Code functionality here in DevZone as it increases readability a lot? And if you could include timestamps to the logs, they will be even easier to interpret :-) Thanks! 

    Tester013 said:
    I have done that and the following is the output. At the final bit the output didn't quite seem to fully match up with your provided sample but I've tried my best to run as many of hte commands as I could. Below is the output. Thanks.

    Starting with the AT client log, I’m a bit confused here to be honest. You configured the system as:

    AT%XSYSTEMMODE=0,1,1,2 
    OK 

    meaning LTE-M not supported, NB-IoT supported, GNSS supported and NB-IoT preferred. 

    However, these changes appear not to have become effective, meaning that only LTE-M will be used.

     

    AT%XSYSTEMMODE?  
    %XSYSTEMMODE: 1,0,0,0 
    
    OK 

    But the modem actually is able to connect to an LTE-M network:

    +CEREG: 5,"0421","07B56F78",7,,,"11100000","11100000"

    which brings me to the next question if you are using a SIM card that supports both LTE-M & NB-IoT? 

    Cheers,

    Markus

  • Hmm..that's indeed odd, as supposedly, my SIM card should be operating on the NB-IoT network but I suppose that LTE-M works as well?

    In any case, thank you very much for your time but I seem to have resolved the issue. In the end, there was apparently some error regarding the certificate of the device, so issuing a new one from the nRF Cloud portal and flashing it onto the board enabled me to connect to the nRF Cloud with no issues.

  • Tester013 said:
    Hmm..that's indeed odd, as supposedly, my SIM card should be operating on the NB-IoT network but I suppose that LTE-M works as well?

    Without knowing which SIM card you are using, but there are UICCs that support both NB-IoT & LTE-M networks, yes :-)

    Tester013 said:
    In any case, thank you very much for your time but I seem to have resolved the issue. In the end, there was apparently some error regarding the certificate of the device, so issuing a new one from the nRF Cloud portal and flashing it onto the board enabled me to connect to the nRF Cloud with no issues.

    Thanks a lot for the feedback! I’m glad to hear that you could resolve the issue. 

    Cheers, 

    Markus 

Related