HRS demo UUID values

I've got the HRS demo running on my nRF51 DK board and I can see it updating heart rate info using nRF Toolbox on my phone.

I've got some (Python) test code running on my Windows 11 laptop trying to get heartrate notifications. I can scan and see the "Zephyr Heartrate Sensor" and I can connect to the device to see the services which I print below:

00001801-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Attribute Profile
00001800-0000-1000-8000-00805f9b34fb (Handle: 9): Generic Access Profile
0000180f-0000-1000-8000-00805f9b34fb (Handle: 16): Battery Service
0000180a-0000-1000-8000-00805f9b34fb (Handle: 20): Device Information
0000180d-0000-1000-8000-00805f9b34fb (Handle: 25): Heart Rate


Now I want to get notifications from one of the characteristics (like Heart Rate or Battery).
What UUID should I use when I register my notification callback?

My Zephyr version is 2.3.0. My DK version is 3.0.0.

Regards,
Bret

Parents
  • Hi Bret, 
    I'm not very familiar with the native BLE library on Windows. But you would need to enable notification on the Heart Rate characteristic. 0000180d-0000-1000-8000-00805f9b34fb is most likely just the service, not the characteristic. Please try doing a service discovery to find the characteristic and the CCCD that you can write to to enable notification. 
    I would suggest to have a look at our central_hr example to see how it's handled there. 
    Also please be aware that nRF51 is not officially supported in nRF Connect SDK. We strongly suggest to move to nRF52. 

  • The data I posted in my OP _is_ the result of service discovery. I'm not asking how to use the Python/Windows libraries - I already use them to talk to other BLE devices. What I want to know is the UUID I should use for heartrate notifications. I can't tell from looking at the code because it is buried in a header file somewhere. What characteristic ID does the code use for heartrate?

  • Hi Bret, 
    I understand that you were showing the result of the service discovery. But it only shows the service. The discovery needs to continue with the service to discover the characteristic. 
    As I mentioned 0000180d-0000-1000-8000-00805f9b34fb  is the UUID for the heart rate service. But to enable notification you need to get the characteristic.

Reply Children
No Data
Related