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

dfu problem with my own mobile application

I'm working in a project & I need to update my firmware from my mobile app not through the nordic applications, when I tried nordic applications, just to prove the concept of firmware of the air property, it works with me fine but when I use my app I follow the procedure illustrated by the nordic documentation of the dfu service

the first step is to send when I send 0x01-0x04 on the characteristic Dfu control point & then I send the file size in the format shown in the documentation then I wait for receive the notifcation value 0x10-0x01-0x01 , I receive instead of that 0x10-0x01-0x06, which mean that I have a failed response, it doesn't work !!

the documentation here

Parents
  • Hi, Instead of writing this yourself I recommend you to use the DFU Library instead. You'll find them on GitHub: github.com/.../Android-DFU-Library (Android) and github.com/.../DFU (iOS). They are well tested and handle all errors and events. You may include them in your application easily and modify if needed (but should work out of the box). However, coming back to your question. Please check the following things:

    1. The DFU Start 0x0104 is used to upload an application. It is supported since the DFU Bootloader from SDK 6.0.0. Before that it was not possible to update a Soft Device or a Bootloader and the DFU Start command was only 0x01.

    2. If you send 0x0104 you should send the file size in 12 bytes, where the first 8 are zeros. The last 4 bytes are the size as Int32 written in Little Endian. For example, if your application is 4 bytes the packet would be 0x000000000000000004000000.

    3. The file size must be dividable by 4.

    I hope that helped. I'll try to come up with 4. if you did everything like above.

  • @mohamed: I have a suggestion that you capture a correct DFU session by the sniffer when using our Master Control Panel app to do DFU. Then you compare it to what you do with your mobile app. Then you can find the difference and can modify your app to match.

Reply Children
No Data
Related