BLE DFU Ping Request

Hello,

I am trying to implement BLE DFU protocol on my nrf52840 MCU to FOTA of the nrf52 devices nearby. I was able to connect to devices nearby and discover DFU service with control point characterstic.

I then tried to send PING request command (0x09) to check if the communication has established with the ID 0x01. Response from the DFU device came back but it doesn't seem to be expected, it is not responding back with the ID I had sent with ping request.

This is what I am sending:


In return I am receiving this:


Can someone please help me identify whats wrong.

Thanks

  • Hi,

    Can you share the lines of code responsible for the "DFU Resp: 0x10 9 3" output? It will show what variables or data is printed and how. Is it for instance possible that the output is printed in decimal instead of in hexadecimal?

    From what I can tell, the expected response to the ping request (0x09 0x01) should be 0x60 0x09 0x01.

    Please note that some commands, such as the PING command, are optional and disabled by default. If the DFU bootloader is built with the NRF_DFU_PROTOCOL_REDUCED preprocessor define set to 1, those commands are not implemented. In that case you should expect an error return value of 0x02 (NRF_DFU_RES_CODE_OP_NOT_SUPPORTED). To enable the PING command in the DFU bootloader, set NRF_DFU_PROTOCOL_REDUCED to 0 either as preprocessor define, in sdk_config.h or in app_config.h.

    Please note also that pinging is not required for successfully performing DFU.

    Regards,
    Terje

  • Thanks for the reply. I just found out that the nordic MCU I am using is having legacy DFU support, which means it doesn't support PING request, also its response code is different i.e. 0x10.

  • Hi,

    That makes perfect sense. Thanks for sharing the solution!

    Regards,
    Terje

Related