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.

  • Hi.

    Could you please answer these two questions?

    1. Which version of nrfutil do you have? (write nrfutil version in CMD to check)

    2. Are you sure that usbmodem0006829949971 is the correct COM PORT? It sounds a bit strange.

    Best regards,

    Andreas

  • Please find the screenshot below showing version and com ports

    Whenever I use UART example, I use the same thing usbmodem000xxxxxxxxxx to specify the COM PORT. I haven't tried adding "tty." at the beginning. Should I be doing that?

  • Hi.

    If that port worked with the UART example, then is should also work with this example.

    Have you tried troubleshooting: Verifying your bootloader with the bootloader_verify.py script.

    To verify that the bootloader is working correctly, run the bootloader verification script located in tools/dfu. Note that it requires the pyserial package and that nrfjprog is present in your PATH.

    python bootloader_verify.py <serial number> <COM port>

    The output should look like this:

    Reading UICR.. OK.
    Reading Device page.. OK.
    Resetting device.. OK.
    Checking serial connection.. OK.
    
    Bootloader verification OK

    Run nrfjprog --reset to reset the board back to a well-known state of operation after running the bootloader verification script.

    Best regards,

    Andreas

  • When I try to run the boot loader verification command, it returns the following error:

     

    Reading UICR.. Traceback (most recent call last):

      File "bootloader_verify.py", line 174, in <module>

        bootloader_addr = read_uicr(sys.argv[1])

      File "bootloader_verify.py", line 65, in read_uicr

        read = nrfjprog("-s " + serial_number + " --memrd 0x10001014 --n 4 --w 32").strip()

      File "bootloader_verify.py", line 52, in nrfjprog

        process = subprocess.Popen(shlex.split("nrfjprog " + args), stdout=subprocess.PIPE)

      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 390, in __init__

        errread, errwrite)

      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1024, in _execute_child

        raise child_exception

    OSError: [Errno 2] No such file or directory

  • Also is the Segger ID i.e the number on the board 682xxxxxx represent the serial number? 

    If not, where could I find the serial number that can be used to do the boot loader verification?

Related