adafruit / Adafruit_CircuitPython_BLE_BerryMed_Pulse_Oximeter

BLE Support for BerryMed Pulse Oximeters
MIT License
7 stars 6 forks source link

Infrequent/slow sensor polling #11

Open itsbeenemotional opened 2 years ago

itsbeenemotional commented 2 years ago

I'm getting very infrequent sensor value updates when running the simple test example with my Raspberry Pi 4 and BM1000B. It looks like the device is polled once per second, but most polls return no values. Is this a known limitation, or is there a way to get more frequent readouts from sensor, at the very least 1 Hz?

Sample output (I modified the code slightly to include time stamps):


Scanning...
Connected
Stopped scan
Fetch connection
Device: Berry BM1000B
220713-143941 None
220713-143942 PulseOximeterValues(valid=True, spo2=97, pulse_rate=68, pleth=28, finger_present=True)
220713-143942 None
220713-143943 None
220713-143944 None
220713-143945 None
220713-143946 None
220713-143947 None
220713-143948 PulseOximeterValues(valid=True, spo2=98, pulse_rate=63, pleth=35, finger_present=True)
220713-143949 None
220713-143950 None
220713-143951 None
220713-143952 None
220713-143953 None
220713-143954 None
220713-143955 None
220713-143956 PulseOximeterValues(valid=True, spo2=98, pulse_rate=63, pleth=61, finger_present=True)
220713-143956 None
220713-143957 None
220713-143958 None
220713-143959 None
220713-144000 None
220713-144001 None
220713-144002 PulseOximeterValues(valid=True, spo2=97, pulse_rate=64, pleth=78, finger_present=True)
220713-144002 None
220713-144003 None
220713-144004 None
220713-144005 None
220713-144006 None
220713-144007 None
220713-144008 None
220713-144009 PulseOximeterValues(valid=True, spo2=98, pulse_rate=65, pleth=10, finger_present=True)
220713-144009 None
220713-144010 None
220713-144011 None
220713-144012 None
220713-144013 None
220713-144014 None
220713-144015 None
220713-144016 PulseOximeterValues(valid=True, spo2=97, pulse_rate=66, pleth=43, finger_present=True)
220713-144016 None
220713-144017 None
dhalbert commented 2 years ago

I can look at this next week, but am not near the right hardware now. Please list the versions of blues, bleak, and Raspberry Pi OS you are using.

itsbeenemotional commented 2 years ago

Thank you. I am not sure what 'blues' is, but I am using bleak 0.11.0 on RPi OS 64-bit Bullseye.

dhalbert commented 2 years ago

Sorry, I meant bluez (auto-correct did that), which is system software used by bleak.

itsbeenemotional commented 2 years ago

Gotcha. I think this is the information you want:


$ dpkg --status bluez | grep '^Version:'
Version: 5.55-3.1+rpt1