Multi-service sample not working properly

Hello,

I am working with the Multi-Service sample on the 9161dk and also a custom 9151 board. 

The multi-service sample compiled option works great but the samples, when compiled locally, from SDK 2.8 and 2.9, do not connect to the nRFCloud.

The samples seem to run identically to eachother but they run differently to the precompiled image for the 9161dk.

The precompiled image for the 9161dk, runs, and reports properly and was provisioned to the nRFCloud using claiming. The two samples compile and flash properly and run, but never maintain a connection to the nRFCloud.

It is clear by watching the uart output/runtime log, that the samples are configured differently than the precompiled image.

Log from sdk 2.9 sample

*** Booting My Application v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
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: 0x18000

ÿ*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
[00:00:00.256,347] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: MQTT
[00:00:00.256,378] <inf> application: Reset reason: 0x50001
[00:00:00.256,622] <inf> cloud_connection: Enabling connectivity...
[00:00:00.625,701] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.627,471] <inf> nrf_cloud_info: Device ID: nrf-358299840023440
[00:00:00.627,929] <inf> nrf_cloud_info: IMEI: 358299840023440
[00:00:00.692,230] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
[00:00:00.692,260] <inf> nrf_cloud_info: Protocol: MQTT
[00:00:00.692,321] <inf> nrf_cloud_info: Download protocol: HTTPS
[00:00:00.692,321] <inf> nrf_cloud_info: Sec tag: 16842753
[00:00:00.692,352] <inf> nrf_cloud_info: Host name: mqtt.nrfcloud.com
[00:00:01.092,529] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
[00:00:01.092,590] <inf> nrf_cloud_credentials: CA Size: 1792, AWS: Likely, CoAP: Likely
[00:00:01.092,620] <inf> cloud_connection: Waiting for network ready...
+CGEV: EXCE STATUS 0
+CEREG: 2,"910A","06715510",7
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
%MDMEV: SEARCH STATUS 2
+CEREG: 5,"910A","06715510",7,,,"00001010","11100000"
%XTIME: "2B","5210510061312B","00"
[00:00:05.844,757] <inf> cloud_connection: Network connectivity gained!
[00:00:06.844,940] <inf> cloud_connection: Network is ready
[00:00:06.844,970] <inf> cloud_connection: Connecting to nRF Cloud
[00:00:11.546,539] <err> nrf_cloud_transport: MQTT input error: -128
[00:00:11.546,600] <err> nrf_cloud_transport: Error disconnecting from cloud: -128
[00:00:11.546,661] <inf> cloud_connection: Disconnecting from nRF Cloud
[00:00:11.546,691] <err> cloud_connection: Could not connect to nRF Cloud
[00:00:11.546,691] <inf> cloud_connection: Retrying in 30 seconds...

Log from sdk 2.8 sample

*** Booting My Application v2.1.0-dev-4594a8693738 ***
*** Using nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
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: 0x18000
ÿ*** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
[00:00:00.256,408] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: MQTT
[00:00:00.256,439] <inf> application: Reset reason: 0x1
[00:00:00.256,683] <inf> cloud_connection: Enabling connectivity...
[00:00:00.625,732] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.629,058] <inf> nrf_cloud_info: Device ID: nrf-358299840023440
[00:00:00.629,486] <inf> nrf_cloud_info: IMEI: 358299840023440
[00:00:00.692,230] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
[00:00:00.692,291] <inf> nrf_cloud_info: Protocol: MQTT
[00:00:00.692,321] <inf> nrf_cloud_info: Download protocol: HTTPS
[00:00:00.692,352] <inf> nrf_cloud_info: Sec tag: 16842753
[00:00:00.692,382] <inf> nrf_cloud_info: Host name: mqtt.nrfcloud.com
[00:00:01.092,590] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
[00:00:01.092,651] <inf> nrf_cloud_credentials: CA Size: 1792, AWS: Likely, CoAP: Likely
[00:00:01.092,651] <inf> cloud_connection: Waiting for network ready...
+CGEV: EXCE STATUS 0
+CEREG: 2,"2CCE","014C6715",7
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CSCON: 0
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CSCON: 0
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CSCON: 0
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CSCON: 0
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CSCON: 0
+CEREG: 2,"0101","00042C03",7
%MDMEV: PRACH CE-LEVEL 0
%MDMEV: PRACH CE-LEVEL 1
+CSCON: 1
+CEREG: 2,"0101","00042C03",7,0,11
[00:01:46.456,848] <wrn> lte_lc: Registration rejected, EMM cause: 11, Cell ID: 273411, Tracking area: 257, LTE mode: 7
+CSCON: 0
+CEREG: 2,"0101","00042C01",7
+CEREG: 2,"910A","06715510",7
%MDMEV: PRACH CE-LEVEL 0
+CSCON: 1
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
%MDMEV: SEARCH STATUS 2
+CEREG: 5,"910A","06715510",7,,,"00001010","11100000"
%XTIME: "2B","5210021245512B","00"
[00:01:52.534,759] <inf> cloud_connection: Network connectivity gained!
[00:01:53.534,973] <inf> cloud_connection: Network is ready
[00:01:53.535,003] <inf> cloud_connection: Connecting to nRF Cloud
[00:01:58.189,056] <err> nrf_cloud_transport: MQTT input error: -128
[00:01:58.189,117] <err> nrf_cloud_transport: Error disconnecting from cloud: -128
[00:01:58.189,147] <inf> cloud_connection: Disconnecting from nRF Cloud
[00:01:58.189,208] <err> cloud_connection: Could not connect to nRF Cloud
[00:01:58.189,208] <inf> cloud_connection: Retrying in 30 seconds...

Log from  Precompiled image

*** Booting My Application v2.1.0-dev-4594a8693738 ***
*** Using nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
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: 0x18000
I: Jumping to the first image slot
[00:00:00.253,845] <inf> spi_nor: gd25wb256e3ir@1: 32 MiBy flash

*** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
[00:00:00.261,138] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: CoAP
[00:00:00.261,169] <inf> application: Reset reason: 0x50000
[00:00:00.261,474] <inf> cloud_connection: Enabling connectivity...
[00:00:00.628,295] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.715,911] <inf> nrf_cloud_info: Device ID: 50334756-3437-470b-8001-140cadd00a9d
[00:00:00.716,369] <inf> nrf_cloud_info: IMEI: 358299840023440
[00:00:00.802,154] <inf> nrf_cloud_info: UUID: 50334756-3437-470b-8001-140cadd00a9d
[00:00:00.802,581] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
[00:00:00.802,612] <inf> nrf_cloud_info: Protocol: CoAP
[00:00:00.802,642] <inf> nrf_cloud_info: Download protocol: CoAP
[00:00:00.802,642] <inf> nrf_cloud_info: Sec tag: 16842753
[00:00:00.802,673] <inf> nrf_cloud_info: CoAP JWT Sec tag: 16842753
[00:00:00.802,703] <inf> nrf_cloud_info: Host name: coap.nrfcloud.com
[00:00:01.132,843] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
[00:00:01.132,934] <inf> nrf_cloud_credentials: CA Size: 1792, AWS: Likely, CoAP: Likely
[00:00:01.132,934] <inf> cloud_connection: Waiting for network ready...
[00:00:04.179,870] <inf> cloud_connection: Network connectivity gained!
[00:00:05.180,145] <inf> cloud_provisioning: Initializing the nRF Provisioning library...
[00:00:05.180,175] <inf> nrf_provisioning_coap: Init CoAP client
[00:00:05.180,725] <inf> cloud_connection: Network is ready
[00:00:05.221,343] <inf> nrf_provisioning: Checking for provisioning commands in 3s seconds
[00:00:08.221,466] <inf> cloud_provisioning: Provisioning is active.
[00:00:08.447,235] <inf> nrf_provisioning_coap: DTLS setup
[00:00:09.953,735] <inf> nrf_provisioning_coap: Connected
[00:00:10.427,185] <inf> nrf_provisioning_coap: Requesting commands
[00:00:10.617,126] <inf> nrf_provisioning_coap: No more commands to process on server side
[00:00:10.618,408] <err> net_coap: Error in poll: POLLNVAL - fd 3 not open
[00:00:10.618,591] <inf> nrf_provisioning: Checking for provisioning commands in 61s seconds
[00:00:15.618,621] <inf> cloud_provisioning: Provisioning is idle.
[00:00:15.618,682] <inf> cloud_connection: Connecting to nRF Cloud
[00:00:17.625,701] <inf> nrf_cloud_coap_transport: Request authorization with JWT
[00:00:17.868,316] <inf> nrf_cloud_coap_transport: Authorization result_code: 2.01
[00:00:17.868,499] <inf> nrf_cloud_coap_transport: Authorized
[00:00:17.868,713] <inf> nrf_cloud_coap_transport: DTLS CID is active
[00:00:24.293,670] <inf> cloud_connection: Connected to nRF Cloud
[00:00:24.293,731] <inf> cloud_connection: Reducing provisioning check interval to 30 minutes
[00:00:24.294,464] <inf> shadow_support_coap: Checking for shadow delta...
[00:00:24.295,745] <inf> nrf_cloud_fota_poll: Checking for FOTA job...
[00:00:24.295,776] <inf> application: Waiting for modem to determine current date and time
[00:00:24.295,776] <inf> application: Current date and time determined
[00:00:24.295,806] <inf> nrf_cloud_log: Changing cloud logging enabled to:1
[00:00:24.297,027] <inf> nrf_provisioning: Checking for provisioning commands in 1803s seconds
[00:00:24.537,658] <inf> shadow_config: Sending reported configuration
[00:00:30.559,967] <inf> application: Temperature is 23 degrees C
[00:00:30.560,211] <inf> nrf_cloud_pgps: Storage base:0xEB000, size:86016
[00:00:30.561,737] <inf> nrf_cloud_pgps: Checking P-GPS header: Schema version:0, type:0, num:0, count:0
[00:00:30.561,737] <inf> nrf_cloud_pgps: size:0, period (minutes):0, GPS day:0, GPS time:0

Questions:

- can we get the configuration used for the precompiled example to use as a base of our application?

- is there a reason why the two samples, when compiled, will not work with claiming?

Parents
  • Hi,

    I have tested nrf_cloud_multi_service sample in NCS v2.9.0 on nrf9161-dk and sample connected to the nRF Cloud sample without any problems. 

    I suggest that you delete your device from nRF Cloud and follow downloading nRF Cloud certificate and provisioning nRF Cloud certificate guides before reconnecting to the nRF Cloud using multi_service sample.

    Can you provide some information about your testing environment? Have you checked your signal strength?

    lte_lc: Registration rejected, EMM cause: 11, Cell ID: 273411, Tracking area: 257, LTE mode: 7

    Your device gets rejected by the network and not able to register due to "PLMN not allowed" error. 

    Did you make any changes to nrf_cloud_multi_service_sample in NCS v2.9.0?
    Is your device mobile or stationary?
    Which network does your device connect to?
    Which SIM card do you use?

    Best regards,
    Dejan

  • Did you make any changes to nrf_cloud_multi_service_sample in NCS v2.9.0?

    - No changes to either the 2.9 version or the 2.8 version, also this is on the nrf9161 dev kit, no custom hardware


    Is your device mobile or stationary?

    - Stationary


    Which network does your device connect to?

    - I am assuming you are referring to a cell network? I am in the USA and


    Which SIM card do you use?

    - The iBasis sim card sent out with the systems, I added a bunch of data to it. Please note that the precompiled image for the nrf9161 connects just fine using this sim card.

    this error: 
    lte_lc: Registration rejected, EMM cause: 11, Cell ID: 273411, Tracking area: 257, LTE mode: 7

    is a one time connection error, that is fine, it happens. The system goes on to connect correctly after that and the real failure is when trying to connect to the nrfCloud.

    It seems like the precompiled image can use the claiming process and the samples cannot, is this accurate?

    Also the output is different between the precompiled image and the samples, there are other differences such as the precompiled image displaying the "uart:~$" prompt for user input, and defaulting to Coap instead of MQTT.

    I am unsure of the totality of the configuration differences and most I don't care about, however I would like our product to be able to utilize the claiming method of provisioning as we are planning to have a large number of units per customer and this seems like the most manageable method of controlling the provisioning.

    here is the link to the claiming process that is only usable as of modem firmware 2.0+

    Nordic Docs Claiming Device Ownership Portal

Reply
  • Did you make any changes to nrf_cloud_multi_service_sample in NCS v2.9.0?

    - No changes to either the 2.9 version or the 2.8 version, also this is on the nrf9161 dev kit, no custom hardware


    Is your device mobile or stationary?

    - Stationary


    Which network does your device connect to?

    - I am assuming you are referring to a cell network? I am in the USA and


    Which SIM card do you use?

    - The iBasis sim card sent out with the systems, I added a bunch of data to it. Please note that the precompiled image for the nrf9161 connects just fine using this sim card.

    this error: 
    lte_lc: Registration rejected, EMM cause: 11, Cell ID: 273411, Tracking area: 257, LTE mode: 7

    is a one time connection error, that is fine, it happens. The system goes on to connect correctly after that and the real failure is when trying to connect to the nrfCloud.

    It seems like the precompiled image can use the claiming process and the samples cannot, is this accurate?

    Also the output is different between the precompiled image and the samples, there are other differences such as the precompiled image displaying the "uart:~$" prompt for user input, and defaulting to Coap instead of MQTT.

    I am unsure of the totality of the configuration differences and most I don't care about, however I would like our product to be able to utilize the claiming method of provisioning as we are planning to have a large number of units per customer and this seems like the most manageable method of controlling the provisioning.

    here is the link to the claiming process that is only usable as of modem firmware 2.0+

    Nordic Docs Claiming Device Ownership Portal

Children
Related