Require assistance in bootloader customization for DFU on serial transport layer

[Bootloader is based on NRF SDK v11]

I am experimenting with the NRF SDK v11 bootloader source code and want to trigger the UART/serial DFU as the bootloader starts. Right now, the bootloader is only working with BLE or USB (nrf-util tool) DFU.

For the serial DFU, I am integrating the functions from dfu_transport_serial.c to main.c. For instance, dfu_transport_serial_update_start() function (image attached) would initiate the DFU through UART without going to the BLE events. 

I want to know whether the approach is correct and also how shall I populate the data packets that the UART layer is expecting.

The source code can be accessed from here : https://github.com/RAKWireless/WisBlock/tree/master/bootloader/RAK4630/V0.4.2/WisCore_RAK4631_Bootloader

Related