adafruit / adafruit/Adafruit_CircuitPython_BLE_Heart_Rate

Unable to retrieve RR intervals from Scosche Rhythm+2.0 or Rhythm24

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I'm working on a project that very simply connects to a Scosche heart rate monitor armband and returns RR intervals (as the library documentation offers). Using the Rhythm+ armband, I can get these intervals, however the same code returns empty lists when that same RR interval attribute is fetched using the Rhythm+2.0 or Rhythm24 armbands (both newer models). Because I can use the Adafruit BLE Heart Rate library to get the BPM from all three armbands, I figured they must all use the same standard BLE Heart Rate Service profile, but are there any adaptations I have to make to support the newer Scosche models?

For reference, this is the code I'm running:
```
import time

import adafruit_ble
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.device_info import DeviceInfoService
from adafruit_ble_heart_rate import HeartRateService

ble = adafruit_ble.BLERadio()

hr_connection = None

while True:
print("Scanning...")
for adv in ble.start_scan(ProvideServicesAdvertisement):
if HeartRateService in adv.services:
print("Found a HeartRateService advertisement.")
hr_connection = ble.connect(adv)
print("Connected.")
break

ble.stop_scan()
print("Stopped scan.")

if hr_connection and hr_connection.connected:
print("Fetch connection")
if DeviceInfoService in hr_connection:
dis = hr_connection[DeviceInfoService]
try:
manufacturer = dis.manufacturer
except AttributeError:
manufacturer = "(Manufacturer Not Specified)"
try:
model_number = dis.model_number
except AttributeError:
model_number = "(Model Number Not Specified)"
print(f"Device: {manufacturer} {model_number}")
else:
print("No device information")
hr_service = hr_connection[HeartRateService]
print(f"Location: {hr_service.location}")
while hr_connection.connected:
try:
print(hr_service.measurement_values.rr_intervals)
except:
print("No HR Value")
time.sleep(1)
```
For the Rhythm+ armband, I can get integers for `heart_rate `and a list of integers for `rr_intervals`.
For the Rhythm+2.0 and Rhythm24, I can only get integers for `heart_rate `and an empty list for `rr_intervals`.
All three armbands return `None `for `contact `and `energy_expended`.

Curiously, the Scosche representatives claim that the Rhythm24 armband is capable of reporting RR intervals (in the Scosche companion app, there is a Heart Rate Variability mode).
Is it possible that these two newer armbands are returning empty RR Interval sequences just because the hardware doesn't support those measurements, or are there code changes I need to make to support the newer models?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the HeartRateService and measurement_values.rr_intervals entry points shown in the report, reproducing the behavior with the Rhythm+, Rhythm+2.0, and Rhythm24 devices. Determine whether the newer models expose RR intervals through the standard service and define done as either supporting the returned data or documenting that the hardware cannot provide it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.