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

Cannot perform ble dfu for ble rscs

I tried to add a dfu service to the SDK 11.0.0 ble_rscs_app by following the procedure here. I was able to successfully compile and run the application, and when Master Control Panel connected to the application, it recognized that the application supports DFU.

To test the DFU, I used the nrf_utility.exe that comes with nRFgo Studio to create the .zip distribution packet, as described here. I used the .hex file to create the .zip to upload.

My problem is when I try to enable dfu notifications, and then try to write the 0x01 Op Code, the device disconnects (which I understand is correct), but the device does not enter bootloader mode, nor does it appear as "DfuTarg" in the device list, as described here under Testing.

Also, when I click the dfu button, and I try to upload the zip file, the process simply cycles through "Connecting...Starting DFU...Starting bootloader...Connecting...Starting DFU...Starting bootloader..." etc. This did not happen when I tried the dfu bootloader example from the same SDK.

I know the problem is not a SDK, board, or softdevice compatibility as my setup of nRF52 with the s132 - 2.0.1 is good according to the nRF52 compatibility matrix. I am also using Keil.

I attached the project below. The project should be placed in the SDK 11.0.0 folder under "SDK_folder/examples/ble_peripheral/kg_ble_app_rscs -dfu"

kg_ble_app_rscs - dfu.zip

Thanks for your help.

Parents
  • FormerMember
    0 FormerMember

    When I tested without bonding, it worked fine, I updated the firmware with a .zip file, this .zip file: kg_ble_rscs_run.zip. It was generated with the following command: nrfutil dfu genpkg --application kg_ble_rscs_run.bin kg_ble_rscs_run.zip

    However, when I re-tested with bonding I did see the same behavior as what you are seeing. The problem is most likely that your application doesn't add the service changed characteristic: it should be added to the ble_enable_params that are passed to softdevice_enable(..) in ble_stack_init(). The example ble_app_hrs (with DFU) shows how to do it when using the device manager. The example provided in this thread shows how to do it with the peer manager.

Reply
  • FormerMember
    0 FormerMember

    When I tested without bonding, it worked fine, I updated the firmware with a .zip file, this .zip file: kg_ble_rscs_run.zip. It was generated with the following command: nrfutil dfu genpkg --application kg_ble_rscs_run.bin kg_ble_rscs_run.zip

    However, when I re-tested with bonding I did see the same behavior as what you are seeing. The problem is most likely that your application doesn't add the service changed characteristic: it should be added to the ble_enable_params that are passed to softdevice_enable(..) in ble_stack_init(). The example ble_app_hrs (with DFU) shows how to do it when using the device manager. The example provided in this thread shows how to do it with the peer manager.

Children
No Data
Related