You are not logged in.

#1 2021-01-09 23:19:31

YAOMTC
Member
Registered: 2010-02-23
Posts: 207

Cannot connect to Valve Index base stations with Bluetooth adapter

I bought a Bluetooth adapter (ASUS USB-BT500) for two reasons: to use wireless controllers (they pair, connect, and work) and to put my Valve Index base stations to sleep when I'm not using them.

$ btmgmt info
Index list with 1 item
hci0:   Primary controller
        addr 24:4B:FE:AB:EB:4A version 10 manufacturer 93 class 0x3c0104
        supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr hs le advertising secure-conn debug-keys privacy static-addr phy-configuration 
        current settings: powered bondable ssp br/edr le secure-conn 
        name archdesk
        short name

https://github.com/DavidRisch/steamvr_utils

I'm using the above. Here's what happens when it tries to connect to the base stations:

2021-01-09 17:45:41 [INFO ]: SteamvrUtils turning on:
2021-01-09 17:45:42 [INFO ]: Found Base Station LHB-B9C3F8FB at address f8:0e:2e:e9:f6:df
2021-01-09 17:45:43 [INFO ]: Connecting to f8:0e:2e:e9:f6:df
2021-01-09 17:45:44 [ERROR]: Failure of attempt 0 of 5
2021-01-09 17:45:44 [INFO ]: Connecting to f8:0e:2e:e9:f6:df
2021-01-09 17:45:44 [ERROR]: Failure of attempt 1 of 5
2021-01-09 17:45:44 [INFO ]: Connecting to f8:0e:2e:e9:f6:df
2021-01-09 17:45:44 [ERROR]: Failure of attempt 2 of 5
2021-01-09 17:45:44 [INFO ]: Connecting to f8:0e:2e:e9:f6:df
2021-01-09 17:45:45 [ERROR]: Failure of attempt 3 of 5
2021-01-09 17:45:45 [INFO ]: Connecting to f8:0e:2e:e9:f6:df
2021-01-09 17:45:45 [ERROR]: Failure of attempt 4 of 5
2021-01-09 17:45:45 [ERROR]: No successful attempt in any of the 5 attempts. Last error:
2021-01-09 17:45:45 [ERROR]: 
Traceback (most recent call last):
  File "/home/chris/Software/steamvr_utils/scripts/steamvr_utils.py", line 110, in main
    steamvr_utils.action(selected_action)
  File "/home/chris/Software/steamvr_utils/scripts/steamvr_utils.py", line 39, in action
    self.start_daemon()
  File "/home/chris/Software/steamvr_utils/scripts/steamvr_utils.py", line 45, in start_daemon
    SteamvrDaemon.create_daemon(self)
  File "/home/chris/Software/steamvr_utils/scripts/steamvr_daemon.py", line 44, in create_daemon
    steamvr_daemon = cls(steamvr_utils)
  File "/home/chris/Software/steamvr_utils/scripts/steamvr_daemon.py", line 24, in __init__
    self.steamvr_utils.turn_on()
  File "/home/chris/Software/steamvr_utils/scripts/steamvr_utils.py", line 60, in turn_on
    self.basestation_power_interface.robust_action(BasestationPowerInterface.Action.ON)
  File "/home/chris/Software/steamvr_utils/scripts/basestation_interface.py", line 122, in robust_action
    attempt_loop(lambda: self.action(action), self.config.basestation_attempt_count_set(), try_all=True)
  File "/home/chris/Software/steamvr_utils/scripts/basestation_interface.py", line 119, in attempt_loop
    raise last_error
  File "/home/chris/Software/steamvr_utils/scripts/basestation_interface.py", line 107, in attempt_loop
    function()
  File "/home/chris/Software/steamvr_utils/scripts/basestation_interface.py", line 122, in <lambda>
    attempt_loop(lambda: self.action(action), self.config.basestation_attempt_count_set(), try_all=True)
  File "/home/chris/Software/steamvr_utils/scripts/basestation_interface.py", line 72, in action
    basestation.connect(device, addrType=bluepy.btle.ADDR_TYPE_RANDOM)
  File "/usr/lib/python3.9/site-packages/bluepy/btle.py", line 445, in connect
    self._connect(addr, addrType, iface)
  File "/usr/lib/python3.9/site-packages/bluepy/btle.py", line 439, in _connect
    raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral f8:0e:2e:e9:f6:df, addr type: random

When I try to use bluetoothctl to connect, here's what happens:

[bluetooth]# connect F8:0E:2E:E9:F6:DF
Attempting to connect to F8:0E:2E:E9:F6:DF
[CHG] Device 00:0D:4B:A9:80:5E LegacyPairing: no
[CHG] Device F8:0E:2E:E9:F6:DF Connected: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device F8:0E:2E:E9:F6:DF Connected: no
[CHG] Device F8:0E:2E:E9:F6:DF RSSI: -40

Here's another script (also using bluepy), and the result. https://github.com/risa2000/lh2ctrl

$ python ./lh2ctrl.py -v -g 10 --try_count 5 CB:A7:19:12:81:91
Connecting to CB:A7:19:12:81:91 at Sat Jan  9 22:15:31 2021 -> Failed to connect to peripheral CB:A7:19:12:81:91, addr type: random
Connecting to CB:A7:19:12:81:91 at Sat Jan  9 22:15:34 2021 -> Failed to connect to peripheral CB:A7:19:12:81:91, addr type: random
Connecting to CB:A7:19:12:81:91 at Sat Jan  9 22:15:36 2021 -> Failed to connect to peripheral CB:A7:19:12:81:91, addr type: random
Connecting to CB:A7:19:12:81:91 at Sat Jan  9 22:15:39 2021 -> Failed to connect to peripheral CB:A7:19:12:81:91, addr type: random
Connecting to CB:A7:19:12:81:91 at Sat Jan  9 22:15:41 2021 -> Traceback (most recent call last):
  File "/home/chris/Software/./lh2ctrl.py", line 178, in <module>
    main(args)
  File "/home/chris/Software/./lh2ctrl.py", line 160, in main
    boot(args)
  File "/home/chris/Software/./lh2ctrl.py", line 124, in boot
    lhv2.connect(args.try_count, args.try_pause)
  File "/home/chris/Software/./lh2ctrl.py", line 61, in connect
    raise e
  File "/home/chris/Software/./lh2ctrl.py", line 55, in connect
    self.dev.connect(self.macAddr, iface=self.hciIface, addrType=btle.ADDR_TYPE_RANDOM)
  File "/usr/lib/python3.9/site-packages/bluepy/btle.py", line 445, in connect
    self._connect(addr, addrType, iface)
  File "/usr/lib/python3.9/site-packages/bluepy/btle.py", line 439, in _connect
    raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral CB:A7:19:12:81:91, addr type: random

When I try bluedevil, I get "The setup of LHB-B9C3F8FB has failed".

What's my next steps here?

EDIT: Using a combination of blueman with the steamvr_tools script, I was able to turn them both off once, and after several tries, was able to turn one of them back on. Since then, however, I can't turn either one on or off. I don't know what was different about the rare successes I since can't replicate...

Last edited by YAOMTC (2021-01-10 15:14:13)

Offline

Board footer

Powered by FluxBB