Home > Mobile >  how to implement buttonless Dfu in App (Flutter Dart )without using any library
how to implement buttonless Dfu in App (Flutter Dart )without using any library

Time:03-28

i want to use Buttonless Dfu in flutter without any library , there is already one for Android ios , but i wanted to implement for all platforms , so expecting that i can connect/read/write and set notifications by using ble , is there any tutorial or something if i can implement dfu by using these ble read/write and notifications only

or if someone can list setps like
write command 0x0... to enter in Bootloader
then when device is in bootloader
set notification for 0x0.... characteristics
and and send zip file to .... this char. something like this ,it would be really helpfull

CodePudding user response:

Entering the bootloader

To enter the bootloader using the Nordic Buttonless DFU you need to write to a characteristic of the Buttonless Secure DFU Service which uses the 16-bit UUID 0xFE59. The actual characteristic depends on your settings. The Buttonless DFU can be used with or without bonds and would show a different characteristic for either one. Take a look at the enter image description here

To enter the bootloader, you need to send 0x01 to the characteristic. You will receive a response telling you the result of the operation. The message sequence diagram shows a successful response which is made of

0x20 -> defines this message as response
0x01 -> the command you requested (enter bootloader)
0x01 -> Success

Take a look the the documentation for more response codes.

Sending the firmware update

There is a very detailed page about the DFU protocol including a part especially about using BLE. It includes a message sequence chart describing the actual protocol where you can easily see in which order your messages need to be sent and to which characteristic.

  • Related