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

Example for Performing OTA DFU from NRF52840 Dongle to NRF52 peripheral ?

Hi All, 

I am able to perform the OTA DFU from the NRF52840 Dongle using the NRF Connect Bluetooth low energy application and default Nordic firmware.

I would like to be able to do the same thing from my application without having to use NRF Connect. 

Is there an example of this OTA DFU implementation (  Performing  OTA DFU from central to peripheral )? 

Any directions on this would be much appreciated. 

Thanks, 

Cheers  

Parents
  • Hi Felipe, 


    Could you please clarify are you planning to do OTA DFU from the dongle to the nRF52 with or without the use of a PC ? Meaning the dongle will run stand alone or you plan to use an application running on PC to execute that ? 
    If you want instead of nRF Connect but develop an application on PC to do the task I would suggest to have a look at the nrfutil application. 
    We provide the source code for nrfutil that you can refer and modify it to create your own application. 

Reply
  • Hi Felipe, 


    Could you please clarify are you planning to do OTA DFU from the dongle to the nRF52 with or without the use of a PC ? Meaning the dongle will run stand alone or you plan to use an application running on PC to execute that ? 
    If you want instead of nRF Connect but develop an application on PC to do the task I would suggest to have a look at the nrfutil application. 
    We provide the source code for nrfutil that you can refer and modify it to create your own application. 

Children
  • Hi Hung, 

    Thanks for the speedy reply. 

    I am looking for an example for the firmware to achieve a OTA DFU from the dongle to a peripheral that supports OTA DFU. 

    At the moment, I am able to do so using The BLE application in NRF Connect app and the default NRF Firmware. 

    I would like to Implement the same in my Custom Firmware Dongle application. Like this: 

    I hope that looks a bit clearer. 

    Thanks, 

    Cheers

  • Hi Felipe, 

    I will try to sum up here and please correct me if I'm wrong. You now using nRF Connect app with our default connectivity firmware running on the dongle to do DFU. 

    Now you want to develop your own application on PC and your own firmware on the dongle to do the same task (and more custom functionalities) 

    If it's the case, you do have some sources of reference that you can use: 

    - The nRF Connect source code here.

    - nrfutil source code here. nrfutil can perform the same DFU task as the nRF Connect app. But it's a command line tool, and from my point of view it's easier to extract the part of code that handle DFU. 

    - The connectivity firmware running on the dongle. You can find the source code for the hex file of the connectivity firmware for nRF Connect here. It's very similar to the connectivity application in our SDK with some patches. The patches is provided in the github repository that I pointed to. If you can build the connectivity firmware as instructed in the repo, you can start modifying it for your own needs. 

    If you don't plan to use the connectivity firmware, and prefer to develop your own stand alone firmware to do the same task, it's also possible. But you would need to study the DFU protocol and implement that on the dongle. We currently don't have an example for that yet. 

  • Hi Hung,

    Thanks a lot for your help, I have just started navigating through the connectivity firmware for nRF Connect here that you suggested, and I was unable to find anything related to the bootloader, I would like to know if you guys provide the source code for the bootloader that runs on the dongles, As I understand that is where the DFU process happens, so I would be very interested in seeing If could take that source code and add some custom USB-VCP Commands to perform specific tasks , alternatively some documentation in regards to the BLE-DFU Service structure and or examples would be very helpful.

    Cheers,

  • Hi Felipe, 
    The USB bootloader is available in the SDK, you can have a look here.

    The DFU protocol is described here.

    And the DFU USB trigger libreary is here.

Related