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
  • Thanks Bjorn.  Yes, Step 4 works now.  We continued following the DFU quick start guide, but since Step 8 stated that "Building the mesh stack. If you have built them with Segger Embedded Studio, you can flash the DFU example directly from the IDE, as described in the build-guide, and move on to step 9."

    I think we got step 8 done, but not sure how to verify it so we just skipped step 8 and move to step 9.  Now we are up to Step 10.  Please see the attached CMD Scripts that 

    Failed to upgrade target. Error is: Serial port could not be opened on COM48. Re
    ason: could not open port u'COM48': WindowsError(2, 'The system cannot find the
    file specified.')

    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\examples>cd ..
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program tools/dfu/bin/devi
    ce_page_nrf52832_xxAA_s132_5.0.0.hex
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --reset
    Applying system reset.
    Run.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program bin/softdevice/s13
    2_nrf52_5.0.0_softdevice.hex --chiperase
    Parsing hex file.
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program bin/bootloader/arm
    cc/mesh_bootloader_armcc_nrf52832_xxAA.hex
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program tools/dfu/bin/devi
    ce_page_nrf52832_xxAA_s132_5.0.0.hex
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>--reset
    '--reset' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --reset
    Applying system reset.
    Run.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p <COM port> -b 115200 -fc --mesh
    The system cannot find the file specified.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p COM48 -b 115200 -fc --mesh
    Upgrading target on COM48 with DFU package C:\Nordic\nRF5_SDK_15.0.0_a53641a\mes
    h_sdk\dfu_test.zip. Flow control is enabled.
      [------------------------------------]    0%
    
    Failed to upgrade target. Error is: Failed to establish connection
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirement
    s in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET
     and release both to enter DFU mode.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p COM48 -b 115200 -fc --mesh
    Upgrading target on COM48 with DFU package C:\Nordic\nRF5_SDK_15.0.0_a53641a\mes
    h_sdk\dfu_test.zip. Flow control is enabled.
      [------------------------------------]    0%
    
    Failed to upgrade target. Error is: Serial port could not be opened on COM48. Re
    ason: could not open port u'COM48': WindowsError(2, 'The system cannot find the
    file specified.')
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirement
    s in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET
     and release both to enter DFU mode.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p COM48 -b 115200 -fc --mesh
    Upgrading target on COM48 with DFU package C:\Nordic\nRF5_SDK_15.0.0_a53641a\mes
    h_sdk\dfu_test.zip. Flow control is enabled.
      [------------------------------------]    0%
    
    Failed to upgrade target. Error is: Serial port could not be opened on COM48. Re
    ason: could not open port u'COM48': WindowsError(2, 'The system cannot find the
    file specified.')
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirement
    s in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET
     and release both to enter DFU mode.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>

    I also attached the directory folder to show you where the dfu_test.zip located.

    device_page_nrf52832_xxAA_s132_5.0.0.hex and
     
    dfu_test.zip are also attached.

    Please advise.

Reply
  • Thanks Bjorn.  Yes, Step 4 works now.  We continued following the DFU quick start guide, but since Step 8 stated that "Building the mesh stack. If you have built them with Segger Embedded Studio, you can flash the DFU example directly from the IDE, as described in the build-guide, and move on to step 9."

    I think we got step 8 done, but not sure how to verify it so we just skipped step 8 and move to step 9.  Now we are up to Step 10.  Please see the attached CMD Scripts that 

    Failed to upgrade target. Error is: Serial port could not be opened on COM48. Re
    ason: could not open port u'COM48': WindowsError(2, 'The system cannot find the
    file specified.')

    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk\examples>cd ..
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program tools/dfu/bin/devi
    ce_page_nrf52832_xxAA_s132_5.0.0.hex
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --reset
    Applying system reset.
    Run.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program bin/softdevice/s13
    2_nrf52_5.0.0_softdevice.hex --chiperase
    Parsing hex file.
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program bin/bootloader/arm
    cc/mesh_bootloader_armcc_nrf52832_xxAA.hex
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --program tools/dfu/bin/devi
    ce_page_nrf52832_xxAA_s132_5.0.0.hex
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>--reset
    '--reset' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfjprog --reset
    Applying system reset.
    Run.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p <COM port> -b 115200 -fc --mesh
    The system cannot find the file specified.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p COM48 -b 115200 -fc --mesh
    Upgrading target on COM48 with DFU package C:\Nordic\nRF5_SDK_15.0.0_a53641a\mes
    h_sdk\dfu_test.zip. Flow control is enabled.
      [------------------------------------]    0%
    
    Failed to upgrade target. Error is: Failed to establish connection
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirement
    s in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET
     and release both to enter DFU mode.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p COM48 -b 115200 -fc --mesh
    Upgrading target on COM48 with DFU package C:\Nordic\nRF5_SDK_15.0.0_a53641a\mes
    h_sdk\dfu_test.zip. Flow control is enabled.
      [------------------------------------]    0%
    
    Failed to upgrade target. Error is: Serial port could not be opened on COM48. Re
    ason: could not open port u'COM48': WindowsError(2, 'The system cannot find the
    file specified.')
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirement
    s in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET
     and release both to enter DFU mode.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>nrfutil dfu serial -pkg dfu_test.zip
    -p COM48 -b 115200 -fc --mesh
    Upgrading target on COM48 with DFU package C:\Nordic\nRF5_SDK_15.0.0_a53641a\mes
    h_sdk\dfu_test.zip. Flow control is enabled.
      [------------------------------------]    0%
    
    Failed to upgrade target. Error is: Serial port could not be opened on COM48. Re
    ason: could not open port u'COM48': WindowsError(2, 'The system cannot find the
    file specified.')
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirement
    s in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET
     and release both to enter DFU mode.
    
    C:\Nordic\nRF5_SDK_15.0.0_a53641a\mesh_sdk>

    I also attached the directory folder to show you where the dfu_test.zip located.

    device_page_nrf52832_xxAA_s132_5.0.0.hex and
     
    dfu_test.zip are also attached.

    Please advise.

Children
No Data
Related