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

DFU from mobile to peripheral via a central device

I have setup a 1-1 paired central(+peripheral)  <=>  peripheral
Central is a 52832, SDK 16.0, SD s132 v7.0.1
peripheral is a 52811, SDK 16.0, SD s112 v7.0.1

I can perform a DFU on each of them independently from a mobile phone, with zips built for each using different pem keys.

What I want is the mobile phone to connect only to the central, and to be able to send the peripheral_dfu.zip to the central, and make the central  perform DFU on the peripheral.

Is that possible at all ? How can I do it ?



Parents
  • Hi,

    What I want is the mobile phone to connect only to the central, and to be able to send the peripheral_dfu.zip to the central, and make the central  perform DFU on the peripheral.

     We don't have such an example.

    Is that possible at all ?

    Yes, it's possible to implement a DFU master. The doc on infocenter specifies what is needed to implement it, you can read it here.

    regards

    Jared 

     

  • I think I could write a "Peripheral Secure DFU Service", mimicking the standard "Secure DFU Service", that would transmit all received data to the connected peripheral.

    Is this the good way to go ? Will it be possible to transfer the zip without even writing it on the central storage ?

    How would your rate the difficulty to implement that ?

  • Hi,

    It would honestly require a bit work. 

    You first have to create a DFU master, that sends the image from the central to the peripheral. You could either store the image on central, and then make the central send it to the peripheral. Or you could just use the central as a relay and and just send the image to the peripheral. The latter would probably be the easiest and would require you to implement the middle man as both a central and peripheral. We already have an example that does this in the SDK, called relay example. You can try merging that with the DFU example for a good starting point. 

    The relay example would require you too implement a big enough buffer, in case the peripheral that receives the image is busy writing it to flash etc. Packet notifications might come in handy here.

    Good luck!!

    regards

    Jared 

Reply
  • Hi,

    It would honestly require a bit work. 

    You first have to create a DFU master, that sends the image from the central to the peripheral. You could either store the image on central, and then make the central send it to the peripheral. Or you could just use the central as a relay and and just send the image to the peripheral. The latter would probably be the easiest and would require you to implement the middle man as both a central and peripheral. We already have an example that does this in the SDK, called relay example. You can try merging that with the DFU example for a good starting point. 

    The relay example would require you too implement a big enough buffer, in case the peripheral that receives the image is busy writing it to flash etc. Packet notifications might come in handy here.

    Good luck!!

    regards

    Jared 

Children
No Data
Related