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

Reading characteristic user description in android

Hi,

I have successfully add the characteristic user description into all of my characteristics.

I used master control panel to verify that my characteristics has characteristic user description such as: SWITCH-1 (a meaning full name for me) but I have problem getting this description from the android application.

In my android application I’m able to find the services and characteristics but I don’t know how to read the characteristic user description value, I search the web many time with no luck, but I can see that android master control panel from Nordic can read the characteristic user description.

Please give me suggestion to read characteristic user description on android device.

Parents
  • Hi MH,

    You can use the getDescriptor() function from BluetoothGattCharacteristic to read the descriptor. To read User Description descriptor you would need to getDescriptor(UUID) with UUID = 00002901-0000-1000-8000-00805f9b34fb

    You can refer to how we get the CCCD (00002902-0000-1000-8000-00805f9b34fb) in our examples, for example in enableTXNotification() function in nRFUART app example.

Reply
  • Hi MH,

    You can use the getDescriptor() function from BluetoothGattCharacteristic to read the descriptor. To read User Description descriptor you would need to getDescriptor(UUID) with UUID = 00002901-0000-1000-8000-00805f9b34fb

    You can refer to how we get the CCCD (00002902-0000-1000-8000-00805f9b34fb) in our examples, for example in enableTXNotification() function in nRFUART app example.

Children
No Data
Related