Workflow for DFU via BLE on Windows

Hi

I'm using an nRF52840 with Zephyr and nRF Connect SDK v2.1.0.

I can update my device with the nRF Connect App on my smartphone. On Windows however, I had no luck so far. Has someone a workflow for that? What I tried:

  1. nrfutil.exe (in combination with a nRF53840 Dongle): The build system doesn't generate the package file (even though there is a file that looks like it on first sight: dfu_application.zip). I tried to generate this file myself and got the following error when using it to update:
    C:\xx\build\zephyr>nrfutil dfu ble -pkg dfu.zip -ic NRF52 -p COM10 -n "MyDevice"
    [------------------------------------] 0%
    Traceback (most recent call last):
    ...
    File "C:\Users\giz\AppData\Local\Programs\Python\Python310\lib\site-packages\pc_ble_driver_py\ble_adapter.py", line 400, in enable_notification
    raise NordicSemiException("CCCD not found")
    pc_ble_driver_py.exceptions.NordicSemiException: CCCD not found
  2. mcumgr apparently doesn't support Windows
  3. Even though I need a way to automate the process, I still gave the nRF Connect App a try (again with the Dongle): The DFU button does not show up here when connected to the device.
Parents Reply Children
  • Hi Runar,


    VSCode generates dfu_application.zip in the build folder. Are you saying this is the file that's actually supposed to be used with nrfutil? What do I need to change in my setup for it to work? nrfutil complains with the following error when trying to update with this file:

    KeyError: 'manifest'

    When generating the package file 'manually', the manifest in the zip file is different. By manual, I mean I created the package file using nrfutil. I'm confused with what this package file actually needs to contain, so I wouldn't be surprised if what I tried for testing is wrong:

    nrfutil pkg generate --hw-version 52 --sd-req 0x123 --application-version 4 --application app_signed.hex dfu.zip

    I would really appreciate if VSCode would just output the correct file without me having to dig into this.

    Regarding the dongle, yes, I've put it into bootloader mode before programming. My device connects, it lists all my services and I evencan read/write my characteristics. So I assume the dongle is correctly programmed?

  • Hi again. I missed your question a bit and I apologize for the confusion. 

    1. The nRF Util for nRF5 SDK only supported dfu created by nRF5 SDK and not a project created by nRF Connect SDK

    2 & 3. Currently FOTA is not supported in windows and you will have to use either linux, osx, or android/iOS 

    One alternativ for linux would be to look into MCUmgr-cli https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/mcumgr.html

    Regards

    Runar

Related