I've been setting up a Vive on Linux, and after discovering the lack of lighthouse power control, I discovered your solution!
After starting the script, the lighthouses turn on, then the py script crashes. Is this because my command isn't properly utilizing your control system?
$ python lhctrl.py --lh_b_mac 40:4E:36:9E:1F:F5 --lh_b_id 5B3A36CF -i 1 -v
Booting up "B" lighthouse
Connecting to 40:4E:36:9E:1F:F5 at Tue Jul 8 11:36:34 2025 -> conn
Writing char-cs to 0x35 : 1202003ccf363a5b000000000000000000000000 -> {'rsp': ['wr']}
Reading char-cs from 0x35 -> Traceback (most recent call last):
File "/home/user/Downloads/lhctrl-1.0.0/pylhctrl/lhctrl.py", line 218, in <module>
main(args)
~~~~^^^^^^
File "/home/user/Downloads/lhctrl-1.0.0/pylhctrl/lhctrl.py", line 191, in main
loop(args)
~~~~^^^^^^
File "/home/user/Downloads/lhctrl-1.0.0/pylhctrl/lhctrl.py", line 151, in loop
hndl_io(args.lh_b_mac, args.hndl, ping_b, args.try_count, args.try_pause, args.verbose, args.interface)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/lhctrl-1.0.0/pylhctrl/lhctrl.py", line 133, in hndl_io
resw, resr = writeReadCmd(lh, hndl, cmd, verb)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/lhctrl-1.0.0/pylhctrl/lhctrl.py", line 93, in writeReadCmd
return res, readCmd(lh, hndl, verb)
~~~~~~~^^^^^^^^^^^^^^^^
File "/home/user/Downloads/lhctrl-1.0.0/pylhctrl/lhctrl.py", line 85, in readCmd
res = lh.readCharacteristic(hndl)
File "/usr/local/lib/python3.13/site-packages/bluepy/btle.py", line 530, in readCharacteristic
resp = self._getResp('rd')
File "/usr/local/lib/python3.13/site-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.13/site-packages/bluepy/btle.py", line 362, in _waitResp
raise BTLEDisconnectError("Device disconnected", resp)
bluepy.btle.BTLEDisconnectError: Device disconnected
What is an example command when the script is being properly used?
I've been setting up a Vive on Linux, and after discovering the lack of lighthouse power control, I discovered your solution!
After starting the script, the lighthouses turn on, then the py script crashes. Is this because my command isn't properly utilizing your control system?
What is an example command when the script is being properly used?