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

nRF51 OTA DFU: cannot write to DFU control point attribute

I am trying to do over-the-air (OTA) device firmware update (DFU) on a device with bootloader same to the "dfu_dual_bank_ble_s110" example in the latest nRF51 SDK. On the other end, I am using a BLE central module. To my naive understanding (please correct me if I am wrong), the DFU process is essentially comprised of writing to DFU control point (at handle 0x0F) and DFU packet chacteristics (at handle 0x0D) in DFU service (at handle 0x0C). All I need is to write to attributes at handle 0x10 (DFU control point value) and handle 0x0E (DFU packet value).

To start the OTA DFU, I first write 0x0001 to the attribute at handle 0x11 (DFU control point CCCD) to enable CCCD notification, which is completed successfully. And then I write the DFU start opcode 0x01 to the attribute at handle 0x10 to start the DFU process. However, I get error like "write not permitted". Could anyone tell me if I miss anything?

Parents
  • Hi Hung, the 3rd-party BLE central device was based on BL620 from Laird. I used it as nothing too complex other than reading from and writing to BLE peripheral. It worked for other BLE devices. Everything was in command line, so I am no sure if a screenshot made a difference. For your second comment, I was using an unmodified bootloader from nRF51 SDK 8.0.0 on nRF51-DK, and followed the instructions on developer.nordicsemi.com/.../a00091.html exactly. As for the log on my Android Master Control Panel app, I saw "Connected to XXXXXX" and "Services Discovered" after I connected to the DfuTarg service. However, once I hit the "DFU" log to upload a zip file ("dfu_test_app_hrm.zip"), the log showed "Disconnected". And in the next time when I retried, it showed the same behavior. And I also notice the VDD on board was ~2.9V instead of 3.3V.

Reply
  • Hi Hung, the 3rd-party BLE central device was based on BL620 from Laird. I used it as nothing too complex other than reading from and writing to BLE peripheral. It worked for other BLE devices. Everything was in command line, so I am no sure if a screenshot made a difference. For your second comment, I was using an unmodified bootloader from nRF51 SDK 8.0.0 on nRF51-DK, and followed the instructions on developer.nordicsemi.com/.../a00091.html exactly. As for the log on my Android Master Control Panel app, I saw "Connected to XXXXXX" and "Services Discovered" after I connected to the DfuTarg service. However, once I hit the "DFU" log to upload a zip file ("dfu_test_app_hrm.zip"), the log showed "Disconnected". And in the next time when I retried, it showed the same behavior. And I also notice the VDD on board was ~2.9V instead of 3.3V.

Children
No Data
Related