Closed coelner closed 3 years ago
Please try: ble-serial -v -d a4:c1:38:02:b9:dd -r 0000ffe1-0000-1000-8000-00805f9b34fb
(or with 0000ffe2...
)
✔ [07:16|coelner@localhost ~]$ ble-serial -v -d a4:c1:38:02:b9:dd -r 0000ffe1-0000-1000-8000-00805f9b34fb
07:17:39.223 | INFO | virtual_serial.py: Slave created on /tmp/ttyBLE -> /dev/pts/4
07:17:39.618 | INFO | interface.py: Connected device a4:c1:38:02:b9:dd
07:17:39.618 | DEBUG | interface.py: No write uuid specified, trying ['0000ff02-0000-1000-8000-00805f9b34fb', '0000ffe1-0000-1000-8000-00805f9b34fb']
07:17:39.917 | DEBUG | interface.py: Found write characteristic 0000ffe1-0000-1000-8000-00805f9b34fb
07:17:40.217 | DEBUG | interface.py: Found read characteristic 0000ffe1-0000-1000-8000-00805f9b34fb
07:18:09.378 | INFO | interface.py: Receiver set up
07:18:09.379 | INFO | __main__.py: Running main loop!
07:18:12.338 | DEBUG | interface.py: Received notify: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:12.338 | DEBUG | virtual_serial.py: Write: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:12.361 | DEBUG | interface.py: Received notify: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:12.361 | DEBUG | virtual_serial.py: Write: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:12.361 | DEBUG | interface.py: Received notify: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:12.361 | DEBUG | virtual_serial.py: Write: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:13.827 | DEBUG | interface.py: Received notify: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:13.827 | DEBUG | virtual_serial.py: Write: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:15.298 | DEBUG | interface.py: Received notify: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:15.298 | DEBUG | virtual_serial.py: Write: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:16.786 | DEBUG | interface.py: Received notify: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
07:18:16.786 | DEBUG | virtual_serial.py: Write: b'\xb0\xb0\xb0\xb0\xb0\xb0;\xb0\xb0\xb0\xba\xb0\r\x8a'
[snip]
^C07:21:03.717 | INFO | __main__.py: Keyboard interrupt received
07:21:03.717 | WARNING | __main__.py: Shutdown initiated
07:21:03.717 | INFO | virtual_serial.py: Stopping UART thread
07:21:03.839 | INFO | interface.py: BT disconnected
07:21:03.839 | INFO | __main__.py: Shutdown complete.
improvement: fix the millisecond time print to 3 decimals, that makes the output readable
07:36|coelner@localhost ~]$ ble-serial -v -d a4:c1:38:02:b9:dd -r 0000ffe2-0000-1000-8000-00805f9b34fb
07:36:46.21 | INFO | virtual_serial.py: Slave created on /tmp/ttyBLE -> /dev/pts/4
07:36:47.117 | INFO | interface.py: Connected device a4:c1:38:02:b9:dd
07:36:47.117 | DEBUG | interface.py: No write uuid specified, trying ['0000ff02-0000-1000-8000-00805f9b34fb', '0000ffe1-0000-1000-8000-00805f9b34fb']
07:36:47.616 | DEBUG | interface.py: Found write characteristic 0000ffe1-0000-1000-8000-00805f9b34fb
07:36:48.17 | DEBUG | interface.py: Found read characteristic 0000ffe2-0000-1000-8000-00805f9b34fb
07:37:12.600 | WARNING | __main__.py: Bluetooth connection failed
07:37:12.601 | WARNING | __main__.py: Shutdown initiated
07:37:12.601 | INFO | virtual_serial.py: Stopping UART thread
07:37:12.601 | INFO | __main__.py: Shutdown complete.
Okay, this is the expected behavior. It does not subscribe per default to notifications, as only few modules require this. You just have to specify the read UUID in this case, I have clarified this in the readme now.
I have also fixed the timestamp to 3 decimals.
backlog: https://github.com/Jakeler/UT61E-Toolkit/issues/10
After a minute I shut down the UT61E.