I want to use serial dfu. But I don't know what should I do in the application to enter the DFU mode safely similar to the OTA DFU.
I want to use serial dfu. But I don't know what should I do in the application to enter the DFU mode safely similar to the OTA DFU.
Hi,
Have you implemented the serial transport layer for the bootloader ? by default it only supports BLE.
To switch from application to enter DFU mode, it's pretty simple, you just need to set the enter_buttonless_dfu = true and update the bootloader setting then do a soft reset. You can have a look at function enter_bootloader() in ble_dfu.c
Thanks for the quick response. @Hung, by implementation, you mean I have to write the code for the serial DFU protocol mentioned in the infocenter?
And I couldn't find the enter_bootloader function in the ble_dfu.c. I'm using the SDK11.0.0.
Hi Sourabh,
I was assuming you were talking about the new DFU bootloader from SDK v12 where we haven't got support for Serial bootloader.
For the DFU bootloader in SDK v11, you can use our bootloader out of the box. To switch to bootloader, you can follow the same code we used in the example ble_app_hrs_with_dfu in particular it's the function bootloader_start() in dfu_app_handler.c Ignore the code for sd_ble_gatts_sys_attr_get() and dfu_app_peer_data_set().
Thanks @Hung, I will try this and let you know about the outcome.