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

Serial DFU - Exit command?

I'm using an nRF51822 on a custom board with Nordic's serial DFU example from SDK v10.0.0. I'm trying to find a way to exit the serial DFU without the DFU trying to update the app. I figured writing the stop command without writing anything else would do the trick, but the module just sends a message after receiving the stop command and stays in the DFU. What would be the best way to go about this without a power cycle or reset? Is it possible?

I'm also having a hard time finding documentation on whatever the message coming from the nRF51822 is. Can anyone point me in the right direction?

Parents
  • Yes, it should be possible. You'll have to create you own packet type, like the Init, Start, Data and Stop packets, described on this Infocenter page, for simplicity lets say 0x06.

    Send the custom packet over the HCI transport layer and when the packet is processed in process_dfu_packet() you just check if the packet type is 0x06(or whatever you decide to call it) and call NVIC_SystemReset().

    Regarding the documentation, you'll have to take a look at the Bluetooth Core Specification (Volume 4, Part D) - HCI Three-Wire UART Transport Layer.

    -Bjørn

Reply
  • Yes, it should be possible. You'll have to create you own packet type, like the Init, Start, Data and Stop packets, described on this Infocenter page, for simplicity lets say 0x06.

    Send the custom packet over the HCI transport layer and when the packet is processed in process_dfu_packet() you just check if the packet type is 0x06(or whatever you decide to call it) and call NVIC_SystemReset().

    Regarding the documentation, you'll have to take a look at the Bluetooth Core Specification (Volume 4, Part D) - HCI Three-Wire UART Transport Layer.

    -Bjørn

Children
Related