Plugins
Here are some known issues for the plugins:
USB Devices
- Message "Could not open device"
To use UBPM on Linux without root privileges create a udev rule for your device:
- create a file
/etc/udev/rules.d/60-ubpm.rulesas root - add your device (or all)
# Omron HEM-7131U HEM-7322U
KERNEL=="hidraw*", ATTRS{idVendor}=="0590", ATTRS{idProduct}=="0090", MODE="0666"
# Omron HEM-730XIT HEM-790IT HEM-7222IT HEM-7080IT
KERNEL=="hidraw*", ATTRS{idVendor}=="0590", ATTRS{idProduct}=="0028", MODE="0666"
# Beurer H
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7406", MODE="0666"
# Beurer S, Hartmann GCE604 BPM25
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE="0666"
# Hartmann DC318
SUBSYSTEM=="tty", ATTRS{idVendor}=="04d9", ATTRS{idProduct}=="b534", MODE="0666"
- reconnect your device
- Import Problems
Connect the device to a USB 2.0 port (black) instead of USB 3.0 (blue).
- Beurer "H" and "S"
There may be 2 variants of these devices:
- HID
- SERIAL
Select "H" for the HID or "S" for the SERIAL variant.
Bluetooth Devices
- Generic Bluetooth Plugin
UBPM can read measurements from Bluetooth devices that support sending data via indications. For example:
| Manufacturer | Model | Measurements | ID 1 | ID 2 | Pairing |
|---|---|---|---|---|---|
| Beurer | BC54, BM54, BM64, BM81 | all | 0 | 1 | 6 digit PIN |
| Hartmann | BPW26 (Compact+) | only new | 0 | 1 | 6 digit PIN |
| Omron | HEM-7361T (maybe all?) | only new | 1 | 2 | special |
Test on Linux
To check this for your device install bettercap and do the following in the terminal:
- run
sudo bettercap - type
ble.recon on - power on your device
- wait for your device to be detected, something like "new BLE device detected as <mac>"
- type
ble.enum <mac> - wait for the output (should show a table of information), try several times if nothing happens
- type
ble.recon off - type
quit
Replace "<mac>" with the real MAC address of your device.
If the output contains:
- Blood Pressure (0x1810)
- Blood Pressure Measurement (0x2A35)
then your device should work with UBPM.
If this device is not already listed on the website as supported, please send me the output.
Test on Android or iOS
You can also try this on Android or iOS with nrfConnect.
- install the app from the stores above
- open the app and click on "SCAN"
- find your device and click on "CONNECT"
- locate "Blood Pressue, UUID 0x1810" and click on it
- locate "Blood Pressure Measurement, UUID 0x2A35"
If booth entries exist, your device should work with UBPM.
Reading Measurements
Caution: some devices only send new measurements and mark them as read. You will lose all measurements!
- on Linux install gatttool and run
gatttool -b <mac> --char-write-req -a <handle> -n 0200 --listen(replace <mac> with your real MAC address and <handle> with the value + 1 shown above in the bettercap output for 0x2A35) - on Mobile click the 2 arrows on "Blood Pressure Measurement"
- if the device asks for pairing confirm
- the device should now send the measurement(s)
Wrong Values
If everything works so far, but the measurement shows wrong value(s), please contact me or open an issue.
- OMRON Message "No answer from device"
Your device must first be paired with your computer. This can be done in 2 ways:
- Use USB dongle with changeable MAC address
- clone the MAC address of your mobile device already paired with the Omron App to the dongle (bdaddr on Linux/macOS or MacAddressChanger on Windows)
- Write new pairing key
The pairing key only needs to be set once. Use the plugin or an external Python tool:
Variant via UBPM-Plugin
- press and hold the Bluetooth button on the device until it shows a flashing "P"
- start "Import from Device"
- press "Discover Device"
- press "Connect Device" (select your device if not automatically active)
- press "Write Pairing Key"
- the device display should change from "P" to "⎕"
Variant via Python
- read about omblepy, a Python tool used to set the key
- download and install python or use your operating system package manager
- download omblepy.zip and unzip it somewhere
- open the command line and change to the path of the extracted zip,
cd <path of omblepy> - edit the omblepy.py and replace the dummy examplePairingKey "deadbeaf12341234deadbeaf12341234" with UBPM's key "5542504d2d50616972696e674b657921"
- install the dependencies for omblepy with
pip install bleakandpip install terminaltables - press and hold the Bluetooth button on the device until it shows a flashing "P"
- run
python ./omblepy.py -p -d HEM-7322T - select your device, "BLEsmart_xxxxxxxxxxxxxxxxxxxx" if it doesn't show the real name
- the device display should change from "P" to "⎕", ignore any errors on the command line
- optional uninstall the dependencies with
pip uninstall bleakandpip uninstall terminaltablesand Python itself
Now try again to read the measurements in UBPM.
- OMRON Message "The selected device is not a ..."
Your Linux distribution can't discover Bluetooth services correctly and at least the UUID "ecbe3980-c9a2-11e1-b1bd-0002a5d5c51b" is missing.
The cause of this error is unknown, possibly a problem with the Kernel, Bluetooth stack or configuration setting. Please try another Linux distribution or the generic Bluetooth plugin instead.
Newer devices use a different UUID and do not require pairing. Try the 7146 or 7380 plugin. If the error disappears, you have such a device.
- OMRON Bluetooth device missing
If you have a device that is not supported yet and doesn't work with the generic Bluetooth plugin, please contact me or open a new issue.
I will create a test plugin and after verifying the functionality it will be officially added to the list of supported devices.
- General Troubleshooting
- devices must always be paired first in the operating system
- try using "BlueMan" on Linux, if the pairing request doesn't show the pin/password dialog
- try running "bluetoothctl" in terminal on Linux and enter pin when requested ("[agent] Enter passkey (number in 0-999999): "), if the pairing request doesn't show the pin/password dialog
- disable internal Bluetooth controller in BIOS to force use of external USB dongle
- if connection fails discover again to avoid cached information
- delete old connection via operating system and recreate it again
- to cleanup all old data delete
- Linux: "/var/lib/bluetooth/<mac>"
- Windows: "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices\<mac>"
- macOS: "/Library/Preferences/com.apple.Bluetooth.plist"
Bluetooth Linux Settings
Bluetooth settings can be controlled through the configuration file "/etc/bluetooth/main.conf".
For problems with pairing force BLE:
[GENERAL]
ControllerMode = le
To disable caching:
[GATT]
Cache = no
Bluetooth Windows Settings
If your device can't be detected for pairing change the following settings:
"Bluetooth & devices -> Devices -> Device settings -> Bluetooth device discovery" from "Default" to "Advanced"
Note: Bluetooth Low Energy (BLE) support is only available in Windows 8.1 and later.
- Analyzing Vendor App Communication
To analyze the communication between the vendor app and the blood pressure monitor you can enable Bluetooth logging on Android.
Create Capture on Android
- open "Settings"
- select "System" -> "Developer options" (if missing enable it first under "About phone" by tapping "Build number" 7 times)
- click on "Enable Bluetooth HCI snoop log" and set it to "Enabled" (writes all Bluetooth traffic to the file "btsnoop_hci.log")
- enable "USB Debugging" (needed to copy the file later)
- toggle Bluetooth off/on (starts logging)
- open the vendor app, start reading your blood pressure measurements, close the app
- disable "Use developer options" under "System" -> "Developer options" (this also disables the HCI and USB options)
Download Capture to PC
- download and extract the Android SDK Platform Tools
- connect your Android device to your computer with a USB cable
- open a command line, change to the extracted zip path, run
./adb devicesand accept the popup on your Android device - run
./adb bugreport capture, wait for it to finish and extract the "FS/data/misc/bluetooth/logs/btsnoop_hci.log" from the downloaded zip file - open the file in Wireshark and analyze the communication or send it to me if requested
The above steps may vary depending on your Android version.
Test Plugins
If you have a test version of a new plugin do the following:
- extract the latest ubpm release
- Linux: run
chmod +x ubpm_qt*.AppImage && ./ubpm_qt*.AppImage --appimage-extract - Windows: rename the "ubpm_qt*.exe" to "ubpm_qt*.7z", right click and extract
- macOS: mount the "ubpm_qt*.dmg" and drag & drop ubpm into "Applications"
- Linux: run
- copy the test plugin to
- Linux: "squashfs-root/usr/bin/Plugins"
- Windows: "ubpm_qt*\ubpm.7zip\Plugins"
- macOS: "/Applications/ubpm.app/Contents/MacOS/Plugins"
- run ubpm from the extracted path above (not the downloaded ubpm_qt*.*)
- select the test plugin in settings
- start "Import from Device"
Import Log
For troubleshooting it can be helpful to analyze the communication with the device.
To create this log enable the option in "Settings -> Plugin" or press the small button between "Import" and "Cancel" directly in the plugin.
During the import the file "ubpm-import.log" will be created in the cache directory.
This directory can be found under "Help -> About -> Environment" and should look like this depending on your operating system:
- Windows: "C:\Users\%USERNAME%\AppData\Local\ubpm\cache"
- Linux: "~/.cache/ubpm"
- macOS: "~/Library/Caches/ubpm"
Table of Contents
Please read this Wiki carefully before opening any issues, thank you!