How to DFU nRF52833 OTA over Non Nordic standard Bluetooth module

Hello,

We have nRF52833 on the custom board, now we want to do DFU over Bluetooth. During my initial research reults with following questions:

If you use

1. "nRF Connect for Desktop Bluetooth Low Energy

Q: Why selected device allows ONLY Nordic dongles or DK. Why not standard PC or Laptop BLE Adapter not visible as "SELECT Device"? Any alternative?

2. nrf5SDK-Tool

I found that there is also a possible way to to DFU over BLE with  nrfutil nrf5sdk-tools   command. BUT Following written as description  nrfutil nrf5sdk-tools dfu ble --help command says similar:

Perform a Device Firmware Update on a device with a bootloader that supports
BLE DFU. This requires a second nRF device, connected to this computer, with
connectivity firmware loaded. The connectivity device will perform the DFU
procedure onto the target device.

Q: The same issue, the BT device (as loaded or sender) must be nRF device. 

So, finally: I couldn't find a sample or documentation about it. Could you please give more information or send docs link or videos "how to DFU OTA over non Nordic BLE

One more info: we whant to do DFU from Windows Application, that's why, C++ or C# library fits ideally if available.

Thanks

Parents
  • Hello,

    When it comes to the nRF Connect SDK, the BLE OTA DFU is based on the SMP service. As far as I remember, the nRF Connect desktop app (a Bluetooth low-energy app) does not support DFU processes with the nRF Connect SDK. In short, the process explained here is not possible. For testing this, try connecting your DFU target device using the nRF Connect mobile application and the nRF Connect desktop Bluetooth app. You can see that the DFU button is present inside the mobile application, while it is missing inside the desktop app. The old SDK was based on Secure Bootloader, which had support for this. I think you are following an old guide based on an old SDK.

    See this blog post on nRF util, which explains generating DFU packages.

     

    One more info: we whant to do DFU from Windows Application, that's why, C++ or C# library fits ideally if available.

    You might need to consider developing your own custom application for doing this.

    Kind Regards,

    Abhijith

Reply
  • Hello,

    When it comes to the nRF Connect SDK, the BLE OTA DFU is based on the SMP service. As far as I remember, the nRF Connect desktop app (a Bluetooth low-energy app) does not support DFU processes with the nRF Connect SDK. In short, the process explained here is not possible. For testing this, try connecting your DFU target device using the nRF Connect mobile application and the nRF Connect desktop Bluetooth app. You can see that the DFU button is present inside the mobile application, while it is missing inside the desktop app. The old SDK was based on Secure Bootloader, which had support for this. I think you are following an old guide based on an old SDK.

    See this blog post on nRF util, which explains generating DFU packages.

     

    One more info: we whant to do DFU from Windows Application, that's why, C++ or C# library fits ideally if available.

    You might need to consider developing your own custom application for doing this.

    Kind Regards,

    Abhijith

Children
  • Hello Abhijith,
    Thank you for provided docs, I have a ready *.zip package which I am able to do DFU OTA from nrfConnect Android App without problem but not from nrfConnect Desktop  App . But from Windows. 

    When I call nrfutil device list I see on COM3 "Intel" device which is embeded and also on COM11 "Nordic Dongle" of course I dont see my custom (name: "next5") board bcs its is not yet connected to computer. 

     Now I am trying to DFU my "next5" device over NordicDongle (COM11) with following command got following error:

    nrfutil dfu ble -pkg dfu_application.zip -ic NRF52 -p COM11 -n "next5" -f
    
    Flashing connectivity firmware...
    Connectivity firmware flashed.
    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 1209, in ble
      File "nordicsemi\dfu\dfu.py", line 69, in __init__
      File "nordicsemi\dfu\package.py", line 671, in unpack_package
      File "nordicsemi\dfu\manifest.py", line 200, in from_json
    KeyError: 'manifest'
    [20836] Failed to execute script '__main__' due to unhandled exception!

    If I run same but with COM3 (Intel laptop BL device) I get another error

    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 1173, in ble
      File "nordicsemi\__main__.py", line 1110, in port_is_jlink
    pc_ble_driver_py.exceptions.NordicSemiException: Board not found
    [3724] Failed to execute script '__main__' due to unhandled exception!

    So I have now two questions:

    1. Is it possible do DFU from/over my embeded COM3 Intel (means non Nordic) device?
    2. What could be problem in case of first attempt (with Nordic) device.

    Thanks for clarifying.

  • Hello,

    Before moving forward, let's clarify a few things so that it can clear both of our doubts here:

    I have some doubts regarding your setup. Let me explain what I understood. You have a non-Nordic board, which is Next5, and you are trying to do an OTA DFU on this board using an nRF dongle. Correct me if I am wrong here. So are you asking me how to send an image from a dongle, or are you trying to send an image directly from a PC? Because I don't understand where the PC comes in the picture.

    I don't think doing a BLE DFU directly from a Windows BLE module is supported yet. As I mentioned before, it was possible to use the BLE app inside the nRF Connect for desktop and nRF 5 SDK, not with the nRF Connect SDK. But it's possible to do the same on a Linux machine using the McUMGR tool.

    Emin said:
     Now I am trying to DFU my "next5" device over NordicDongle (COM11) with following command got following error:

    While checking the logs, I guess the issue is inside the generated package. The error message KeyError:'manifest' suggests that the 'manifest' key is missing from the JSON object in your DFU package. Please make sure that the DFU package you're using was created correctly. You can use the nrfutil pkg display command to inspect the contents of the DFU package. Try to create a new package and repeat the steps to see if the same is happening.

    Kind Regards,

    Abhijith

  • Thanks Abhijith,
    You have already answered my question, that from Windows its not possible. Thats what I need to know.

Related