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

SDK 15 and Mesh 2.0 Generate a DFU file with nrfutil - ValueError

We used nRF5_SDK_15.0.0_a53641a and nrf5_SDK_for_Mesh_v2.0.0_src.

We are following DFU quick start guide http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v0.10.0%2Findex.html

For nRF52:

mesh-sdk$ nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_5.0.0.hex \
--company-id 0x00000089 \
--application-id 1 \
--application-version 2 \
--key-file private_key.txt \
--sd-req 0x009D \
--mesh dfu_test.zip
We used "--company-id 0x00000089 \" to match Step 2 public key:
{
"bootloader_config": {
"bootloader_id": 1,
"bootloader_version": 1,
"company_id": 89,
"application_id": 1,
"application_version": 1,
"public_key": "ed09a58df6db5cd15b8637304f31d31f4042492ed7c7e4839fbe903f260a2ba1a855e92b72885825481ad56282bcf549ad7455ec46f000f0f62d97eeec883ba6"
}
}
The hex we used is C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\bin\blinky\blinky_nrf52832_xxAA_s132_5.0.0.hexblinky_nrf52832_xxAA_s132_5.0.0.hex
We got ValueError, please see attached screen shot. 
Please advise.  Thanks
Parents
  • Sorry, please forget above error.  Today, we started from step 1 of the DFU quick start guide

    http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.0.1%2Fmd_doc_getting_started_dfu_quick_start.html

    Attached is CMD commands file

    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools\dfu>cd ..
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools>cd ...
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools>cd ..
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil keys --show-vk hex private_k
    y.txt
    Verification key Qx: 3945432e6a79ffab61a713a4b363e46d2c8d0ab1ee06693269728ecffa
    11155
    Verification key Qy: dc64ce8b83c13fc6bb6d50923cf3b28b23f30d8faa0efa2f097a5c8a39
    597d5
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu genpkg --application bin
    blinky/blinky_nrf52832_xxAA_s132_5.0.0.hex --company-id 0x00000089 --applicatio
    -id 1 --application-version 2 --key-file private_key.txt --sd-req 0x009D --mesh
    dfu_test.zip
    Key file was given, setting DFU version to 0.8
    Zip created at dfu_test.zip
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>cd tools/dfu
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools\dfu>python device_page_generat
    r.py -d nrf52832_xxAA -sd "s132_5.0.0"
    Traceback (most recent call last):
      File "device_page_generator.py", line 241, in <module>
        main()
      File "device_page_generator.py", line 235, in main
        write_specific_page(platforms, softdevices, args)
      File "device_page_generator.py", line 178, in write_specific_page
        device_page = DevicePage(platform, softdevice, bootloader_config)
      File "device_page_generator.py", line 94, in __init__
        self.generate_entries(platform, softdevice, bootloader_config)
      File "device_page_generator.py", line 103, in generate_entries
        DevicePageEntry(BLInfoType.ECDSA_PUBLIC_KEY, public_key))
      File "device_page_generator.py", line 69, in __init__
        raise TypeError
    TypeError
    
    

    Now we got TypeError.  I also attached bootloader_config_default.json and the file tree of SDK 15 and Mesh.  Please advise.  Thanks.

    {
        "bootloader_config": {
            "bootloader_id": 1,
            "bootloader_version": 1,
            "company_id": 89,
            "application_id": 1,
            "application_version": 1,
    		"public_key": 
    	"d78ea2728b31c63b185402f4209803b478d0828b02a0f44da9f5d782b047fe45b60bf4db2e572b4b6053c0c7e9371b309c93ee53c300906afc6c7f2d99ce11cd"	
    	
        }
    }
    

Reply
  • Sorry, please forget above error.  Today, we started from step 1 of the DFU quick start guide

    http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.0.1%2Fmd_doc_getting_started_dfu_quick_start.html

    Attached is CMD commands file

    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools\dfu>cd ..
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools>cd ...
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools>cd ..
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil keys --show-vk hex private_k
    y.txt
    Verification key Qx: 3945432e6a79ffab61a713a4b363e46d2c8d0ab1ee06693269728ecffa
    11155
    Verification key Qy: dc64ce8b83c13fc6bb6d50923cf3b28b23f30d8faa0efa2f097a5c8a39
    597d5
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu genpkg --application bin
    blinky/blinky_nrf52832_xxAA_s132_5.0.0.hex --company-id 0x00000089 --applicatio
    -id 1 --application-version 2 --key-file private_key.txt --sd-req 0x009D --mesh
    dfu_test.zip
    Key file was given, setting DFU version to 0.8
    Zip created at dfu_test.zip
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>cd tools/dfu
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\tools\dfu>python device_page_generat
    r.py -d nrf52832_xxAA -sd "s132_5.0.0"
    Traceback (most recent call last):
      File "device_page_generator.py", line 241, in <module>
        main()
      File "device_page_generator.py", line 235, in main
        write_specific_page(platforms, softdevices, args)
      File "device_page_generator.py", line 178, in write_specific_page
        device_page = DevicePage(platform, softdevice, bootloader_config)
      File "device_page_generator.py", line 94, in __init__
        self.generate_entries(platform, softdevice, bootloader_config)
      File "device_page_generator.py", line 103, in generate_entries
        DevicePageEntry(BLInfoType.ECDSA_PUBLIC_KEY, public_key))
      File "device_page_generator.py", line 69, in __init__
        raise TypeError
    TypeError
    
    

    Now we got TypeError.  I also attached bootloader_config_default.json and the file tree of SDK 15 and Mesh.  Please advise.  Thanks.

    {
        "bootloader_config": {
            "bootloader_id": 1,
            "bootloader_version": 1,
            "company_id": 89,
            "application_id": 1,
            "application_version": 1,
    		"public_key": 
    	"d78ea2728b31c63b185402f4209803b478d0828b02a0f44da9f5d782b047fe45b60bf4db2e572b4b6053c0c7e9371b309c93ee53c300906afc6c7f2d99ce11cd"	
    	
        }
    }
    

Children
No Data
Related