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

Enabling Indications in Buttonless Secure DFU Service Without Bonds

Referring to the Nordic message sequence chart in the following link:

https://infocenter.nordicsemi.com/index.jsp

(Software Development Kit -> Previous Versions of nRF5 SDK -> Libraries -> BLE Services -> Buttonless Secure DFU Service-> Buttonless Secure DFU Service without bonds)

After writing a "1" into the characteristic UUID of the Buttonless Secure DFU Service Without Bonds,

We would like to know whether writing a "2" or a "1" would set indications to be enabled?

So in terms of using bluepy (running this with python on Raspberry Pi 3), it would be written either like this:

peripheral.writeCharacteristic(cccd_handle, b"\x02\x00", withResponse=True)

or 

peripheral.writeCharacteristic(cccd_handle, b"\x01\x00", withResponse=True)

Basically after writing a "1" to the characteristic UUID (of 0x8EC90003-F315-4F60-9FB8-838830DAEA50 for Buttonless DFU without bonds)  the documentation is quite vague on how to go about verifying whether writing the "1" was successfully able to place the target remote sensor into DFU mode.

Could you please clearly describe the necessary steps to put a target sensor into DFU mode ?

 

Parents
  • Hello,

    You can experiment with this by using the nRF Connect for Desktop, or nRF Connect for mobile (Android/iOS). 

    Using nRF Connect for Desktop, you can use the "play button" next to the service that you want to enable notifications or indications:

    The play button will become a square, and the Client Characteristic Configuration will change the value. If a characteristic supports notifications, the Client Characteristic Configuration Description (CCCD) will have the value 0x0001, and if the characteristic supports indications it will be 0x0002. A characteristic can not support both notifications and indications.

    The Buttonless DFU characteristic in particular supports indications, so you would want to write 0x0002 to the CCCD (not the buttonless characteristic itself) to enable indications.

    To activate the DFU mode, you want to write 0x01 to the characteristic UUID (0x8EC90003-F315-4F60-9FB8-838830DAEA50). You can test this as well in nRF Connect for Desktop/Mobile. If you are using a DK, you should see that LED1 and LED2 will turn on after you write 0x01 to this characteristic, and the device should start advertising as "DfuTarg".

    Best regards,

    Edvin

Reply
  • Hello,

    You can experiment with this by using the nRF Connect for Desktop, or nRF Connect for mobile (Android/iOS). 

    Using nRF Connect for Desktop, you can use the "play button" next to the service that you want to enable notifications or indications:

    The play button will become a square, and the Client Characteristic Configuration will change the value. If a characteristic supports notifications, the Client Characteristic Configuration Description (CCCD) will have the value 0x0001, and if the characteristic supports indications it will be 0x0002. A characteristic can not support both notifications and indications.

    The Buttonless DFU characteristic in particular supports indications, so you would want to write 0x0002 to the CCCD (not the buttonless characteristic itself) to enable indications.

    To activate the DFU mode, you want to write 0x01 to the characteristic UUID (0x8EC90003-F315-4F60-9FB8-838830DAEA50). You can test this as well in nRF Connect for Desktop/Mobile. If you are using a DK, you should see that LED1 and LED2 will turn on after you write 0x01 to this characteristic, and the device should start advertising as "DfuTarg".

    Best regards,

    Edvin

Children
No Data
Related