DFU cycle testing

Hi ! 

I have 5 different bootloaders for 5 pieces of hardware that I would like to cycle test OTA DFU with BLE. 
I have some questions

  • Why does nrfutil dfu ble require a COM port? the DFU IOS app does not, seems strange, and also fails because I don't have a COM port connected. 
  • What's the shortest path to script a BLE DFU from either
    • Mac M2
    • RPI 5
    • Windows 10 machine

The COM port thing is holding me up in mac/windows. 
The RPI5 lack of modern python support + non x86_64 is making this seemingly simple task in to a can of worms  

Parents
  • Hello,

    Could you clarify how the devices are connected? Specifically, which device is connected to your PC, and which one is the DFU target? 

    I also recommend sharing the complete log to get a better understanding of the issue. Additionally, please provide details on the command you are executing and the response from the logs.

    Furthermore, please check how the nRF device is detected on your PC. I am using Windows, and when I check my Device Manager, it appears as shown below:



    Please share this details as well.

    Kind Regards,

    Abhijith

Reply
  • Hello,

    Could you clarify how the devices are connected? Specifically, which device is connected to your PC, and which one is the DFU target? 

    I also recommend sharing the complete log to get a better understanding of the issue. Additionally, please provide details on the command you are executing and the response from the logs.

    Furthermore, please check how the nRF device is detected on your PC. I am using Windows, and when I check my Device Manager, it appears as shown below:



    Please share this details as well.

    Kind Regards,

    Abhijith

Children
  • I'll follow up soon Abhijith. Apologies for the delay. 

  • Are you plugging in the NRF USB or the MCU/JLink USB where I usually program things?

    I flashed the pca10056 with nRF5_SDK_17.1.0//examples/connectivity/ble_connectivity/hex/ble_connectivity_s140_usb_hci_pca10056.hex

    On my Mac, I see 3 ports enumerate. The one beginning with EA is the nrf USB port. 
    The others are the programming port. 

    crw-rw-rw-  1 root  wheel  0x900000c Feb 27 07:18 /dev/tty.usbmodemEA15B1D95C5B1
    crw-rw-rw-  1 root  wheel  0x9000008 Feb 27 07:08 /dev/tty.usbmodem0010502831501
    crw-rw-rw-  1 root  wheel  0x900000a Feb 27 07:08 /dev/tty.usbmodem0010502831503

    nrfutil dfu ble -pkg ~/Downloads/v1.0.93.zip -ic NRF52 -p /dev/tty.usbmodemEA15B1D95C5B1  -n "device" -f 

    Flashing connectivity firmware...

    2025-02-27 07:17:51,285 No trigger interface found for device with serial number: EA15B1D95C5B, Product ID: 0x521B and Vendor ID: 0x1915

    Traceback (most recent call last):

      File "nordicsemi/__main__.py", line 1555, in <module>

      File "click/core.py", line 1137, in __call__

      File "click/core.py", line 1062, in main

      File "click/core.py", line 1668, in invoke

      File "click/core.py", line 1668, in invoke

      File "click/core.py", line 1404, in invoke

      File "click/core.py", line 763, in invoke

      File "nordicsemi/__main__.py", line 1200, in ble

      File "nordicsemi/dfu/dfu.py", line 119, in dfu_send_images

      File "nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image

      File "nordicsemi/dfu/dfu_transport_serial.py", line 214, in open

    pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port

     

  • I got a little farther with a windows 10 PC and the UART firmware instead of USB HCI

    ble_connectivity_s140_uart_pca10056.hex  - The JLink port enumerates as COM4, single com port. 

    On my device to DFU, I can see it advertise 'devicename' on nrfConnect, and I can connect to it and run a full DFU from NRF DFU app. 

    When I try with nrfutil - 


    & 'C:\Users\mike\Downloads\nrfutil.exe' dfu ble -pkg C:\Users\mike\Downloads\dfu.zip -ic NRF52 -p COM4 -n devicename -f
    Board already flashed with connectivity firmware.
    [------------------------------------] 0%
    Traceback (most recent call last):
    File "nordicsemi\__main__.py", line 1555, in <module>
    File "click\core.py", line 1137, in __call__
    File "click\core.py", line 1062, in main
    File "click\core.py", line 1668, in invoke
    File "click\core.py", line 1668, in invoke
    File "click\core.py", line 1404, in invoke
    File "click\core.py", line 763, in invoke
    File "nordicsemi\__main__.py", line 1215, in ble
    File "nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
    File "nordicsemi\dfu\dfu.py", line 88, in _dfu_send_image
    File "nordicsemi\dfu\dfu_transport_ble.py", line 474, in open
    File "nordicsemi\dfu\dfu_transport_ble.py", line 103, in open
    File "pc_ble_driver_py\ble_driver.py", line 106, in wrapper
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_TIMEOUT
    [6552] Failed to execute script '__main__' due to unhandled exception!

  • I got it working with the UART firmware on windows in power shell. 

  • The trick to getting it to work on my mac was to drop the "-f" from the command. 
    Also, I had to use the lower number enumerated com port. Which is backwards from what I saw in windows. 

Related