Package: sbm69
sbm69This project provides a library and a CLI to export blood pressure measurements
from SilverCrest® SBM69 Bluetooth Blood Pressure Monitor devices.InstallationJust clone the repo and then execute:$ pip install sbm69Usage$ sbm69 [-h] [address]For example:$ sbm69 > john-doe-blood-pressure-`date +%F`.csvBefore first useThe device requires a one-time pairing in order to provide access to its stored
blood pressure measurements. Before the first connection attempt, perform the
following:On LinuxStart a terminal and runbluetoothctl.In a second terminal issue thesbm69command without any arguments.Press theMbutton on the SBM69 device.In the second terminal you will see output similar to this:Scanning for an SBM69 Device...
Device with address B8:B7:7D:XX:XX:XX found.In the first terminal you will see output similar to this:[CHG] Device B8:B7:7D:XX:XX:XX UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device B8:B7:7D:XX:XX:XX UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device B8:B7:7D:XX:XX:XX UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device B8:B7:7D:XX:XX:XX UUIDs: 00001810-0000-1000-8000-00805f9b34fb
[CHG] Device B8:B7:7D:XX:XX:XX ServicesResolved: yes
[CHG] Device B8:B7:7D:XX:XX:XX Trusted: yes
Request passkey
[agent] Enter passkey (number in 0-999999):Enter the passkey displayed on the SBM69 device's display before it
disappears.On macosStart a terminal thatcan request Bluetooth access.
Macos' default terminal should do.Call thesbm69command.You will be presented with a 'XXX.app would like to use Bluetooth' message.
Click OK.Call thesbm69command again.Press theMbutton of your SBM69 device.You will be presented with a dialogue window asking you to enter a
passcode.Enter the passcode displayed on the SBM69 device before it disappears.On the protocolThe device uses a protocol based on but not compliant to the Blood Pressure
Profile HDP. It exposes the following BLE services and characteristics:Service: Blood Pressure (00001810-0000-1000-8000-00805f9b34fb)
  Characteristic: Blood Pressure Feature (00002a49-0000-1000-8000-00805f9b34fb), properties: read
    Value:  (0400)
  Characteristic: Intermediate Cuff Pressure (00002a36-0000-1000-8000-00805f9b34fb), properties: notify
    Descriptor: Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)
  Characteristic: Blood Pressure Measurement (00002a35-0000-1000-8000-00805f9b34fb), properties: indicate
    Descriptor: Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)
    Value: 1eXXXXXXXXXXXXe70702190d3200XX00000000
    Value: 1eXXXXXXXXXXXXe70702190d3300XX00000000
    Value: 1eXXXXXXXXXXXXe70702190d3500XX00000400
    Value: 1eXXXXXXXXXXXXe7070219170000XX00000000

Service: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
  Characteristic: PnP ID (00002a50-0000-1000-8000-00805f9b34fb), properties: read
    Value:  ()
  Characteristic: Serial Number String (00002a25-0000-1000-8000-00805f9b34fb), properties: read
    Value: XXXXXXXXXXXX (XXXXXXXXXXXXXXXXXXXXXXXX)
  Characteristic: Software Revision String (00002a28-0000-1000-8000-00805f9b34fb), properties: read
    Value: 2.0 (322e30)
  Characteristic: Firmware Revision String (00002a26-0000-1000-8000-00805f9b34fb), properties: read
    Value: 2.0 (322e30)
  Characteristic: Hardware Revision String (00002a27-0000-1000-8000-00805f9b34fb), properties: read
    Value: 7100 (37313030)
  Characteristic: IEEE 11073-20601 Regulatory Cert. Data List (00002a2a-0000-1000-8000-00805f9b34fb), properties: read
    Value:  ()
  Characteristic: Model Number String (00002a24-0000-1000-8000-00805f9b34fb), properties: read
    Value: SBM69 (53424d3639)
  Characteristic: Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb), properties: read
    Value: Hans Dinslage GmbH (48616e732044696e736c61676520476d6248)
  Characteristic: System ID (00002a23-0000-1000-8000-00805f9b34fb), properties: read
    Value:  (0000000000000000)

Service: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
  Characteristic: Service Changed (00002a05-0000-1000-8000-00805f9b34fb), properties: indicate
    Descriptor: Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)TheBlood Pressure Featurecharacteristic seems to provide incorrect data. It
indicates that the device only supports 'Pulse Rate Range Detection Support',
which is not the case.TheIntermediate Cuff Pressurecharacteristic is not usable because the device
does not activate Bluetooth during a measurement.TheBlood Pressure Measurementcharacteristic is used for transferring the
blood pressure measurements stored in the device. When a user registers for
indications from it, the device immediately starts sending data. After all
records have been sent as indications, the device proceeds to turn off its
Bluetooth functionality, thus disconnecting the user.The following ImHex pattern can be used to parse the data contained in each of
the characteristic's notifications:bitfieldFlags{blood_pressure_units:1;time_stamp:1;pulse_rate:1;user_id:1;measurement_status:1;vreserved_for_future_use:3;};bitfieldMeasurementStatus{body_movement_detected:1;cuff_too_loose:1;irregular_pulse:1;pulse_rate_exceeds_lower_limit:1;pulse_rate_exceeds_upper_limit:1;improper_measurement_position:1;reserved_for_future_use:10;};structBloodPressureMeasurement{leFlagsflags;if(flags.blood_pressure_units){leu16systolic_kpa;leu16diastolic_kpa;leu16mean_arterial_pressure_kpa;}else{leu16systolic_mmhg;leu16diastolic_mmhg;leu16mean_arterial_pressure_mmhg;}if(flags.time_stamp){leu16year;u8month;u8day;u8hours;u8minutes;u8seconds;}if(flags.pulse_rate){leu16pulse_rate;}if(flags.user_id){u8user_id;}if(flags.measurement_status){leMeasurementStatusmeasurement_status;}};BloodPressureMeasurementbpm@0x00;Note that themedfloat16fields from the HDP profile specification have been
replaced withuint16fields.Further reading:https://www.bluetooth.com/specifications/specs/gatt-specification-supplement/https://www.bluetooth.com/specifications/specs/blood-pressure-service-1-1-1/https://www.bluetooth.com/specifications/specs/blood-pressure-profile-1-1-1/LicenseCopyright © Petko Bordjukov, 2023The program is available as open source under the terms of theGNU Affero General Public License v3 or later (AGPLv3+).