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.

Parents
  • Hello,

    Can you please try to add the following when you call the nrfutil scripts:

    Instead of e.g. nrfutil --verbose dfu serial -pkg dfu_test.zip -p usbmodem0006829949971 -b 115200 -fc --mesh

    can you try to use the full path to the COM port:

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

    It worked for someone else having some problems with Mac and nrfutil.

    BR,

    Edvin

  • Hi

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

    This command worked. It opened the serial port and it took around 10 minutes trying to do dfu and finally it failed. The response is as follows:

    Upgrading target on /dev/tty.usbmodem0006829949971 with DFU package /Users/developerbubblynet/Desktop/MeshSDK/dfu_MeshSDK310/dfu_test.zip. Flow control is enabled.

    Flushing com-port...

    Opened com-port

    Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 2468

    Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.

    PC -> target: 0502aabbccdd

    PC -> target: 0502aabbccdd

    PC -> target: 0502aabbccdd

    PC -> target: 0502aabbccdd

    PC -> target: 0502aabbccdd

    Failed to upgrade target. Error is: Failed to establish connection

    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.

    Closing serial port...

    The line PC -> target: 0502aabbccdd prints every 2/3 minutes and finally after 10 minutes or more, it failed.

  • Ok. I don't know why it is not working. Can you describe how you changed the Serial interface when you changed the UART pins? Did you turn off flow control?

    Can you send the updated hex files with the correct UART settings? The previous version wasn't working, I can confirm that. But there has to be something that you have either changed, or done correctly when following the guide. Was there some part of the guide that you were uncertain of, where you may have done something incorrectly?

    I am really trying to understand why it isn't working, but all I can see from the information you describe is that the board isn't responding, so at this point, anything could be the source of the issue.

    BR,

    Edvin

  • Hi!

    We tried to run this from the scratch: stock 15 SDK, Stock Mesh SDK, everything as it comes from Nordics downloads pages, but still didn't work... So we doubt this is anything related to the UART changes we made on our custom firmware.

    We are going to run the example again on a completely stock setup again just to be sure... but we doubt this is going to make any difference... all in all IMHO, the documentation could be more clear and useful?

    Following are the files that I generated and flashed after changing the UART pins to initial configurations and also pca10040 file with pin configurations:

    3731.device_page_nrf52832_xxAA_s132_6.1.0.hex

    4405.dfu_nrf52832_xxAA_s132_6.1.0.hex

    1016.dfu_test.zip

    8203.mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex

    pca10040.h

    0250.s132_nrf52_6.1.0_softdevice.hex

    Thank you.

  • Can you zip the DFU example that you are using? I want to test it. Zip the entire folder: SDK_for_Mesh\examples\dfu.

    You use Segger Embedded Studio, right? And what SDK_for_mesh version do you use? (and what "normal" SDK version do you use with it?)

    I want to see if I can get it up an running on my computer. Basically, if there are some project settings that are causing the issues, or if it is the procedure. 

    BR,

    Edvin

  • You use Segger Embedded Studio, right? And what SDK_for_mesh version do you use?

    Yes, I am using Segger IDE. I am using 15.2.0 SDK and 3.1.0 Mesh SDK

    I have attached the compressed folder of dfu example below. I have removed the build folder and zipped it as it was giving an error to upload a large file

    4745.dfu.zip

    Thank you.

  • Hi Edvin,

    Finally, I got the DFU up and running. I downloaded everything from the website and repeated the process from the scratch and it worked. 

    My best guess is that DFU wasn't being pushed properly because of some random change in the 15.2.0 SDK (may be UART files) which was made in a different application or somehow!! 

    Thanks a lot for your patience. Slight smile

Reply Children
Related