“Failed to fetch key” errors on nRF54L15 using Sidewalk Add-On v1.0.1

Hi team,

We are evaluating Amazon Sidewalk from Sidewalk SDK v1.0.1, the hello-sidewalk sample is ported onto our in-house prototype board (nRF54L15). We’ve:

  1. Provisioned using the certificate.json and Nordic instructions to generate a manufacturing HEX image.

  2. Flashed the image into the MFG storage partition of the internal flash.

  3. Confirmed provisioning is complete; device is currently unregistered (no gateway yet).

However, upon enabling debug logs ( CONFIG_SIDEWALK_LOG_LEVEL_DBG=y ), the app reports: Failed to fetch keys:


[01:00:34.184,415] <inf> APP_SIDEWALK: Sidewalk Version: v0103
[01:00:34.185,077] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x2620d (sidewalk_event_platform_init), context )
[01:00:34.185,098] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x26301 (sidewalk_event_autostart), context = (n)
[01:00:34.185,127] <dbg> sidewalk_app: sid_thread_entry: event received 0x2620d (sidewalk_event_platform_init) sidewalk workq usage (1/6)
[01:00:34.186,400] <dbg> sid_storage: sid_pal_storage_kv_init: Initialized KV storage
[01:00:34.186,491] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/001c key
[01:00:34.186,509] <dbg> settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/001c key
[01:00:34.186,516] <dbg> sid_storage: storage_key_save_secure: not found key 001c
[01:00:34.186,567] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/001e key
[01:00:34.186,584] <dbg> settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/001e key
[01:00:34.186,605] <dbg> sid_storage: storage_key_save_secure: not found key 001e
[01:00:34.186,662] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0030 key
[01:00:34.186,679] <dbg> settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/0030 key
[01:00:34.186,685] <dbg> sid_storage: storage_key_save_secure: not found key 0030
[01:00:34.186,744] <dbg> sidewalk_app: sid_thread_entry: event received 0x26301 (sidewalk_event_autostart) sidewalk workq usage (0/64) ()
[01:00:34.186,759] <inf> sidewalk_events: Sidewalk link switch to BLE
[01:00:34.186,820] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.186,837] <dbg> settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/0027 key
[01:00:34.188,870] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.188,981] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.189,568] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.189,705] <dbg> sid_mfg: sid_pal_mfg_store_read: secure read tag 6 status -13
[01:00:34.189,816] <dbg> sid_mfg: sid_pal_mfg_store_read: secure read tag 9 status -13
[01:00:34.189,959] <inf> sid_ble: Enable BT
[01:00:34.190,208] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
c7 53 7d bc 06 12 f7 c0 b3 3a 3e 28 8e 56 1e d7 |.S}..... .:>(.V..
a0 be 95 b0 |....
[01:00:34.191,928] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[01:00:34.191,942] <inf> bt_hci_core: HW Variant: nRF54Lx (0x0005)
[01:00:34.191,956] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 199.32083 Build 4145153724
[01:00:34.192,699] <inf> bt_hci_core: Identity: CE:17:1B:E0:BB:0F (random)
[01:00:34.192,715] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x30e8, manufacturer 0x0059
[01:00:34.192,729] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x30e8
[01:00:34.192,735] <inf> sid_ble: BT initialized
[01:00:34.193,629] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.193,747] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.193,885] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.193,989] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.195,193] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[01:00:34.195,208] <dbg> hal_memory: heap_alloc_stats: New max heap usage 24 / 6144
[01:00:34.195,244] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x2654d (sidewalk_event_new_status), context = 0)
[01:00:34.195,252] <inf> APP_SID_HELLO: Status changed: not ready
[01:00:34.195,312] <inf> APP_SID_HELLO: Device Unregistered, Time Sync Fail, Link status: {BLE: Down, FSK: Down, LoRa: Down}
[01:00:34.195,358] <dbg> sidewalk_app: sid_thread_entry: event received 0x2654d (sidewalk_event_new_status) sidewalk workq usage (0/64) )
[01:00:34.295,389] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x26171 (sidewalk_event_process), context = (nil)
[01:00:34.295,432] <dbg> sidewalk_app: sid_thread_entry: event received 0x26171 (sidewalk_event_process) sidewalk workq usage (0/64) ( a)
[01:00:34.395,678] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x26171 (sidewalk_event_process), context = (nil)
[01:00:34.395,721] <dbg> sidewalk_app: sid_thread_entry: event received 0x26171 (sidewalk_event_process) sidewalk workq usage (0/64) ( a)

[00:02:09.298,093] <inf> sid_ble_advert: Change advertisement interval
[00:16:39.297,086] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x26171 (sidewalk_event_process), context = (nil)
[00:16:39.297,130] <dbg> sidewalk_app: sid_thread_entry: event received 0x26171 (sidewalk_event_process) sidewalk workq usage (0/64) ( a)
[00:16:39.297,432] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:16:39.297,571] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:16:39.297,675] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:17:09.298,669] <inf> sid_ble_advert: Change advertisement interval
[00:31:39.297,726] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x26171 (sidewalk_event_process), context = (nil)
[00:31:39.297,770] <dbg> sidewalk_app: sid_thread_entry: event received 0x26171 (sidewalk_event_process) sidewalk workq usage (0/64) ( a)
[00:31:39.298,072] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:31:39.298,211] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:31:39.298,315] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:32:09.299,309] <inf> sid_ble_advert: Change advertisement interval
[00:46:39.298,366] <dbg> sidewalk_app: sidewalk_event_send: sidewalk_event_send event = 0x26171 (sidewalk_event_process), context = (nil)
[00:46:39.298,410] <dbg> sidewalk_app: sid_thread_entry: event received 0x26171 (sidewalk_event_process) sidewalk workq usage (0/64) ( a)
[00:46:39.298,712] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:46:39.298,851] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:46:39.298,955] <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key
[00:47:09.299,949] <inf> sid_ble_advert: Change advertisement interval


We’ve completed onboarding and provisioning the Sidewalk devices.

Now, we need to ensure the firmware porting is correct before obtaining a gateway for testing.

  • Provisioning Data Issues:

    • Observation: We encountered the following error messages: Failed message:
      • settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/001c key
      • settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/001e key
      • settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/0030 key
    • Question:
      • Could these errors indicate missing provisioning data (e.g., device keys or certificates)?
      • After enabling Bluetooth (sid_ble: Enable BT), these errors no longer appear.
        Could you clarify the purpose of these keys and recommend steps to resolve this issue?

  • Firmware Porting Verification:
    • Statement: We aim to ensure the firmware porting is correct before obtaining a gateway for testing.
    • Observation: the log entry <inf> sid_ble_advert: Change advertisement interval
    • Question:
      • Despite this, and due to the absence of any error messages,
        our nRF52840 Bluetooth sniffer did not capture any Sidewalk advertisement packets.
        Could you provide suggestions to ensure these packets are transmitted and detected correctly?

  • PM configuration:
    • Observation:  the pm_static_nrf54l15dk_nrf54l15_cpuapp.yml file, it specifies the following partition sizes:
      • mfg_storage size: 0x1000
      • settings_storage size: 0x2000
    • Question:
      • Is it necessary to include settings_storage in our project? What is its purpose?

Sincerely

Parents
  • Please ignore below question, We are able to observe the advertisement packet by nRF Connect APP running on phone.

    • Firmware Porting Verification:
      • Statement: We aim to ensure the firmware porting is correct before obtaining a gateway for testing.
      • Observation: the log entry <inf> sid_ble_advert: Change advertisement interval
      • Question:
        • Despite this, and due to the absence of any error messages,
          our nRF52840 Bluetooth sniffer did not capture any Sidewalk advertisement packets.
          Could you provide suggestions to ensure these packets are transmitted and detected correctly?

    I would appreciate your assistance in resolving the Provisioning Data issues and the PM configuration

Reply
  • Please ignore below question, We are able to observe the advertisement packet by nRF Connect APP running on phone.

    • Firmware Porting Verification:
      • Statement: We aim to ensure the firmware porting is correct before obtaining a gateway for testing.
      • Observation: the log entry <inf> sid_ble_advert: Change advertisement interval
      • Question:
        • Despite this, and due to the absence of any error messages,
          our nRF52840 Bluetooth sniffer did not capture any Sidewalk advertisement packets.
          Could you provide suggestions to ensure these packets are transmitted and detected correctly?

    I would appreciate your assistance in resolving the Provisioning Data issues and the PM configuration

Children
  • Hi

    I will be looking into your case. Due to summer vacation we have less staff than usual so it might take longer to get a hold for the correct resources. 

    Which version of NCS are you using(In case I need to try to replicate your setup)? 

    Did you remember to use the 54 series part when you created the hex? As it would write the data to a different address as mentioned here

        • Is it necessary to include settings_storage in our project? What is its purpose?

    The setting storage partition is used to store configuration from subsystems that use the settings API like for example BLE or other systems that need to store data and retrieve them after a reboot. I would not drop this partition.  

    Regards

    Runar



  • The SDK version is Add-on-version: v1.0.1 , the NCS is v3.0.0. This version is what I am currently usring.





    That's right, I followed your instructions to generate the hex file.

    The only difference is that I set the MFG partition location differently from the sample in the SDK, but all the other steps and processes were the same.

    Before I flashed the device, it showed that there was nothing in the MFG area, which is why the following message appeared.


    After confirming the hex file generated from the flashing process, the program appears to be running without errors and is able to send advertisement data.  The "failed" message could only be observed after I specifically enabled this setting: CONFIG_SIDEWALK_LOG_LEVEL_DBG=y.
    However, since we currently do not have a gateway to perform registration and testing, I’d appreciate your help in clarifying the issue I'm encountering.

    I’m seeing the following log messages:


    settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/001c key
    settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/001e key
    settings_utils: settings_utils_load_immediate_value: Failed to fetch sidewalk/storage/0000/0030 key

    Additionally, I noticed that before every  sid_ble_advert: Change advertisement interval
    message, the following log appears:

    <dbg> settings_utils: settings_utils_load_immediate_value: loaded sidewalk/storage/0000/0027 key

    I would like your assistance in clarifying my question.



    Below, I’ve attached the steps I took, the yml file I configured, and the certificate.json file I used for testing. They are as follows:
    The steps I took,

    python3 provision.py nordic aws --output_bin mfg.bin --certificate_json certificate.json --addr 0x15f000 --output_hex motive_aws_bc2.hex
    nrfutil device program --x-family nrf54l --options chip_erase_mode=ERASE_RANGES_TOUCHED_BY_FIRMWARE,reset=RESET_PIN,verify=VERIFY_READ --traits jlink --firmware motive_aws_bc2.hex


    The yml file 

    mfg_storage:
    address: 0x15f000
    end_address: 0x160000
    placement:
    after:
    - app
    align:
    start: 0x1000
    before:
    - nvs_storage
    region: flash_primary
    size: 0x1000
    
    settings_storage:
    address: 0x160000
    end_address: 0x162000
    placement:
    after:
    - mfg_storage
    align:
    start: 0x1000
    before:
    - nvs_storage
    region: flash_primary
    size: 0x2000


    certificate.json
    {
      "p256R1": "ooLbB8ovrkEMn3Wk+UbhYe8tcMVTkVuf4H/VC44krP1J1x0hdObZGeW/6tzIILEFRD24Ho1AuG5i1DXksgRfZQQq7D170oEkY2ohcOe8UQ6aBSuGOKxrjmZAgiVaT4yxtDUp8oBWv64+5hsihaU1A6s/jZzajMYgl6DiXO5IS1mB1lrjI8UrOo3xmZ9XkCoJuPXTL/fow4LmnSye2mVOD/RpAPKGG/I9Ba0o0Jpa4TUYX8yIlgNt9HOkul40Ghmr9n3w7gr00eKLBEBqCU6SVzCKAKiMPIG7WETNTuPDuZ5IpVnprcvfHze5IVt35PWxECrZtvmm40TTOBE3i7qZXCp29HtQI4cfYinVedBb8szzz/OJQdRHIpRJHlFUzVyv6CEUYHbMAHi1IDZa4D3HHenp4z7PAz5IkO8sbybFQEUvzWP5T4XLu0UIcbU6GV0jezczphC+vvmiTNEvzEtFBuwxpM94y3Mzh4oICdn3tEfqco83tlmJA0/mejxwz0eKFq3fbbIjlcuYTP4EBQ81JboSQ0+W3TaYKS6Zhzbsfj7T4MO798UmTuIKAHx/ga6kGawneK9RZeR/9y1NAylOpE47FSayU3CYN6xAoLOmPFjDrsSI6nnDhqLHWEj12wLsEBvXVMkkwTO2Awd26zrqxm8RdvjJC6AFMVE2XDwhTUq88Un/ArDGrwn5P6G6/bmXKIVHcqaExYMxIwkFVSaXykvZop06kXP9FdnUdnUAAALPsP34BS6EzJO5AsS5pC7QTpjBtAbLN9SdXOT9w4H1x8Nkp0ujLxWRN37IEy0V9DrPK2w1g74uqWPfUPnSBjtvM55JnQpmm23WQNvHa1Vr6zmWDjzjHpcNirPbzXyBlKEhkX4xylaSMnm4UrVXtAMaAJ/csC4HPTKr3dazdvEkhwGAAAIFByCjSp/5WHc4AhsyjMvKCsZQiKgiI8ECwjfXBaSZdY4zYsRlO3FC428H1atrFChFCZT0Bqt5LPXD38bMSB+vAUJiP8XqiEdXeqf2mYMJ5ykoDpwkve/cUQfPpjzFQlQfvwjBwiJDANKkOKoNT3bUGz+/f/pyTE+xMRdIUBZ1Bw==",
      "eD25519": "ooLbB8ovrkEMn3Wk+UbhYe8tcMVTkVuf4H/VC44krP2F2PMqLyqxHcVPYIO3ZHnXzSUGZ+GHlCi2QtRvMZzIdQXWYoR/TRgijogZFmn6jpuZ/Wv6j4IuJ+A+AiANlkU1v0Fnfw2oDjncCyS/6LgD9mzgcHZAcnqm8MJb0U/NFQz1aQDyTuwXqvwpRBDW9oeaOsQTxzUXX7Gv8sW/Vq9BkPMKO/GEm45gGdNwtUZx4YP6lRGWdynyWVrlUWkr1w+Mng/6RQCefH8YQ4WUCSsGod7nqFYSPxdLRGGug7ktwTw2obYDd8wAeBFUTWIonv05f9vQVLbx4UkHS4x6s+QOt478zyMRminEHm1jdr5ha9fNWrv32gXytttE/TewlKhqvL0Lug9Q5jvVE5vdKX0E7DMmg5AackOX32t7M6/jyg9VnnjmJEOLBuMKAHx1Qs6x7id7wbIzHtD38CGWNdclxXUJp7OpFB1CarQOsDdYr+eEfWxwPEtOys+oOXSG7aXXMOD7Ovdeo6+XEwvlu3pJO1dh0LIxbL/QP9FCOpfkLfRFUtZl/1ElwvhSoQh1AAADGz+gFBeX/ZNN8VJwnsNfgzj4me1HgVJdUo4W9kvx9cr2jHWkC3Oj/bdBTh1+yBjOC53yHlQK/l1GHrEWiWPPnE434LRxnWkwr8EHD4oieJxC8fkIxkQfj+gHhU79Z+oAAYAAAzsnf9SDIZPoDXF0TdC9POqTgld0oXDl2XPaVD4CvvLearrOSlFv+lsNbC4rgZn23MtIBM/7YQmJwmQ+FXRup6Tkubg1hpz04J/09dxg8UiZmntHiUr1GfkTOFMYqRB+Aw==",
      "metadata": {
        "deviceTypeId": "AJUR09PI2LUDA",
        "applicationDeviceArn": "arn:aws:iotwireless:us-east-1:261701980167:WirelessDevice/6e3e0677-1543-469e-8db9-28918c7d45e0",
        "applicationDeviceId": "6e3e0677-1543-469e-8db9-28918c7d45e0",
        "smsn": "A282DB07CA2FAE410C9F75A4F946E161EF2D70C553915B9FE07FD50B8E24ACFD",
        "devicePrivKeyP256R1": "4510e8027cf9589a3450d0a5341c621f6ad76cf47452770ea034f82f882b83ba",
        "devicePrivKeyEd25519": "1c811c5a580dac9730a1d64bf099571e70d42dfe5d384a30b1276dd101dc4add"
      },
      "applicationServerPublicKey": "8689a21d846c0cc3a72bd490a0198d2efad5092c4f88ca5b64675edbfccb04b2"
    }
    The output log when the dbg log level is disabled.
Related