This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Enable DFU Service to Proximity Example

Hi,

I am now trying to add DFU functionality to Proximity sample application.

The SDK I use is nRF5 SDK v.11, and the board is pca10040.

I have tried to add DFU to ble_uart example code and it works well.

but when I do it with Proximity Example, something goes wrong.

When I try to start DFU (which is send 0x0104 to Control Point), the device disconnect immediately. And while using the Master Control Panel to do the DFU, it stopped at "Starting bootloader"

I have no compile error, and the application runs well except DFU functionality.

I have stucked in it for two days and have no idea what is wrong with it. Please help me if you have any idea about the bug.

Thank you very much.

Parents
  • Hi Amy,

    You need to check if the device enters bootloader and advertises as "DFUTarg" after you write 0x0104 or not.

    Do you do bonding ? this could be the main difference between the UART example and the Proximity one. Note that in the proximity example we will forward bond information to the bootloader, make sure there is no assertion when the code does that.

Reply
  • Hi Amy,

    You need to check if the device enters bootloader and advertises as "DFUTarg" after you write 0x0104 or not.

    Do you do bonding ? this could be the main difference between the UART example and the Proximity one. Note that in the proximity example we will forward bond information to the bootloader, make sure there is no assertion when the code does that.

Children
  • To Hung Bui

    Thank for your command. I have replaced the peer manager by device manager, and according to the link here, the bonding information will be shared automaticlly.

    But I found the problem. In the on_ble_evt(), the m_conn_handle is declare again and is set to BLE_CONN_HANDLE_INVALID. After commanding out it, the application works well.

Related