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

Adding custom service UUID in pc_ble_driver_py

Hi 

I made a custom service for sending radar data from a NRF52 DK and I'm trying to access it with my computer using the pc_ble_driver_py. 

I tried to modify the heart_rate_collector.py example to fit my application, but I am not able to add my custom service UUID.  I followed a similar thread regarding the same issue(How to write to a custom 128 UUID service using pc-ble-driver-py), but it does not work. 

I get the error:

  File "C:\Users\akkvj\Anaconda2\lib\site-packages\pc_ble_driver_py\ble_adapter.py", line 254, in enable_notification
raise NordicSemiException('CCCD not found')
pc_ble_driver_py.exceptions.NordicSemiException: CCCD not found

Can you explain how I can modify the heart rate example to enable my custom service? The data I'm transferring are very similar to heart-rate data. 

I'm using Anaconda python distribution package and a nRF52840 DK. 

Thank you very much

--

Aksel

Parents
  • Hi Aksel

    Back to your original issue. "CCCD not found" for a second. Can you check if your service has a CCCD? The nRFConnect for desktop app will be helpful here. 

    Roughly, what you have to do is to replace the the heart rate service with the custom_ble_service. To do this, you should try to understand how the heart rate collector is implemented, and create an equivalent implementation for the service you want.

    Best regards,

    Simon

  • This is what nRFConnect looks like when I connect the boards: 

    When I hit the play button the Client Characteristic Configuration changes to 01 00 and it seems to be streaming data just fine. 

    Could you be a bit more specific please? Like, I see that when enabling notifications for battery-level or heart-rate the example uses predefined UUIDs from the BLEUUID class. What UUID should I use instead of self.adapter.enable_notification(new_conn, BLEUUID(BLEUUID.Standard.heart_rate))?

    As you've probably gathered I'm not an experienced programmer. This is part of my master project where I'm supposed to set up a WSN using the nRF52 DK and radar sensors. 

    Thanks for the support

    --

    Aksel

Reply
  • This is what nRFConnect looks like when I connect the boards: 

    When I hit the play button the Client Characteristic Configuration changes to 01 00 and it seems to be streaming data just fine. 

    Could you be a bit more specific please? Like, I see that when enabling notifications for battery-level or heart-rate the example uses predefined UUIDs from the BLEUUID class. What UUID should I use instead of self.adapter.enable_notification(new_conn, BLEUUID(BLEUUID.Standard.heart_rate))?

    As you've probably gathered I'm not an experienced programmer. This is part of my master project where I'm supposed to set up a WSN using the nRF52 DK and radar sensors. 

    Thanks for the support

    --

    Aksel

Children
No Data
Related