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

nrf_cloud_connect failed: 22

Hi , 

I am using SDK v0.4.0.

Modem firmware : mfwnb1nrf9160030123prealpha

Asset tracker example is downloaded to the NRF9160-DK.

Since I am using NB IOT, I select NB-IOT in "Configure nrf connect SDK Project"

"AT%XSYSTEMMODE" is not supported by this modem firmware version, so I remove  writing this command in w_lte_lc_init_and_connect().

However, it output a error:

nrf_cloud_connect failed: 22 

which means "Invalid argument"

Do you know how to solve this problem? Thank you

***** Booting Zephyr OS v1.14.99-ncs1 *****
Flash region Domain Permissions
00 0x00000 0x08000 Secure rwxl
01 0x08000 0x10000 Non-Secure rwxl
02 0x10000 0x18000 Non-Secure rwxl
03 0x18000 0x20000 Non-Secure rwxl
04 0x20000 0x28000 Non-Secure rwxl
05 0x28000 0x30000 Non-Secure rwxl
06 0x30000 0x38000 Non-Secure rwxl
07 0x38000 0x40000 Non-Secure rwxl
08 0x40000 0x48000 Non-Secure rwxl
09 0x48000 0x50000 Non-Secure rwxl
10 0x50000 0x58000 Non-Secure rwxl
11 0x58000 0x60000 Non-Secure rwxl
12 0x60000 0x68000 Non-Secure rwxl
13 0x68000 0x70000 Non-Secure rwxl
14 0x70000 0x78000 Non-Secure rwxl
15 0x78000 0x80000 Non-Secure rwxl
16 0x80000 0x88000 Non-Secure rwxl
17 0x88000 0x90000 Non-Secure rwxl
18 0x90000 0x98000 Non-Secure rwxl
19 0x98000 0xa0000 Non-Secure rwxl
20 0xa0000 0xa8000 Non-Secure rwxl
21 0xa8000 0xb0000 Non-Secure rwxl
22 0xb0000 0xb8000 Non-Secure rwxl
23 0xb8000 0xc0000 Non-Secure rwxl
24 0xc0000 0xc8000 Non-Secure rwxl
25 0xc8000 0xd0000 Non-Secure rwxl
26 0xd0000 0xd8000 Non-Secure rwxl
27 0xd8000 0xe0000 Non-Secure rwxl
28 0xe0000 0xe8000 Non-Secure rwxl
29 0xe8000 0xf0000 Non-Secure rwxl
30 0xf0000 0xf8000 Non-Secure rwxl
31 0xf8000 0x100000 Non-Secure rwxl

SRAM region Domain Permissions
00 0x00000 0x02000 Secure rwxl
01 0x02000 0x04000 Secure rwxl
02 0x04000 0x06000 Secure rwxl
03 0x06000 0x08000 Secure rwxl
04 0x08000 0x0a000 Secure rwxl
05 0x0a000 0x0c000 Secure rwxl
06 0x0c000 0x0e000 Secure rwxl
07 0x0e000 0x10000 Secure rwxl
08 0x10000 0x12000 Non-Secure rwxl
09 0x12000 0x14000 Non-Secure rwxl
10 0x14000 0x16000 Non-Secure rwxl
11 0x16000 0x18000 Non-Secure rwxl
12 0x18000 0x1a000 Non-Secure rwxl
13 0x1a000 0x1c000 Non-Secure rwxl
14 0x1c000 0x1e000 Non-Secure rwxl
15 0x1e000 0x20000 Non-Secure rwxl
16 0x20000 0x22000 Non-Secure rwxl
17 0x22000 0x24000 Non-Secure rwxl
18 0x24000 0x26000 Non-Secure rwxl
19 0x26000 0x28000 Non-Secure rwxl
20 0x28000 0x2a000 Non-Secure rwxl
21 0x2a000 0x2c000 Non-Secure rwxl
22 0x2c000 0x2e000 Non-Secure rwxl
23 0x2e000 0x30000 Non-Secure rwxl
24 0x30000 0x32000 Non-Secure rwxl
25 0x32000 0x34000 Non-Secure rwxl
26 0x34000 0x36000 Non-Secure rwxl
27 0x36000 0x38000 Non-Secure rwxl
28 0x38000 0x3a000 Non-Secure rwxl
29 0x3a000 0x3c000 Non-Secure rwxl
30 0x3c000 0x3e000 Non-Secure rwxl
31 0x3e000 0x40000 Non-Secure rwxl

Peripheral Domain Status
00 NRF_P0 Non-Secure OK
01 NRF_CLOCK Non-Secure OK
02 NRF_RTC1 Non-Secure OK
03 NRF_NVMC Non-Secure OK
04 NRF_UARTE1 Non-Secure OK
05 NRF_UARTE2 Secure SKIP
06 NRF_IPC Non-Secure OK
07 NRF_VMC Non-Secure OK
08 NRF_FPU Non-Secure OK
09 NRF_EGU1 Non-Secure OK
10 NRF_EGU2 Non-Secure OK
11 NRF_TWIM2 Non-Secure OK
12 NRF_SPIM3 Non-Secure OK
13 NRF_TIMER0 Non-Secure OK
14 NRF_TIMER1 Non-Secure OK
15 NRF_TIMER2 Non-Secure OK
16 NRF_SAADC Non-Secure OK
17 NRF_GPIOTE1 Non-Secure OK

SPM: NS image at 0x8000
SPM: NS MSP at 0x2002a8c8
SPM: NS reset vector at 0x10f51
SPM: prepare to jump to Non-Secure image.
***** Booting Zephyr OS v1.14.99-ncs1 *****
Application started
LTE LC config ...
[00:00:00.317,810] [0m<dbg> nrf_cloud_transport.nct_client_id_get: client_id = nrf-352656100049793[0m
[00:00:00.317,840] [0m<dbg> nrf_cloud_transport.nct_topics_populate: shadow_base_topic: $aws/things/nrf-352656100049793/shadow[0m
[00:00:00.317,871] [0m<dbg> nrf_cloud_transport.nct_topics_populate: accepted_topic: $aws/things/nrf-352656100049793/shadow/get/accepted[0m
[00:00:00.317,901] [0m<dbg> nrf_cloud_transport.nct_topics_populate: rejected_topic: $aws/things/nrf-352656100049793/shadow/get/rejected[0m
[00:00:00.317,932] [0m<dbg> nrf_cloud_transport.nct_topics_populate: update_delta_topic: $aws/things/nrf-352656100049793/shadow/update/delta[0m
[00:00:00.317,962] [0m<dbg> nrf_cloud_transport.nct_topics_populate: update_topic: $aws/things/nrf-352656100049793/shadow/update[0m
[00:00:00.317,993] [0m<dbg> nrf_cloud_transport.nct_topics_populate: shadow_get_topic: $aws/things/nrf-352656100049793/shadow/get[0m
[00:00:00.320,007] [0m<dbg> lte_lc.at_cmd: send: AT+CEREG=2[0m
[00:00:00.320,373] [0m<dbg> lte_lc.at_cmd: send: AT+CFUN=1[0m
[00:00:07.316,925] [0m<dbg> lte_lc.w_lte_lc_init_and_connect: recv: +CEREG: 2,"C3B5","0186E6CA",9
[0m
nrf_cloud_connect failed: 22
[00:00:09.110,382] [0m<dbg> lte_lc.w_lte_lc_init_and_connect: recv: [0m
[00:00:09.110,931] [0m<dbg> nrf_cloud_transport.nct_connect: getaddrinfo failed 22[0m
[00:00:09.113,861] [0m<dbg> lte_lc.at_cmd: send: AT+CFUN=0[0m

Parents
  • Hello, you should try to upgrade the modem firmware since yours is outdated.

  • I upgraded the firmware to the latest version 0.7.0-29.alpha 

    it also got a error 

    nrf_cloud_connect failed:22

    What  I should to avoid this error? I have tried the latest modem firmware with using at_client example which can connect to the network successfully. 

    Thanks

    The following is the log:

    SPM: NS image at 0x8000
    SPM: NS MSP at 0x2002a8c8
    SPM: NS reset vector at 0x10f51
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Application started
    LTE LC config ...
    [00:00:02.410,400] [0m<dbg> nrf_cloud_transport.nct_client_id_get: client_id = nrf-352656100049793[0m
    [00:00:02.410,430] [0m<dbg> nrf_cloud_transport.nct_topics_populate: shadow_base_topic: $aws/things/nrf-352656100049793/shadow[0m
    [00:00:02.410,461] [0m<dbg> nrf_cloud_transport.nct_topics_populate: accepted_topic: $aws/things/nrf-352656100049793/shadow/get/accepted[0m
    [00:00:02.410,491] [0m<dbg> nrf_cloud_transport.nct_topics_populate: rejected_topic: $aws/things/nrf-352656100049793/shadow/get/rejected[0m
    [00:00:02.410,522] [0m<dbg> nrf_cloud_transport.nct_topics_populate: update_delta_topic: $aws/things/nrf-352656100049793/shadow/update/delta[0m
    [00:00:02.410,552] [0m<dbg> nrf_cloud_transport.nct_topics_populate: update_topic: $aws/things/nrf-352656100049793/shadow/update[0m
    [00:00:02.410,583] [0m<dbg> nrf_cloud_transport.nct_topics_populate: shadow_get_topic: $aws/things/nrf-352656100049793/shadow/get[0m
    [00:00:02.994,537] [0m<dbg> lte_lc.at_cmd: send: AT+CEREG=2[0m
    [00:00:03.576,049] [0m<dbg> lte_lc.at_cmd: send: AT%XSYSTEMMODE=0,1,0,0[0m
    [00:00:03.584,045] [0m<dbg> lte_lc.at_cmd: send: AT+CFUN=1[0m
    [00:00:09.849,517] [0m<dbg> lte_lc.w_lte_lc_init_and_connect: recv: +CEREG: 2,"C8C9","0188B0C9",9
    [0m
    nrf_cloud_connect failed: 22
    [00:00:24.149,505] [0m<dbg> lte_lc.w_lte_lc_init_and_connect: recv: [0m
    [00:00:28.168,914] [0m<dbg> nrf_cloud_transport.nct_connect: getaddrinfo failed 22[0m
    [00:00:28.171,905] [0m<dbg> lte_lc.at_cmd: send: AT+CFUN=0[0m

  • yes, you can see the log, nbiot was set 

    lte_lc.at_cmd: send: AT%XSYSTEMMODE=0,1,0,0

  • Try the following,

    Set AT%XEPCO=0,

    AT%XBANDLOCK=1, "10010101".

Reply Children
Related