Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BerryMedPulseOximeterService.value returning None #6

Closed
p-riebs opened this issue Oct 16, 2020 · 3 comments
Closed

BerryMedPulseOximeterService.value returning None #6

p-riebs opened this issue Oct 16, 2020 · 3 comments

Comments

@p-riebs
Copy link

p-riebs commented Oct 16, 2020

I'm running the example script and getting None values returned from BerryMedPulseOximeterService.value. Heartrate and blood oxygen are being shown on the device and I'm able to connect to the device. I've waited 5-10 minutes for real values to be returned.

Model number on the pulse oximeter: BM1000
Connecting device: Raspberry Pi 4

Package versions:
bleak 0.8.0
adafruit-blinka-bleio 1.1.0

I'm running on bluez-firmware_1.2-4+rpt2_all to workaround the current issue here: #3

Output

pi@raspberrypi:~ $ python3 ble_berrymed_pulse_oximeter_simpletest.py 
Scanning...
BerryMed
Connected
Stopped scan
Fetch connection
Device: Berry BM1000B
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
@dhalbert
Copy link
Contributor

Please use https://github.com/dhalbert/Adafruit_Blinka_bleio/tree/macos-fixes with bleak 0.8.0 and see if that works for you. I'll be submitting that to the library soon.

@p-riebs
Copy link
Author

p-riebs commented Oct 17, 2020

I tried your branch and it works! I'm curious to know if it's normal for the inconsistent output values. As you can see below there many None values between each reading. Feel free to mark this as closed if this is expected behavior otherwise I can open another issue with more data.

pi@raspberrypi:~ $ python3 ble_berrymed_pulse_oximeter_simpletest.py 
Scanning...
Stopped scan
Scanning...
Stopped scan
Scanning...
BerryMed
Connected
Stopped scan
Fetch connection
Device: Berry BM1000B
None
None
None
PulseOximeterValues(valid=False, spo2=127, pulse_rate=255, pleth=50, finger_present=True)
None
None
None
None
None
None
None
None
PulseOximeterValues(valid=True, spo2=100, pulse_rate=82, pleth=58, finger_present=True)
None
None
None
None
None
None
None
None
None
None
None
PulseOximeterValues(valid=True, spo2=100, pulse_rate=84, pleth=37, finger_present=True)

And in other cases they are very close together

PulseOximeterValues(valid=True, spo2=98, pulse_rate=81, pleth=47, finger_present=True)
PulseOximeterValues(valid=True, spo2=100, pulse_rate=81, pleth=39, finger_present=True)
None
None
None
PulseOximeterValues(valid=True, spo2=99, pulse_rate=78, pleth=26, finger_present=True)
PulseOximeterValues(valid=True, spo2=99, pulse_rate=78, pleth=95, finger_present=True)
None
PulseOximeterValues(valid=True, spo2=99, pulse_rate=78, pleth=63, finger_present=True)

@dhalbert
Copy link
Contributor

The example program is reading values as fast as possible, so the None values indicate that a new value hasn't arrived yet. Glad you got it working! I'll close this, and since it seems to be working for most people, I'm going to PR my branch into the library and get it in the bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants