-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support for BP786N (series 10) #27
Comments
the BP786N is also called HEM-7321T. The most reliable way to check if it exist on your omron device, is to use nRF Connect on a phone. Best, |
@userx14 thank you for quick reply! I verified that the service is visible in nRF Connect: I have tried it again with the external and built-in Bluetooth on RPI Zero 2. max@rpi02w:~/omblepy-main $ python3 ./omblepy.py -d HEM-7322T -m D0:05:06:80:89:00
2024-07-13 12:19:11,973 - omblepy - INFO - Attempt to import module for device hem-7322t
2024-07-13 12:19:12,120 - omblepy - INFO - Attempt connecting to D0:05:06:80:89:00.
2024-07-13 12:19:14,044 - omblepy - INFO - unpair and disconnect
Traceback (most recent call last):
File "/home/max/omblepy-main/./omblepy.py", line 389, in <module>
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/max/omblepy-main/./omblepy.py", line 362, in main
await bleClient.connect()
File "/usr/local/lib/python3.11/dist-packages/bleak/__init__.py", line 615, in connect
return await self._backend.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/client.py", line 254, in connect
assert_reply(reply)
File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/utils.py", line 20, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Input/output error
max@rpi02w:~/omblepy-main $ python3 ./omblepy.py -p -d HEM-7322T -m D0:05:06:80:89:00
2024-07-13 12:19:16,467 - omblepy - INFO - Attempt to import module for device hem-7322t
2024-07-13 12:19:16,641 - omblepy - INFO - Attempt connecting to D0:05:06:80:89:00.
2024-07-13 12:19:18,570 - omblepy - INFO - unpair and disconnect
Traceback (most recent call last):
File "/home/max/omblepy-main/./omblepy.py", line 389, in <module>
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/max/omblepy-main/./omblepy.py", line 362, in main
await bleClient.connect()
File "/usr/local/lib/python3.11/dist-packages/bleak/__init__.py", line 615, in connect
return await self._backend.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/client.py", line 254, in connect
assert_reply(reply)
File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/utils.py", line 20, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Input/output error |
@maxromanovsky, thanks for verifying with the nRF app.
The new error looks like something is going wrong in the bluez linux driver.
Omblepy unlike ubpm does not require BT-MAC address spoofing, just leave your mac address as is. When you pair one time with omblepy, it overwrites a pairing key in one bluetooth attribute. This unlocking reading the data from every pc from this point onward, until you pair with your phone again.
That's a good step. |
@userx14 sorry for the delayed response. Here's how it looks like if I launch omblepy$ python3 ./omblepy.py -p -d HEM-7322T -m D0:05:06:80:89:00
2024-07-15 19:55:11,886 - omblepy - INFO - Attempt to import module for device hem-7322t
2024-07-15 19:55:12,032 - omblepy - INFO - Attempt connecting to D0:05:06:80:89:00.
2024-07-15 19:55:21,115 - omblepy - INFO - unpair and disconnect
Traceback (most recent call last):
File "/home/max/omblepy-main/./omblepy.py", line 367, in main
raise OSError("""Some required bluetooth attributes not found on this ble device.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: Some required bluetooth attributes not found on this ble device.
This means that either, you connected to a wrong device,
or that your OS has a bug when reading BT LE device attributes (certain linux versions).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/max/omblepy-main/./omblepy.py", line 389, in <module>
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/max/omblepy-main/./omblepy.py", line 387, in main
await bleClient.disconnect()
File "/usr/local/lib/python3.11/dist-packages/bleak/__init__.py", line 624, in disconnect
return await self._backend.disconnect()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/client.py", line 425, in disconnect
assert self._bus is None
^^^^^^^^^^^^^^^^^
AssertionError bluetoothctl
I'd appreciate if you could clarify:
|
Still seems to be the exact same problem.
You can just write pair it again with the mobile app and pull the readings after using omblepy.
The Windows 10 bluetooth stack seems to be more reliable for BLE devices like the omron, so yes.
So your main goal is to get it working on linux?
Yes the ESP32 would work, I already did some tests in this direction. But now that I think about it, maybe splitting the application between esp32 and pc might be the way to go: For me omblepy with bleak worked fine on windows 10, my tests for linux were only 10% successful. But win11 seems to break bluetooth compatibility, so I might have to explore the esp32 route sooner or later. |
This was very crude test from 2023, just for verifying if basic pairing could be done: ombleESP32.ino.txt |
Thank you for the detailed answer.
What I want to achieve ideally, is sync readings to Garmin Connect via
Common pattern is to use MQTT for 2-way communication. |
As if a working firmware for ESP32 would appear, I can test and implement in my integration as here: BR, |
Find the work in progress esp32 firmware here. |
The first working prototype of the esp32-bridge-firmware is uploaded in the branch. Thanks, |
Hi, @userx14 I understand the issues of connection over COM in terms of pairing in the terminal, but will you create a version that sends MQTT data over WiFi ? In many cases after my experience ESP32 modules have a small internal antenna which results in a small range therefore the gateway must be close to the bluetooth device. For this reason I use a USB bluetooth with an external antenna so I have coverage throughout my apartment. ESP32 module makes sense when it can be embedded in the device or is very close to it, and the server is far away to be in WiFi range. BR, |
The issue would be that the full communication would need to be ported to the esp32.
Some of them have external antenna connectors, which can increase the range like ESP32-WROOM-32UE. Best, |
Hi, @userx14 sure I understand, I also have a problem with time ;) BR, |
I think BP786N (series 10) has been discontinued by Omron, but it still works well and supported by the Omron Connect app.
I can't find a landing page for it anymore, but the manual is still available: https://omronhealthcare.com/wp-content/uploads/BP786N-IM_EN.pdf
I would be happy to assist with the troubleshooting :)
I have been trying to connect to it using
bluetoothctl
running in another terminal, and when asked interactively[agent] Accept pairing (yes/no):
I answeredyes
bluetoothctl
output:OS Details:
The text was updated successfully, but these errors were encountered: