DFU question - I wonder whether there is a way that BLE knows the device is upgrade its software

Dear support

I tried DFU OTA example here recently and it works for me and have a question to ask.

My application is a central app and host by my main MCU via UART interface, I wonder when device firmware is being updated by OTA, is there a way the app knows before it enters boot mode, so it can tell main MCU a message about that ?

Thank you!

Ping 

Parents
  • Hi, Hieu

    Thank you for reply and spend time on it, it is not an easy one, I understand.

    Initially I thought it can tell by connected as a peripheral role as the advertising function is only added for DFU purpose, but then it is possible that it can be connected for echo or something else but not upgrading firmware.

    If firmware had an unexpected reboot - not initiated by host MCU, then it is probably a reboot following a DFU OTA, but that can only be told after the DFU happened.

    That is all I can think of, I am not familiar with more deep insight into the protocols.

    Regards!

    Ping

  • Hi, Hieu

    Thank you for your contribution!

    The solution works for me - exactly what I need.

    1. I had to upgrade my SDK to v2.1.0 to use first feature, which took a while as code is not backwards compatible, don't understand why it is so hard to migrant from 1 version to another.

    2. The second call back works straight away.

    3. BTW - my custom board overlay file had to modify too to work on it.

    Thank again.

    Ping

Reply
  • Hi, Hieu

    Thank you for your contribution!

    The solution works for me - exactly what I need.

    1. I had to upgrade my SDK to v2.1.0 to use first feature, which took a while as code is not backwards compatible, don't understand why it is so hard to migrant from 1 version to another.

    2. The second call back works straight away.

    3. BTW - my custom board overlay file had to modify too to work on it.

    Thank again.

    Ping

Children
Related