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
  • @diode: I'm seeing from the log that after the bootloader received the image size it didn't response. After 10 seconds, the MCP timed out and disconnect (packet 851 at 19:48:00). I suspect there could be smth wrong with the bootloader firmware you compiled. I attached my bootloader hex file. Could you try to:

    1. Erase the chip

    2. Program softdevice

    3. Program the provided bootloader hex file using "Program Bootloader"

    4. Make sure you updated the firmware on the dongle/DK to use with MCP to v0.11

    nrf51422_xxac_bootloader.hex

Reply
  • @diode: I'm seeing from the log that after the bootloader received the image size it didn't response. After 10 seconds, the MCP timed out and disconnect (packet 851 at 19:48:00). I suspect there could be smth wrong with the bootloader firmware you compiled. I attached my bootloader hex file. Could you try to:

    1. Erase the chip

    2. Program softdevice

    3. Program the provided bootloader hex file using "Program Bootloader"

    4. Make sure you updated the firmware on the dongle/DK to use with MCP to v0.11

    nrf51422_xxac_bootloader.hex

Children
  • Hi Hung, the diff output showed your bootloader and mine (that was compiled from the nRF51 SDK example without modification) were different. This time I gave it another try with PCA10000 dongle, and OTA DFU worked for both your image and my image. However, I still couldn't got it working with the Master Control Panel app (version 2.1.1) on my Android in either case. Previously, it didn't work with PCA10031 dongle either. However, I could see "DfuTarg" service and could connect to it in all cases. Why is it different on Nordic supported hardware/software?

  • @Diode: PCA10000 dongle contains XLR2 chip when the PCA100031 has XLR3 chip. The SDK and S110 v.8.0 was made for the XLR3 chip. Now I'm kind of lost of what is working and what is not on your side.

    Could you please summarize on what is working and what is not , and if not what was showed ? a sniffer trace is recommended.

    • Test with PCA100028 (what my bootloader compiled for) with MCP on PC and MCP on Android

    • Test with PCA100031 with MCP on PC and MCP on Android

    • Test with PCA10001 on MCP PC and MCP on Android.

Related