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

ble_app_hrs + Buttonless DFU on NRF52DK(52832) + OTA update

Hi,

I want to verify

1. Program  ble_app_hrs with buttonless dfu integrated + secure bootloader + bootloader setting to nRF52DK. 

2. Boot up nRF52DK, then use buttonless dfu goto bootloader mode

3. Update app_dfu_package.zip (nrfutil pkg generate --hw-version 52 --application-version 0 --application ble_ap nrfutil pkg generate --hw-version 52 --application-version 0 --application ble_app_hrs_pca10040_s132.hex --sd-req 0xCB --key-file private.key app_dfu_package.zip
Zip created at app_dfu_package.zip)

====

Below are my steps:

Step1 Generate bootloader setting page

Step2  merge secure bootloader(\dfu\secure_bootloader\pca10040_s132_ble\) + bootloader settings

Step3 Program secure bootloader (examples\dfu\secure_bootloader\pca10040_s132_ble)+ bl setting

Step4 Program softdevice (s132_nrf52_7.0.1)

Step5 Program app(ble_app_hrs_pca10040_s132 which is integrate with buttonless_duf already)

Step 6 When nRF52DK bootup, error logs are below:

Are my steps correct?

How can I make it right?

Thanks.

Vick

Parents
  • Hi Sudharsan,

    I have followed the blog, and try below steps:

    1. 

     In sdk_config.h in the bootloader:

    • Change NRF_DFU_BLE_REQUIRES_BONDS to 1
    • Change NRF_SDH_BLE_SERVICE_CHANGED to 1

    - In sdk_config.h in ble_app_buttonless_dfu + ble_app_hrs

    • Change NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 1
    • Check if NRF_SDH_BLE_SERVICE_CHANGED is not 1 then set it to 1

    Compile the two projects. 

    2. Generate bl setting

    3.

    mergehex -m bootloader.hex setting.hex -o bootloader_and_setting.hex

    4.

    mergehex -m nrf52832_xxaa.hex bootloader_and_setting.hex -o app_bootloader_and_setting.hex

    5. flash softdevice

    6.  flash the app_bootloader_and_setting.hex

    7. After bootup, error logs show below:

    Could you give me a hand?

    By the way, I have tested sec_bootloader + ble_app_hrs(without buttonless_dfu), the result is following.

    When nRF52DK boots up, it will enter bootloader mode directly.  Is that normal?

    (This verification just make sure the bootloader is available.)

    Thanks you!

  • Hi Hung,

    I have tried the files what you provided (buttonless only)=> Update process is OK same as your video.

    I have an issue is that my app integrated with hrs+buttonless. (vick_hrs_src_1210.7z

    I tried your step. Please see the video below:

    Setup(before the video operation): 

    1. Forget bond info

    2. Disable BT

    3. Reset Android phone

    The steps of video:

    1. Enable BT

    2. Connect Nordic_HRM_DFU

    3. Enable Secure DFU Service indications

    4. Enable Service Changed indications

    5. Write value -> send

    6. Get GATT ERROR 133 and ERROR 8.

    And please see the logs during the video, there are no logs after I sent "Entering Bootloader".

    Attached sniffer below

    sniffer_trace_1214.pcapng

    Please correct me, if any steps or integration of my apps is wrong.

    Thank you!!

  • Hi Vick, 
    Please check what's the difference in your implementation and in my example. Please try to compile and test using the project I provided. 
    When testing you don't need to enable Service Changed indicator, it should be done automatically by the OS on the phone. 

    Please change SEC_PARAM_LESC to 0 so that the bonding won't be in Secure Connection. The sniffer can't decrypt a connection with secure connection. 

    I suspect that you switched to the bootloader too early, before the connection is gracefully disconnected. 

    When testing after you click switch to bootloader, and got error 133, please continue to check if the device advertising as DFUTarg , just like what I did in the video I sent. 

  • Hi Hung,

    There are good news and bad news.

    I can update successfully Nordic_HRM_DFU without bonds.

    In my application and in my bootloader.

    • Change NRF_DFU_BLE_REQUIRES_BONDS to 0

    Please see the video:

    Later, I tried Nordic_HRM_DFU with bonds. The result is failed.

    I can not enter Bootloader successfully.

    In my application and in my bootloader.

    • Change NRF_DFU_BLE_REQUIRES_BONDS to 1

    Please see the video:

    You can see there is no response from Bootloader when I sent command to reset the device to bootloader.

    Could you help? I think I almost make it.

    Thanks.

  • Hi, 
    Even if it say error, please try go back and check if you see DFU Targ. 

    I think you need to check if you have updated the bootloader to support bond or not (try with my bootloader).

    If you still have the issue, you can zip your projects, your hex files (application, bootloader, bootloader setting, just like what I sent you), and send them to me. Please include the public key, private key.  

  • Hi Hung,

    I have tried your bootloader, and still got same result as second video. => can not enter bootloader

    Please see my files.

    2020_12_17.7z

    Thanks!

Reply Children
Related