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

DFU example

Hi,

I am trying to implement the DFU example from Mesh 3.1.0SDK and 15.2.0 SDK. I am following the process mentioned here.

I am using a MacOS for development.

I am able to execute steps 1 through 9 successfully but when I execute step 10, it says:

command - nrfutil dfu serial -pkg dfu_test.zip -p usbmodem0006829949971 -b 115200 -fc --mesh

Upgrading target on usbmodem0006829949971 with DFU package /Users/xxx/xxx/xxx/xxx/dfu_test.zip. Flow control is enabled.

Failed to upgrade target. Error is: Serial port could not be opened on usbmodem0006829949971. Reason: 

Possible causes:

- bootloader, SoftDevice or application on target does not match the requirements 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.


I am guessing that the possible reason would be the third one i.e target isn't in the DFU mode. I am not completely sure.

What might be the reason for this dfu failure?

Thank you.

  • Could you copy and paste the command you used when you called the bootloader_verify.py file?

    The command that I used is:

    python bootloader_verify.py 682994997 usbmodem0006829949971

    Are you sure that it is the correct Python if you have both Python 2.7 and 3.5(++)?

    Yes. I have only version 2.7

  • Hi.

    Could we walk through the steps with what commands that you are using?

    Did you create a key file, and did you add the public key to the device page?

    What command did you generate the DFU packet with?

    Does the SoftDevice ID you generated the DFU packet with match the SoftDevice ID you used when you generated the device page hex file?

    Can you try to do the DFU with the command (and could you post the output log):

    nrfutil --verbose dfu serial -pkg dfu_test.zip -p usbmodem0006829949971 -b 115200 -fc --mesh

    And last, do you have any other versions of nrfutil, are you sure that when you called the command which started the dfu, that nrfutil version 0.3.0.0 is actually running?

    Best regards,

    Andreas

  • Hi,

    Could we walk through the steps with what commands that you are using?

    Yes, I have followed all the commands in the order as mentioned here.

    Did you create a key file, and did you add the public key to the device page?

    Yes, I generated a private_key.txt using: 

    nrfutil keys --gen-key private_key.txt 

    Also, generated public keys and added them into bootloader_config_default.json file.

    What command did you generate the DFU packet with?

    I generated the DFU packet using

    nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_6.1.0.hex \
    --company-id 0x00000059 \
    --application-id 1 \
    --application-version 2 \
    --key-file private_key.txt \
    --sd-req 0x00AF \
    --mesh dfu_test.zip
    and created the device page file in the tools/dfu folder using:
    python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.1.0"
    Does the SoftDevice ID you generated the DFU packet with match the SoftDevice ID you used when you generated the device page hex file?

    Yes, I am using soft device version 6.1.0.

    Can you try to do the DFU with the command (and could you post the output log):

    The verbose command also resulted in the similar response

    do you have any other versions of nrfutil,

    No.

    are you sure that when you called the command which started the dfu, that nrfutil version 0.3.0.0 is actually running?

    Yes, it does generate the keys and dfu packet

  • Hi.

    What firmware do you have on the device before you start the DFU procedure?

    Best regards,

    Andreas

  • I think I had some mesh example firmware on the board before I started with DFU.

    Does the previous firmware before erasing the board has affect on the DFU implementation?

  • Related