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

Buttonless DFU single bank SDK11

Hi,

I want to add DFU to our board running SDK11 S130 but facing some problems.

I followed the instructions on infocenter, and started with ble_app_hrs example (from here). Below are the steps I tried:

1. Compile project dfu_dual_bank_ble_s130_pca10028 and make bootld.hex.

2. Compile project ble_app_hrs_s130_with_dfu_pca10028 and make app.hex.

3. Merge s130_nrf51_2.0.0_softdevice.hex, app_valid_setting_apply.hex (from here), bootld.hex and app.hex.

4. Program the merged file with nRFgo studio to 51DK.

5. In  nRF Connect (Windows10, v3.6.1), connect to USB dongle(pca10031), find "Nordic_HRM" and connect to it. 

6. In nRF Connect, under Nordic_HRM, find Legacy DFU, click play button beside Legacy DFU Control Point (to Enable DFU notifications I guess, since it shows 0100 in Client Characteristic Configuration).

7. In Client Characteristic Configuration input 0104 (I want to update application), in Log, it shows "Attribute value written, handle: 0x1E, value (0x): 01-04"

Up to here, I expect a disconnection and 51DK should start to advertise as "DfuTarg", But it did not happen. So here are my questions:

1. What am I missing in above steps? Do I need to change the bootloader code (in step 1) for buttonless application? 

2. If I want to test DFU by using nRF Connect, how do I send the zip file to 51DK? I could not find anywhere in Connect that can attach a file. 

3. What do I need to change to use it as Single Bank application?

4. In nRF toolbox Android app (v2.9.0), I tried to perform DFU with dfu_dual_bank_ble_s130_pca10028 example on 51DK. In the app when I click SELECT DEVICE it's able to find "DfuTarg", but when I click on "DfuTarg", it never get connected, and the UPLOAD button is always gray. I tried with another phone, get the same result. Is this a bug?

Thank you so much for the help!

Parents
  • Hi Sonny, 

    From what you described the DFU buttonless should work. 

    Could you try to debug the application and check if it asserts ? 
    When you execute a write 0x0104 (note that you may need to write 0401 as the endianess is little endian. )

    You can add a break point inside ble_dfu_on_ble_evt() in ble_dfu.c and check the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event to see if the command is parse correctly.

  • Hi Hung Bui,

    Now I'm able to perform DFU by the same process I described above with nRF Connect mobile (desktop app still not working). 

    What make me confused is that I have never seen "DfuTarg" was advertised during the DFU process as described here. And it also happened a few times that when the connection between the app and the device was lost, I found the device neither advertise as "Nordic_HRM" nor as "DfuTarg", and I know it's not bricked since the LED is still lit. So the only thing to make the device advertise again is a power reset. While for a buttonless application this is not practical. How to deal with this situation? 

    Thanks again!

Reply
  • Hi Hung Bui,

    Now I'm able to perform DFU by the same process I described above with nRF Connect mobile (desktop app still not working). 

    What make me confused is that I have never seen "DfuTarg" was advertised during the DFU process as described here. And it also happened a few times that when the connection between the app and the device was lost, I found the device neither advertise as "Nordic_HRM" nor as "DfuTarg", and I know it's not bricked since the LED is still lit. So the only thing to make the device advertise again is a power reset. While for a buttonless application this is not practical. How to deal with this situation? 

    Thanks again!

Children
Related