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

Where is the function which sets the cccd?

Hello, I'm using an android device to set cccd, it worked when I was running the project on nrf514xx @s110, it no longer does on nrf52840 S140, so now I wanna make sure the program actually dont skip the part that sets the cccd.

So where in the library API can I find it? Which switch case? Which API function? I imagine it is a part of a gatt call back somewhere, but I can't quite tell where.

I hope it's not deeply hidden in the SD and it's impossible to locate.

Also, the other question I asked here can provide some more background:

devzone.nordicsemi.com/.../

Parents
  • Hi Mitch, how you describe it this seems to be more Android problem. What radio sniffer trace says? Is android phone really writing proper 16-bit value to CCCD handle? Is it using Write Request not Write Command (which seems to be forbidden by BT SIG spec for writing to CCCD and so Nordic enforces it in their latest soft devices (see this Q&A thread for more))?

    Otherwise when it comes to S140 API you should wait for BLE_GATTS_EVT_WRITE and filter it by target handle and value and act accordingly.

  • I would expect you are not the first one looking into GATT Client API and Write functions on Android so search here or elsewhere should help. To the sniffer: I've thought you are familiar with Nordic sniffer, sorry, wrong assumption. It works out of the box on nRF51 DK and nRF51 Dongle (I recommend DK) but if you only have nRF52 DK then search this forum for unofficial port, it works too. Use strictly (outdated) Wireshark 1.x, newer versions are incompatible. I'm afraid it works on Windows so if you are MAC or Linux guy you might need to look for some help here on the forum... There are similar tools from TI and other vendors, also some more expensive (and better) analyzers are on the market (e.g. Frontline BPA, if you get it discounted from 4k USD to 1k then go for it, it's real help for PROs in BLE field...)

Reply
  • I would expect you are not the first one looking into GATT Client API and Write functions on Android so search here or elsewhere should help. To the sniffer: I've thought you are familiar with Nordic sniffer, sorry, wrong assumption. It works out of the box on nRF51 DK and nRF51 Dongle (I recommend DK) but if you only have nRF52 DK then search this forum for unofficial port, it works too. Use strictly (outdated) Wireshark 1.x, newer versions are incompatible. I'm afraid it works on Windows so if you are MAC or Linux guy you might need to look for some help here on the forum... There are similar tools from TI and other vendors, also some more expensive (and better) analyzers are on the market (e.g. Frontline BPA, if you get it discounted from 4k USD to 1k then go for it, it's real help for PROs in BLE field...)

Children
No Data
Related