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

Buttonless OTA DFU

Hi,

I am developing a PC app to Buttonless OTA DFU a device(nrf52840) using BLE USB dongle(nrf52840).

1 . The device need a secure bootloader and the ble_app_buttonless_dfu example.

2 . What code or example have to be flashed to my dongle in order to use it and DFU the device from PC throw it !?

3 . I have to use the nrfutil commands from PC, How ?

Best Regards

Jawad

Parents
  • 3. You can use the command: "nrfutil dfu ble ..." to transfer an image via the nRF52840 dongle. The command you need to use is:

    nrfutil dfu ble -pkg dfu_image.zip -ic NRF52 -p COMXX -n "DfuTarg"

    where COMXX is the com port that the dongle is connected to, and "DfuTarg" must be changed to the advertising name that the target nRF is using.

    You also need to program the connectivity FW on the dongle. You can do this using nRF Connect. Usually, if you use a DK, you can add the --flash_connectivity flag, but this doesn't work on the dongle, as it is running a separate bootloader, and doesn't have the programming chip. You can flash the connectivity firmware by connecting the dongle, putting it in bootloader mode, and then selecting it from the nRF Connect for Desktop app -> BLE. It will ask if you want to program the dongle, click "Yes". 

    If you need this connectivity FW, you can always read it back from the dongle, to store it in a hex file, using the nRF Connect for Desktop -> programmer app.

    So to answer your other questions:

    1. Yes, the bootloader project can be found in SDK\examples\dfu\secure_bootloader\

    2. see answer to 3.

    Did that answer your questions? Or did I misunderstand your question?

    Best regards,

    Edvin

  • Hi Edvin,

    I followed your directions for #3, however when I try to use nrfutil with the specified com port, I'm get the follow error:

    nrfutil dfu ble -ic NRF52 -pkg dfu-implant-86accfc2-2021-01-11-14-13-42.zip -port=COM14 -a "F49668C262FB" -f

    Traceback (most recent call last):
    File "C:\Python\Python2716\Scripts\nrfutil-script.py", line 11, in <module>
    load_entry_point('nrfutil==5.2.0', 'console_scripts', 'nrfutil')()
    File "c:\python\python2716\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
    File "c:\python\python2716\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
    File "c:\python\python2716\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "c:\python\python2716\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "c:\python\python2716\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "c:\python\python2716\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
    File "c:\python\python2716\lib\site-packages\nordicsemi\__main__.py", line 1129, in ble
    flasher = Flasher(serial_port=port, snr = jlink_snr)
    File "c:\python\python2716\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 1072, in __init__
    raise NordicSemiException('board not found')
    pc_ble_driver_py.exceptions.NordicSemiException: board not found

    The dongle shows up in my Window Device Manager as "USB Serial Device (COM14)"

    Could you help me figure out how to get nrfutil to detect my dongle?

    Thanks!

Reply
  • Hi Edvin,

    I followed your directions for #3, however when I try to use nrfutil with the specified com port, I'm get the follow error:

    nrfutil dfu ble -ic NRF52 -pkg dfu-implant-86accfc2-2021-01-11-14-13-42.zip -port=COM14 -a "F49668C262FB" -f

    Traceback (most recent call last):
    File "C:\Python\Python2716\Scripts\nrfutil-script.py", line 11, in <module>
    load_entry_point('nrfutil==5.2.0', 'console_scripts', 'nrfutil')()
    File "c:\python\python2716\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
    File "c:\python\python2716\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
    File "c:\python\python2716\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "c:\python\python2716\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "c:\python\python2716\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "c:\python\python2716\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
    File "c:\python\python2716\lib\site-packages\nordicsemi\__main__.py", line 1129, in ble
    flasher = Flasher(serial_port=port, snr = jlink_snr)
    File "c:\python\python2716\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 1072, in __init__
    raise NordicSemiException('board not found')
    pc_ble_driver_py.exceptions.NordicSemiException: board not found

    The dongle shows up in my Window Device Manager as "USB Serial Device (COM14)"

    Could you help me figure out how to get nrfutil to detect my dongle?

    Thanks!

Children
No Data
Related