RE: Added a new pulse oximeter importer...
(05-04-2022, 09:23 AM)kappa Wrote: I've captured the USB traffic. It's essentially the same commands and data format as is used on the BLE communication path, but with USB HID as the transport. The HID data contains the data length as the first octet and then the data for that packet, padded out to 32 bytes total. It should be relatively straightforward to adapt the o2ring bleak script to use pyusb or similar.
I appreciate that you're trying to help, but as a non-programmer and general python ignoramus, I wouldn't know where to start.
15 years ago, I used to do pretty well with autoitscript on winders but that was the "height" of my "programming" career
RE: Added a new pulse oximeter importer...
I had a bit of a play trying to get it to work with python hidapi without any success so far. I think a cheap BLE usb adapter is probably the best approach for now if your device doesn't have built in BLE support.
06-07-2022, 06:09 AM
(This post was last modified: 06-07-2022, 06:31 AM by moarZs.)
RE: Added a new pulse oximeter importer...
I can confirm that it is working (beautifully) a little less than 20% of the time for me. I'm now running on a bluetooth 5x capable device
and success looks like this:
Code: python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device zoink:A0
[zoink:A0] Discovered: O2Ring ####
[O2Ring ####] Connected
Starting up for O2Ring ####
[O2Ring ####] Config:
{ 'Application': '',
'BootloaderVer': '1.1.0.0',
'BranchCode': '24010003',
'CurBAT': '100%',
'CurBatState': '0',
'CurMode': '0',
'CurMotor': '100',
'CurOxiThr': '88',
'CurPedtar': '99999',
'CurState': '0',
'CurTIME': '2022-06-04,13:53:34',
'FileList': '20220604034922,20220601012719,20220602021042,20220603011707,',
'FileVer': '3',
'HRHighThr': '100',
'HRLowThr': '40',
'HRSwitch': '0',
'HardwareVer': 'AA',
'LightStr': '0',
'LightingMode': '0',
'Model': '1652',
'OxiSwitch': '1',
'Region': 'CE',
'SN': 'zoink',
'SPCPVer': '1.3',
'SoftwareVer': '1.7.0'}
[O2Ring #] Time off by -16 seconds, updating
[O2Ring #] File List is now ['20220604034922', '20220601012719', '20220602021042', '20220603011707']
[O2Ring #] Requesting File 20220604034922, saving to "20220604034922"
[O2Ring #] File 20220604034922 Opened, Size 33155 ----------------------------------------------|
|==================================================================================================|
[O2Ring #] Already Have File "20220601012719"
[O2Ring #] Already Have File "20220602021042"
[O2Ring #] Requesting File 20220603011707, saving to "20220603011707"
[O2Ring #] File 20220603011707 Opened, Size 34100 ----------------------------------------------|
|==================================================================================================|
[O2Ring #] SpO2 255%, HR 255 bpm, Perfusion Idx 0, motion 0, batt 100%
[O2Ring #] SpO2 255%, HR 255 bpm, Perfusion Idx 0, motion 0, batt 100%
[O2Ring #] Disconnecting
[O2Ring #] Disconnected
disconnecting all
Failures look like this:
Code: python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/o2r/o2r-master$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
^CTraceback (most recent call last):
File "o2ring.py", line 168, in <module>
loop.run_until_complete(task)
File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
self.run_forever()
File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
self._run_once()
File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.8/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "o2ring.py", line 171, in <module>
loop.run_until_complete(task)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
asyncio.exceptions.CancelledError
:~/Desktop/oximeter.backup/o2r/o2r-master$ python3 o2ring.py
Namespace(brightness=None, csv=False, ext='vld', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix=None, scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/o2r/o2r-master$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/o2r/o2r-master/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p "" -e ""
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p "" -e ""
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
^CShutting Down
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
[O2Ring ] Disconnected
Traceback (most recent call last):
File "o2ring.py", line 119, in main
rings[ident].close()
KeyError: ':A0'
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-14' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
:~/Desktop/oximeter.backup/2022$ python3 o2ring.py -p '' -e ''
Namespace(brightness=None, csv=False, ext='', hr_alert_high=None, hr_alert_low=None, keep_going=False, multi=False, o2_alert=None, prefix='', scan=30, screen=None, verbose=0, vibrate=None)
Connecting...
Adding device :A0
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<O2BTDevice._go_connect() done, defined at /home//Desktop/oximeter.backup/2022/o2r/o2bt.py:103> exception=TimeoutError()>
Traceback (most recent call last):
File "/home//Desktop/oximeter.backup/2022/o2r/o2bt.py", line 107, in _go_connect
if await super().connect():
File "/home//.local/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
No devices found!
disconnecting all
Questions:
1) What state should the o2ring be in when I run the script. (END counting down?, clock/unplugged/on?, on/charging/plugged into special factory serial/usb adapter?, on/charging/plugged into regular microUSB cable..?)
2) Can somebody confirm this command is valid? python3 o2ring.py -p '' -e ''
3) Can somebody confirm this command won't do ANYTHING besides download the bin files? (no changing setting on o2ring etc..?)
RE: Added a new pulse oximeter importer...
Has anybody tried to import Wellue Oxysmart PC60FW (ViHealth shows as Oxysmart 2132) data that is created by ViHealth. It does not follow the same formatting as the Wellue Ring.
RE: Added a new pulse oximeter importer...
I just looked at the website for this oximeter. This model does not store any data and requires it to be connected to a remote device as it is being used.
According to their website:
"Users can check their real-time data of Blood O2, PR, and PI on the app via Bluetooth. You can also view the statistical report of continuous data history on the app (Bluetooth ONLY).
*Data can ONLY be recorded on the app (not on the oximeter itself) and app needs to be running when recording data."
Based on its usage criteria, this is not a model that would be used in overnight data collection.
- Red
RE: Added a new pulse oximeter importer...
Hi everyone,
I stumbled upon this forum when exploring BLE on the Viatom O2 ring for a university research project. This code works like a charm, except I note exporting the raw trace isn't implemented yet. Are there any plans to do so, please? If not, would it be possible to get pointers as to where one would start with implementing this - eg if it's part of the same packet / under the same UUID?
Many thanks!
|