Custome NRF9151 is not able to be provisioned to NRF cloud

Hi NRF support team,

We are developing a custom board based on the NRF9151 SIP.

I am experiencing some issues in provisioning the device to the NRF cloud.
On the 9151-DK i was able to use NRF cloud by doing the following steps:

1. Go to nrf cloud and get the JITP *.cert.json file.

2. Go to certificate manager and write the certificates to the modem and verify successful writing with: AT%CMNG=1

3. Flash the nrf_cloud_rest_cell_location, with enabled  CONFIG_REST_CELL_LOCATION_DO_JITP build option

4. After JITP was performed, I went back to nrf cloud and added the device, waited for it to connect.

5. device appeared in the list and I was able to get locations.


After doing the exact same steps with our custom board, I see the "device was added. waiting for it to connect in nrf cloud" and the logs say that the Auth token is malformed.
For generating the JITP certificates I used:
Device ID: CUSTOM-001
HWID: 5034474b-3731-4f56-8079-210df3998f26 (can be seen as the UUID in the logs below)

AT%CMNG=1 from custom device gives:

%CMNG: 42,0,"6601F41FCEEFBE7523A6A2E746938DE57FC24E99426B7BEA58D1867DBEE1BE5E"
%CMNG: 16842753,0,"AD6FB002E6B34C0559FA8F93A3794FF12C4E3F119BD77290C52525123FB9EA74"
%CMNG: 16842753,1,"2E17AD66F084CFBB50E5D39DE0959F9914D30EB1E14FC0A0EB029C2EA28BA450"
%CMNG: 16842753,2,"921AE5DF79ECC8E4515BE26A15C8E07A9FBAF41FD26D6EF68046FBB5C9B6A1C5"
%CMNG: 4294967292,11,"672E2F05962B4EFBFA8801255D87E0E0418F2DDF4DDAEFC59E9B4162F512CB63"
%CMNG: 4294967293,10,"2C43952EE9E000FF2ACC4E2ED0897C0A72AD5FA72C3D934E81741CBD54F05BD1"
%CMNG: 4294967294,6,"42735970272477F4958F1B0930FAB2EBC8CAD0744BB488CFDC08FFF5825EA8F2"
OK


Log attached below:

*** Booting MCUboot v2.1.0-dev-bf852c9bb388 ***
*** Using nRF Connect SDK v3.0.0-3bfc46578e42 ***
*** Using Zephyr OS v4.0.99-3e0ce7636fa6 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v0.0.0
�*** Booting nRF Connect SDK v3.0.0-3bfc46578e42 ***
*** Using Zephyr OS v4.0.99-3e0ce7636fa6 ***
[00:00:00.260,711] <inf> nrf_cloud_rest_cell_location_sample: nRF Cloud REST Cellular Location Sample, version: 1.0.0
[00:00:00.629,547] <inf> nrf_cloud_rest_cell_location_sample: Device ID: 5034474b-3731-4f56-8079-210df3998f26
[00:00:00.646,820] <inf> nrf_cloud_rest_cell_location_sample: Using LTE LC neighbor search type GCI extended complete for 5 cells
[00:00:00.659,088] 00:00:00.661,132] <dbg> nrf_cloud_rest_cell_location_sample: app_event_handler: Button pressed
m<inf> nrf_cloud_rest_cell_location_sample: ---> Press button 0 to request just-in-time provisioning (JITP)
[00:00:00.680,389] <inf> nrf_cloud_rest_cell_location_sample:      This only needs to be done once per device
[00:00:00.691,131] <inf> nrf_cloud_rest_cell_location_sample:      Waiting 10 seconds...
[00:00:00.699,890] <inf> nrf_cloud_rest_cell_location_sample: JITP will be performed after network connection is obtained
[00:00:00.832,885] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
[00:00:00.843,566] <inf> nrf_cloud_credentials: CA Size: 1187, AWS: Likely, CoAP: Unlikely
[00:00:00.852,478] <inf> nrf_cloud_rest_cell_location_sample: Waiting for network...
+CEREG: 2,"5E9E","00436201",7
[00:00:01.941,558] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: LTE_LC_EVT_NW_REG_STATUS: 2
+CSCON: 1
[00:00:01.976,776] <inf> nrf_cloud_rest_cell_location_sample: RRC mode: connected
+CEREG: 1,"5E9E","00436201",7,,,"00011110","11100000"
[00:00:03.435,974] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: LTE_LC_EVT_NW_REG_STATUS: 1
[00:00:03.445,678] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: Network registration status: Connected - home network
[00:00:03.457,794] <inf> nrf_cloud_rest_cell_location_sample: Connected to network
[00:00:03.465,942] <inf> nrf_cloud_rest_cell_location_sample: Waiting for modem to acquire network time...
[00:00:06.485,778] <inf> nrf_cloud_rest_cell_location_sample: Network time obtained
[00:00:06.493,988] <inf> nrf_cloud_rest_cell_location_sample: Performing JITP...
[00:00:10.971,618] <inf> nrf_cloud_rest_cell_location_sample: Device already provisioned
[00:00:10.986,846] <inf> nrf_cloud_info: Device ID: 5034474b-3731-4f56-8079-210df3998f26
[00:00:10.996,093] <inf> nrf_cloud_info: IMEI:      359404230490956
[00:00:11.123,260] <inf> nrf_cloud_info: UUID:      5034474b-3731-4f56-8079-210df3998f26
[00:00:11.132,568] <inf> nrf_cloud_info: Modem FW:  mfw_nrf91x1_2.0.2
[00:00:11.139,556] <inf> nrf_cloud_info: Protocol:          REST
[00:00:11.146,179] <inf> nrf_cloud_info: Download protocol: HTTPS
[00:00:11.152,862] <inf> nrf_cloud_info: Sec tag:           16842753
[00:00:11.159,881] <inf> nrf_cloud_info: Host name:         api.nrfcloud.com
[00:00:17.194,183] <err> nrf_cloud_codec_internal: REST error msg: Auth token is malformed.
[00:00:17.203,521] <err> nrf_cloud_rest: nRF Cloud REST error code: 40100
[00:00:17.211,181] <err> nrf_cloud_rest: REST request was rejected. Response status: 401
[00:00:17.220,214] <err> nrf_cloud_rest: Response body: {"message":"Auth token is malformed.","code":40100}
[00:00:17.230,987] <err> nrf_cloud_rest: Failed to update device shadow, error: -77
[00:00:17.239,562] <err> nrf_cloud_rest_cell_location_sample: Failed to send device status, error: -77
[00:00:17.249,847] <inf> nrf_cloud_rest_cell_location_sample: Getting current cell info...
[00:00:17.268,737] <inf> nrf_cloud_rest_cell_location_sample: Current cell info: Cell ID: 4416001, TAC: 24222, MCC: 425, MNC: 1
[00:00:17.280,975] <inf> nrf_cloud_rest_cell_location_sample: Performing single-cell request
[00:00:17.290,100] <inf> nrf_cloud_rest_cell_location_sample: Request configuration:
[00:00:17.298,522] <inf> nrf_cloud_rest_cell_location_sample:   High confidence interval   = false
[00:00:17.308,227] <inf> nrf_cloud_rest_cell_location_sample:   Fallback to rough location = true
[00:00:17.317,871] <inf> nrf_cloud_rest_cell_location_sample:   Reply with result          = true
[00:00:18.252,746] <err> nrf_cloud_codec_internal: REST error msg: Auth token is malformed.
[00:00:18.262,023] <err> nrf_cloud_rest: nRF Cloud REST error code: 40100
[00:00:18.269,653] <err> nrf_cloud_rest: REST request was rejected. Response status: 401
[00:00:18.278,686] <err> nrf_cloud_rest: Response body: {"message":"Auth token is malformed.","code":40100}
[00:00:18.289,581] <err> nrf_cloud_rest_cell_location_sample: Request failed, error: -77
[00:00:18.298,614] <err> nrf_cloud_rest_cell_location_sample: nRF Cloud error code: 40100

I also saw a thread where setting CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y solved their Auth token is malformed issue however, it did not work for me.
Id appreciate any help and willing to provide further information as we are on a very tight schedule.

Thanks,
Lior

Parents
  • Quick update:

    After using: CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y in order to use the modem UUID as the client ID for nrf cloud.
    I did the provisioning in nrf cloud again using:

    Device ID: 5034474b-3731-4f56-8079-210df3998f26
    PIN/HWID: 5034474b-3731-4f56-8079-210df3998f26

    Writing it again using certificate manager.


    I got it to work ONCE and got my location, after this it stopped wotrking, I did not change anything.
    you can see in the image that it got the location once in nrf cloud (hope the image works..):




    Log of the successful run attached:

    *** Booting MCUboot v2.1.0-dev-bf852c9bb388 ***
    *** Using nRF Connect SDK v3.0.0-3bfc46578e42 ***
    *** Using Zephyr OS v4.0.99-3e0ce7636fa6 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0x10000
    I: Image version: v0.0.0
    *** Booting nRF Connect SDK v3.0.0-3bfc46578e42 ***
    *** Using Zephyr OS v4.0.99-3e0ce7636fa6 ***
    [00:00:00.260,681] <inf> nrf_cloud_rest_cell_location_sample: nRF Cloud REST Cellular Location Sample, version: 1.0.0
    [00:00:00.623,352] <inf> nrf_cloud_rest_cell_location_sample: Device ID: 5034474b-3731-4f56-8079-210df3998f26
    [00:00:00.640,594] <inf> nrf_cloud_rest_cell_location_sample: Using LTE LC neighbor search type GCI extended complete for 5 cells
    [00:00:00.652,862] 00:00:00.654,907] <dbg> nrf_cloud_rest_cell_location_sample: app_event_handler: Button pressed
    m<inf> nrf_cloud_rest_cell_location_sample: ---> Press button 0 to request just-in-time provisioning (JITP)
    [00:00:00.674,072] <inf> nrf_cloud_rest_cell_location_sample: This only needs to be done once per device
    [00:00:00.684,722] <inf> nrf_cloud_rest_cell_location_sample: Waiting 10 seconds...
    [00:00:00.693,634] <inf> nrf_cloud_rest_cell_location_sample: JITP will be performed after network connection is obtained
    [00:00:00.826,629] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
    [00:00:00.837,310] <inf> nrf_cloud_credentials: CA Size: 1187, AWS: Likely, CoAP: Unlikely
    [00:00:00.846,221] <inf> nrf_cloud_rest_cell_location_sample: Waiting for network...
    +CEREG: 2,"5E9E","00436201",7
    [00:00:01.952,239] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: LTE_LC_EVT_NW_REG_STATUS: 2
    +CSCON: 1
    [00:00:02.007,080] <inf> nrf_cloud_rest_cell_location_sample: RRC mode: connected
    +CEREG: 5,"5E9E","00436201",7,,,"11100000","11100000"
    [00:00:06.692,596] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: LTE_LC_EVT_NW_REG_STATUS: 5
    [00:00:06.702,301] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: Network registration status: Connected - roaming
    [00:00:06.713,989] <inf> nrf_cloud_rest_cell_location_sample: Connected to network
    [00:00:06.722,076] <inf> nrf_cloud_rest_cell_location_sample: Waiting for modem to acquire network time...
    [00:00:09.741,882] <inf> nrf_cloud_rest_cell_location_sample: Network time obtained
    [00:00:09.750,030] <inf> nrf_cloud_rest_cell_location_sample: Performing JITP...
    [00:00:19.018,005] <inf> nrf_cloud_rest_cell_location_sample: Device already provisioned
    [00:00:19.032,989] <inf> nrf_cloud_info: Device ID: 5034474b-3731-4f56-8079-210df3998f26
    [00:00:19.042,236] <inf> nrf_cloud_info: IMEI: 359404230490956
    [00:00:19.167,236] <inf> nrf_cloud_info: UUID: 5034474b-3731-4f56-8079-210df3998f26
    [00:00:19.176,330] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
    [00:00:19.183,380] <inf> nrf_cloud_info: Protocol: REST
    [00:00:19.189,971] <inf> nrf_cloud_info: Download protocol: HTTPS
    [00:00:19.196,655] <inf> nrf_cloud_info: Sec tag: 16842753
    [00:00:19.203,613] <inf> nrf_cloud_info: Host name: api.nrfcloud.com
    [00:00:23.023,040] <inf> nrf_cloud_rest_cell_location_sample: Device status sent to nRF Cloud
    [00:00:23.032,257] <inf> nrf_cloud_rest_cell_location_sample: Getting current cell info...
    [00:00:23.050,781] <inf> nrf_cloud_rest_cell_location_sample: Current cell info: Cell ID: 4416001, TAC: 24222, MCC: 425, MNC: 7
    [00:00:23.063,079] <inf> nrf_cloud_rest_cell_location_sample: Performing single-cell request
    [00:00:23.072,265] <inf> nrf_cloud_rest_cell_location_sample: Request configuration:
    [00:00:23.080,688] <inf> nrf_cloud_rest_cell_location_sample: High confidence interval = false
    [00:00:23.090,332] <inf> nrf_cloud_rest_cell_location_sample: Fallback to rough location = true
    [00:00:23.099,945] <inf> nrf_cloud_rest_cell_location_sample: Reply with result = true
    [00:00:24.035,827] <inf> nrf_cloud_rest_cell_location_sample: Cellular location request fulfilled with single-cell
    [00:00:24.046,844] <inf> nrf_cloud_rest_cell_location_sample: Lat: 32.850623, Lon: 35.101383, Uncertainty: 774
    +CSCON: 0
    [00:00:34.852,386] <inf> nrf_cloud_rest_cell_location_sample: RRC mode: idle
    

Reply
  • Quick update:

    After using: CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y in order to use the modem UUID as the client ID for nrf cloud.
    I did the provisioning in nrf cloud again using:

    Device ID: 5034474b-3731-4f56-8079-210df3998f26
    PIN/HWID: 5034474b-3731-4f56-8079-210df3998f26

    Writing it again using certificate manager.


    I got it to work ONCE and got my location, after this it stopped wotrking, I did not change anything.
    you can see in the image that it got the location once in nrf cloud (hope the image works..):




    Log of the successful run attached:

    *** Booting MCUboot v2.1.0-dev-bf852c9bb388 ***
    *** Using nRF Connect SDK v3.0.0-3bfc46578e42 ***
    *** Using Zephyr OS v4.0.99-3e0ce7636fa6 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0x10000
    I: Image version: v0.0.0
    *** Booting nRF Connect SDK v3.0.0-3bfc46578e42 ***
    *** Using Zephyr OS v4.0.99-3e0ce7636fa6 ***
    [00:00:00.260,681] <inf> nrf_cloud_rest_cell_location_sample: nRF Cloud REST Cellular Location Sample, version: 1.0.0
    [00:00:00.623,352] <inf> nrf_cloud_rest_cell_location_sample: Device ID: 5034474b-3731-4f56-8079-210df3998f26
    [00:00:00.640,594] <inf> nrf_cloud_rest_cell_location_sample: Using LTE LC neighbor search type GCI extended complete for 5 cells
    [00:00:00.652,862] 00:00:00.654,907] <dbg> nrf_cloud_rest_cell_location_sample: app_event_handler: Button pressed
    m<inf> nrf_cloud_rest_cell_location_sample: ---> Press button 0 to request just-in-time provisioning (JITP)
    [00:00:00.674,072] <inf> nrf_cloud_rest_cell_location_sample: This only needs to be done once per device
    [00:00:00.684,722] <inf> nrf_cloud_rest_cell_location_sample: Waiting 10 seconds...
    [00:00:00.693,634] <inf> nrf_cloud_rest_cell_location_sample: JITP will be performed after network connection is obtained
    [00:00:00.826,629] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
    [00:00:00.837,310] <inf> nrf_cloud_credentials: CA Size: 1187, AWS: Likely, CoAP: Unlikely
    [00:00:00.846,221] <inf> nrf_cloud_rest_cell_location_sample: Waiting for network...
    +CEREG: 2,"5E9E","00436201",7
    [00:00:01.952,239] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: LTE_LC_EVT_NW_REG_STATUS: 2
    +CSCON: 1
    [00:00:02.007,080] <inf> nrf_cloud_rest_cell_location_sample: RRC mode: connected
    +CEREG: 5,"5E9E","00436201",7,,,"11100000","11100000"
    [00:00:06.692,596] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: LTE_LC_EVT_NW_REG_STATUS: 5
    [00:00:06.702,301] <dbg> nrf_cloud_rest_cell_location_sample: lte_handler: Network registration status: Connected - roaming
    [00:00:06.713,989] <inf> nrf_cloud_rest_cell_location_sample: Connected to network
    [00:00:06.722,076] <inf> nrf_cloud_rest_cell_location_sample: Waiting for modem to acquire network time...
    [00:00:09.741,882] <inf> nrf_cloud_rest_cell_location_sample: Network time obtained
    [00:00:09.750,030] <inf> nrf_cloud_rest_cell_location_sample: Performing JITP...
    [00:00:19.018,005] <inf> nrf_cloud_rest_cell_location_sample: Device already provisioned
    [00:00:19.032,989] <inf> nrf_cloud_info: Device ID: 5034474b-3731-4f56-8079-210df3998f26
    [00:00:19.042,236] <inf> nrf_cloud_info: IMEI: 359404230490956
    [00:00:19.167,236] <inf> nrf_cloud_info: UUID: 5034474b-3731-4f56-8079-210df3998f26
    [00:00:19.176,330] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
    [00:00:19.183,380] <inf> nrf_cloud_info: Protocol: REST
    [00:00:19.189,971] <inf> nrf_cloud_info: Download protocol: HTTPS
    [00:00:19.196,655] <inf> nrf_cloud_info: Sec tag: 16842753
    [00:00:19.203,613] <inf> nrf_cloud_info: Host name: api.nrfcloud.com
    [00:00:23.023,040] <inf> nrf_cloud_rest_cell_location_sample: Device status sent to nRF Cloud
    [00:00:23.032,257] <inf> nrf_cloud_rest_cell_location_sample: Getting current cell info...
    [00:00:23.050,781] <inf> nrf_cloud_rest_cell_location_sample: Current cell info: Cell ID: 4416001, TAC: 24222, MCC: 425, MNC: 7
    [00:00:23.063,079] <inf> nrf_cloud_rest_cell_location_sample: Performing single-cell request
    [00:00:23.072,265] <inf> nrf_cloud_rest_cell_location_sample: Request configuration:
    [00:00:23.080,688] <inf> nrf_cloud_rest_cell_location_sample: High confidence interval = false
    [00:00:23.090,332] <inf> nrf_cloud_rest_cell_location_sample: Fallback to rough location = true
    [00:00:23.099,945] <inf> nrf_cloud_rest_cell_location_sample: Reply with result = true
    [00:00:24.035,827] <inf> nrf_cloud_rest_cell_location_sample: Cellular location request fulfilled with single-cell
    [00:00:24.046,844] <inf> nrf_cloud_rest_cell_location_sample: Lat: 32.850623, Lon: 35.101383, Uncertainty: 774
    +CSCON: 0
    [00:00:34.852,386] <inf> nrf_cloud_rest_cell_location_sample: RRC mode: idle
    

Children
No Data
Related