SteamVR-for-Linux icon indicating copy to clipboard operation
SteamVR-for-Linux copied to clipboard

Bluetooth not available w/ Index

Open slavfox opened this issue 5 years ago • 51 comments

Your system information

  • Steam client version (build number or date): Jul 2 2019, 01:38:08, Steam API v018, Steam package versions 1562035213
  • Distribution (e.g. Ubuntu): Arch
  • Graphics driver version (run nvidia-settings): 430.26
  • Gist for SteamVR System Information
  • Opted into Steam client beta?: [Yes/No]
  • Opted into SteamVR beta?: [Yes/No]
  • Have you checked for system updates?: [Yes/No]

Please describe your issue in as much detail as possible:

SteamVR shows "Bluetooth not available". It is not possible to enable Base Station power management or wake them from standby. The same config works without a hitch on Windows.

It's a big problem, because the Index base stations are very loud and it's extremely irritating for them to be running 24/7, yet Bluetooth is required to put them into standby.

Steps for reproducing this issue:

  1. Connect Valve Index to USB 3.1 port (an USB 3.0 port didn't show bluetooth as available even on Windows)
  2. Open SteamVR
  3. Navigate to settings->bluetooth image

slavfox avatar Jul 03 '19 07:07 slavfox

Possible duplicate of #96.

kisak-valve avatar Jul 03 '19 12:07 kisak-valve

I have the same issue. Bluetooth on Index doesn't seem to work on Linux.

darkstego avatar Jul 05 '19 03:07 darkstego

Same issue here, though I agree that this seems to be a duplicate of #96

Vash63 avatar Jul 08 '19 11:07 Vash63

Same issue #96 seems to be for the Vive, not the Index though. On the Index, Bluetooth can not even be enabled at all.

beniwtv avatar Jul 20 '19 12:07 beniwtv

Same issue on Linux Mint 19.1 (Ubuntu 18.04). I have a working Bluetooth dongle installed as well.

JulianGro avatar Jul 28 '19 18:07 JulianGro

Same for Ubuntu 19.04

Utopiah avatar Aug 20 '19 20:08 Utopiah

same on Manjaro/Kernel 5.2 is there any other way to enable the power management for the lighthouses?

Termuellinator avatar Aug 29 '19 19:08 Termuellinator

Doesn't work on 5.2.8 (Manjaro) with any bluetooth device. My motherboard has a bluetooth support and I also tried a dongle, nothing is detected.

mnn avatar Aug 30 '19 18:08 mnn

i can connect to the lighthouses via the bluetooth-settings of the OS, but even when they are paired and connected, it doesn't appear in steamvr-settings...

Termuellinator avatar Aug 30 '19 19:08 Termuellinator

I prepared simple python program for switching between standby/normal mode: https://gist.github.com/prefiks/e614116fc3983a8e7e5fe326800dc101

Accepts 'on' or 'off' parameter to switch between those two modes, and it does that for all devices that it detects over bluetooth. It may require root access, and possibly also pairing those devices?

prefiks avatar Sep 03 '19 21:09 prefiks

@prefiks I see some confetti, so it is working for others? When I try with dongle I am getting:

$ sudo ./light_houses.py off
Traceback (most recent call last):
  File "./light_houses.py", line 28, in <module>
    scanner.scan(2)
  File "/usr/lib/python3.7/site-packages/bluepy/btle.py", line 854, in scan
    self.stop()
  File "/usr/lib/python3.7/site-packages/bluepy/btle.py", line 803, in stop
    self._mgmtCmd(self._cmd()+"end")
  File "/usr/lib/python3.7/site-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'scanend' (code: 11, error: Rejected)

Scanning with bluetoothctl works, so the dongle should be fine.

With built-in bluetooth it works only for one basestation:

$ sudo ./light_houses.py off
Found LightHouse LHB-CAB8FCD0: address = da:20:79:4f:89:33
Found LightHouse LHB-B0634E90: address = ce:50:43:be:55:c9
Connecting to da:20:79:4f:89:33
Connecting to ce:50:43:be:55:c9
Traceback (most recent call last):
  File "./light_houses.py", line 32, in <module>
    lh.connect(device, addrType = btle.ADDR_TYPE_RANDOM)
  File "/usr/lib/python3.7/site-packages/bluepy/btle.py", line 445, in connect
    self._connect(addr, addrType, iface)
  File "/usr/lib/python3.7/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 ce:50:43:be:55:c9, addr type: random

Any idea what could be wrong with my setup?

mnn avatar Sep 04 '19 06:09 mnn

The first one i also get when i run without sudo, looks like scan require some extra permissions, for the second one maybe try pairing that device from bluetooth panel?

prefiks avatar Sep 04 '19 08:09 prefiks

@prefiks Not working for me too:

$ sudo ./lh.py off
Traceback (most recent call last):
  File "./lh.py", line 28, in <module>
    scanner.scan(2)
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 852, in scan
    self.start(passive=passive)
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 790, in start
    self._mgmtCmd("le on")
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'le on' (code: 17, error: Invalid Index)

leinardi avatar Sep 17 '19 21:09 leinardi

@leinardi That's what I get when I don't have a bluetooth controller. The Index bluetooth chip doesn't work (at least not for me), so you need an external bluetooth dongle (or one on the motherboard).

Anden avatar Dec 03 '19 20:12 Anden

Have there been any updates on this? I'd like to update the firmware for my base stations, but it looks like that's not possible yet in Linux. I'm on the SteamVR Beta and it still does not work.

I'm sort of surprised that I can't update the firmware simply by plugging in a micro usb cable to them -> my computer...maybe that could be a possible temporary workaround? I'm sure it's not that simple or anything, just an idea.

kedodrill avatar Dec 05 '19 13:12 kedodrill

I mean I would just like to turn the stupid things off when I'm not using them so I don't have to unplug them.

Also, this should probably be 3 separate issues.

  • No Bluetooth on Vive (Don't have a vive so I don't know if that's still true)
  • No Bluetooth on Index
  • No Bluetooth from other device.

In this case I can see my phone from the Bluetooth menu in my settings menu. (Also the lighthouses I think.) But SteamVR refuses to acknowledge that I have Bluetooth.

jcc10 avatar Dec 06 '19 02:12 jcc10

  • No Bluetooth on Vive (Don't have a vive so I don't know if that's still true)

Can confirm. There is no bluetooth on the Vive. I do have a checkbox that is ticked, but Bluedevil does not see it as a device.

llamasking avatar Dec 06 '19 04:12 llamasking

@kisak-valve Are there any plans in place to get bluetooth working in SteamVR for Linux? I've been seeing a lot of bug fixes in SteamVR Beta, so that makes me hopeful that more features will be added later on after this seemingly bug fixing phase...if there was some official confirmation on possible plans to get bluetooth working on Linux, that would make me (and probably a lot of other people here) happy. Thank you.

kedodrill avatar Dec 17 '19 17:12 kedodrill

For the desperate: here's how to set the channel on the Vive base station 2.0 without bluetooth: https://holocafe.de/en/blog/posts/how-to-set-up-multiple-steamvr-20-base-stations

(The other question is: can we update base 2.0 from Linux via USB without bricking it like the old one? If no, isn't bluetooth then kinda really needed?)

Seegras avatar May 08 '20 14:05 Seegras

Does @prefiks script work on Lighthouse 2 devices? Near as I can tell, you can't even discover / pair them. Tried with multiple dongles and even my phone.

If not, than this issue is even bigger for me. Unplugging these devices requires a ladder for my setup, but the noise is just maddening enough to make me do it.

TheCraiggers avatar May 18 '20 16:05 TheCraiggers

It stopped working after my lighthouses were updated, i didn't manage to get that script working again.

prefiks avatar May 18 '20 17:05 prefiks

Well, crap. :(

TheCraiggers avatar May 18 '20 18:05 TheCraiggers

I also experience issues when trying to toggle the lighthouse boxes (2.0), sometimes it works, then it doesn't. Sometimes it toggles one box, but not the other. When I retry often enough, it then works at some point. I now use an usb bluetooth dongle, as this seems to work more reliably than the Index bluetooth.

Still, with the script posted above I always have my issues, unfortunately. I went and created a different script which makes use of gatttool to toggle the boxes, which works better for me - not everytime, but most of the time. It is a little bit more work to set it up, though, as you need to get the MAC addresses and add them to the script. For those who are interested, here is a guide and the script: gatttool script If you know your lighthouse MAC addresses already, you can skip step 2+3.

smirgol avatar May 22 '20 22:05 smirgol

I also experience issues when trying to toggle the lighthouse boxes (2.0), sometimes it works, then it doesn't. Sometimes it toggles one box, but not the other. When I retry often enough, it then works at some point. I now use an usb bluetooth dongle, as this seems to work more reliably than the Index bluetooth.

Still, with the script posted above I always have my issues, unfortunately. I went and created a different script which makes use of gatttool to toggle the boxes, which works better for me - not everytime, but most of the time. It is a little bit more work to set it up, though, as you need to get the MAC addresses and add them to the script. For those who are interested, here is a guide and the script: gatttool script If you know your lighthouse MAC addresses already, you can skip step 2+3.

gatttool is deprecated. Getting input/output errors and not working. Maybe if you use older hardware or bluez versions

Draic avatar May 23 '20 17:05 Draic

Using smirgol's gattool method works reliably 100% of the time for me with a cheap Logilink bluetooth dongle.

RPGHiro avatar Jul 18 '20 09:07 RPGHiro

gatttool is deprecated, is there another option?

silelmot avatar Aug 22 '20 18:08 silelmot

This modified version of @prefiks script is working for me right now on Ubuntu 20.04

https://gist.github.com/waylonflinn/d525e08674ec3abb5c98cd41d1fd2f24

waylonflinn avatar Aug 30 '20 23:08 waylonflinn

doesnt work for me... just get errors (on arch) File "./lh.py", line 39, in <module> lh.connect(device, addrType = btle.ADDR_TYPE_RANDOM) File "/usr/lib/python3.8/site-packages/bluepy/btle.py", line 445, in connect self._connect(addr, addrType, iface)

UPDATE: Works now with a new bluetooth-dongle. dont know if 5.0 is necessary or my old dongle wasnt ok, but it works great now. just for completion i wanna point to this great guide: https://www.reddit.com/r/virtualreality_linux/comments/g02bi5/automatically_turn_on_and_off_base_stations_when/

  1. Set the launch options in Steam for SteamVR. /path/to/lh.py on; %command%; sleep 5; VR_PID=$(pidof vrserver); if [ -z $VR_PID ]; then echo "VR Server not found"; else while [ -d /proc/$VR_PID ]; do sleep 5; done; /path/to/lh.py off; fi; This simply runs the lh.py to turn the base stations on. Then executes the normal SteamVR stuff. And then waits for the process vrserver to terminate to turn the base stations off again.

silelmot avatar Sep 12 '20 19:09 silelmot

I made an improved version of the scripts posted here previously by @prefiks and @waylonflinn. It is more reliable, can start automatically with SteamVR and includes some additional features (e.g. switching the audio device automatically). https://github.com/DavidRisch/steamvr_utils Based on the age of this issue i don't think Valve will add Base Station power management to Linux any time soon. So feel free to suggest improvements to the utility.

DavidRisch avatar Jan 08 '21 15:01 DavidRisch

Great, but at least for me, SteamVR already switches the audio automatically. I reckon it might conflict?

Patola avatar Jan 08 '21 15:01 Patola