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

SDK14: serial DFU not working

I have successfully used the guide for BLE DFU.

But now I have trouble using the DFU via serial port. Do you have a guide for serial DFU?

I have tried two things.

A) Use prebuilt test images.

  1. Use nRFgo to program the DFU test images on V14: softdevice_bootloader_secure_serial_debug_without_bonds_s132.hex and ble_app_buttonless_dfu_without_bonds_s132_with_setting_page.hex

  2. When device boots up, it goes to application mode with LED1 blinking.

  3. Press Button4+Reset, LED3 is not on, but LED1 and LED4 are on. Don't know what state it is in.

  4. Run nrfutil dfu serial -pkg ble_app_buttonless_dfu_without_bonds_s132.zip -p COM5 got error, and LED2 and 4 are on.

[------------------------------------] 0%

 Traceback (most recent call last):
      File "nordicsemi\__main__.py", line 872, in <module>
      File "site-packages\click\core.py", line 722, in __call__
      File "site-packages\click\core.py", line 697, in main
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 895, in invoke
      File "site-packages\click\core.py", line 535, in invoke
      File "nordicsemi\__main__.py", line 656, in serial
      File "nordicsemi\dfu\dfu.py", line 122, in dfu_send_images
      File "nordicsemi\dfu\dfu.py", line 83, in _dfu_send_image
      File "nordicsemi\dfu\dfu_transport_serial.py", line 190, in open
      File "nordicsemi\dfu\dfu_transport_serial.py", line 314, in __ping
    pc_ble_driver_py.exceptions.NordicSemiException: No ping response
    Failed to execute script __main__

B) Built own images

  1. Built bootloader_secure_serial with own key, program it from Keil

  2. Built ble_app_buttonless_dfu in Keil, program the app and softdevice from Keil

  3. When device boots, LED1 and 3 are on. Seems it goes to DFU mode, and cannot go to application mode.

  4. Run nrfutil dfu serial -pkg package.zip -p COM5 got the same error message as A), and LED2 and 3 are on.

Parents
  • Hi Rbai,

    Please check if you can communicate with the chip via COM5. You can test using UART example in the SDK.

    Also please make sure you have nrfutil version >=2.2.0 as mentioned in the doc.

    I followed your step in A) and got no issue, it's updated normally.

    When you do B, please try to test with the DFU mode first (because you need to modify the bootloader setting if you want to start the app by flashing it directly) Please have a look at the nrfutil to know how to generate bootloader setting hex. You can have a look at my blog here:

    devzone.nordicsemi.com/.../

Reply
  • Hi Rbai,

    Please check if you can communicate with the chip via COM5. You can test using UART example in the SDK.

    Also please make sure you have nrfutil version >=2.2.0 as mentioned in the doc.

    I followed your step in A) and got no issue, it's updated normally.

    When you do B, please try to test with the DFU mode first (because you need to modify the bootloader setting if you want to start the app by flashing it directly) Please have a look at the nrfutil to know how to generate bootloader setting hex. You can have a look at my blog here:

    devzone.nordicsemi.com/.../

Children
Related