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

CCCD is null in Android

Hi everyone,

I successfully compiled and loaded the experimental_ble_app_uart onto my pca10028 board. I downloaded and installed the nRF toolbox on my nexus 7 tablet. Connecting and sending uart data from the tablet to the board works fine. However, the other direction poses me problems. In Android, I get a null pointer from

mRXCharacteristic.getDescriptor(CLIENT_CHARACTERISTIC_CONFIG_DESCRIPTOR_UUID);

Also, with mRXCharacteristic.getDescriptors() I get an empty answer. It works for the TX-Characteristic, though! What could be wrong? Thanks for any help.

Parents
  • Ok, I've got it now. It was a caching problem of Android. It had saved an old setup of services and uuid's which wasn't working. After turning bluetooth off and on on the tablet, all is reset and the actual GATT settings are restored.

    Maybe you could mention in the example description that only sending a certain amount of UART bytes triggers a characteristics notification...(tried for a long time to send only a couple of characters, but nothing happened until I spamed ;) )

Reply
  • Ok, I've got it now. It was a caching problem of Android. It had saved an old setup of services and uuid's which wasn't working. After turning bluetooth off and on on the tablet, all is reset and the actual GATT settings are restored.

    Maybe you could mention in the example description that only sending a certain amount of UART bytes triggers a characteristics notification...(tried for a long time to send only a couple of characters, but nothing happened until I spamed ;) )

Children
Related