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 Reply Children
  • Please make sure you use --bl-settings-version 2 and you also have 

    • Change NRF_DFU_BLE_REQUIRES_BONDS to 1
    • Change NRF_SDH_BLE_SERVICE_CHANGED to 1

    in your application and in your bootloader. 

    To enable debugging, if you are using Segger embedded studio you would need to: 

    - Project Option -> Code Generation -> Optimization Level = None

    - Project Option -> Code Generation -> Debugging Level = 3

    - Project Option -> Switch to Common instead of Debug/Release -> Preprocessor -> Preprocessor Definitions : add DEBUG in to the list. 

  • Hi Hung,

    I have just enabled  NRF_DFU_BLE_REQUIRES_BONDS  and NRF_SDH_BLE_SERVICE_CHANGED  in bootloader.

    In application, there is only NRF_SDH_BLE_SERVICE_CHANGED, I can not find NRF_DFU_BLE_REQUIRES_BONDS.

    And there is other flag NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS.

    If I set it to 1, application bootup will be failed => can not see advertising

    [11/27  4:00 pm Update:]

    After adding DEBUG in Preprocessor. The error is below

    [====]

    If I set it to 0, application bootup will be OK.=> see advertising

  • Hi Vick, 
    Could you please run the application in debug and add a breakpoint in side the function ble_dfu_buttonless_init() and step into the code of the function to find which exact function inside that returned INVALID_STATE ? 

    I suspect it has something to do with that you integrated the buttonless feature into hrs example. (I assume you increased the NRF_SDH_BLE_VS_UUID_COUNT ? )

    Could you try testing again with the unmodified ble_app_buttonless_dfu ? 

  • Hi Hung,

    1. Please see below:

    "ble_dfu_buttonless_backend_init"

    2. Yes, from 1 to 2.  I followed UBX-19050198 page19-24.

    3. Could you try testing again with the unmodified ble_app_buttonless_dfu ? 

    => I'm not sure about "unmodified ble_app_buttonless_dfu". What's the condition?

    Thanks!

  • Hi Vick 

    It seems that you got the error because the peer manager was not initialized before the buttonless service init (ble_dfu_buttonless_init() ). 
    If you have a look at the ble_app_buttonless example you can find that we call peer_manager_init() before we call service_init() (which call ble_dfu_buttonless_init() ) when in ble_app_hrs it's not the case.

    Please try to change that and let us know if you still have the issue.

Related