Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for original V1 (Vive) lighthouses #15

Open
nukmuk opened this issue Aug 17, 2020 · 24 comments
Open

Add support for original V1 (Vive) lighthouses #15

nukmuk opened this issue Aug 17, 2020 · 24 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nukmuk
Copy link

nukmuk commented Aug 17, 2020

No description provided.

@jeroen1602
Copy link
Owner

I would love to be able to do this, but I don't have any Vive lighthouses to test this with.

So if anyone want to pick this up, be my guest!.

@jeroen1602 jeroen1602 added enhancement New feature or request help wanted Extra attention is needed labels Aug 17, 2020
@jeroen1602 jeroen1602 pinned this issue Aug 28, 2020
@jeroen1602
Copy link
Owner

I have found a python implementation for what we want, will look into it later to see if I can use this. https://github.com/cinfulsinamon/BasestationPowerManager.

But it will need some work to make the finding of lighthouses more generic because right now it's pretty difficult to change the code to add another supported device.

@jeroen1602
Copy link
Owner

I've got a pr for Vive base stations support, but I can't test if it works. #35

@jeroen1602
Copy link
Owner

A beta version of the Vive base station support should be merged into master. You can try it by enabling the beta support on the settings page. Feedback on how it works would be appreciated.

@jeroen1602
Copy link
Owner

@BlakCake are you able to make a build or should I make one for you that you can sideload?

@BlakCake
Copy link

I tried getting along with Flutter but it kinda hates me right now so if you could provide a build, I would appreciate it!

@jeroen1602
Copy link
Owner

You can download a debug build here.

@BlakCake
Copy link

Thanks! It doesn't seem to be detecting the base stations. Although the dark mode is looking really good.

MainScreen

Bluetooth setting is showing the base station tho, so my phone does see them

BluetoothSettings

@jeroen1602
Copy link
Owner

Have you gone into settings to enable Vive Base station support?

@BlakCake
Copy link

BlakCake commented Sep 29, 2020

It seems it's working now, thanks for the heads up oops! Sometimes just one base station shows up and I have to Refresh/Restart until they both are showing. I tried putting one in Sleep and got this:

Oopsie

Also it doesn't know the current state of the base station. It appears to be the same tho, I can feel the motor spinning and the red lights are there.

@jeroen1602
Copy link
Owner

jeroen1602 commented Sep 29, 2020

It's good to know that it works! I made a guess, since I don't know what Bluetooth characteristic to read to get the current state. So what you see there is just a guess since I couldn't test what the state should be.

If you want you could try and go through the Bluetooth characteristic's using something like BLE scanner to see what characteristic reports back the current state and what number defines what state.

@BlakCake
Copy link

You mean this?

BLE

@jeroen1602
Copy link
Owner

Yes click connect and go through the services and characteristics to see if one of them changes between on and off (sleep). You only have to go through the characteristics that have the R (read) option.

P.S. only one device is allowed to connect to a BLE device at a time, so make sure you disconnect the BLE scanner before trying to find the device again.
P.P.S. if you are having scan issues try increasing the scan duration in the settings.

@BlakCake
Copy link

BlakCake commented Sep 29, 2020

So I just compared every Custom Service with Read twice between Sleep and On. Nothing seems to be changing between them.

Here's a screenshot:

@jeroen1602
Copy link
Owner

Man that sucks, do you know if steam vr does report back the current state?

Also the 0x10ca (shown in your earlier screenshot) is different from the on command that was being send. So maybe we can use that as the on state.

If there is no way of getting the state then we are stuck to always asking the user what they want to do (which sucks). But this is hopefully mitigated in the future by adding grouping support.

@nukmuk
Copy link
Author

nukmuk commented Sep 29, 2020

Mine seem to change, here's both with SteamVR open


and after closing SteamVR (standby)

EDIT: Something happened to the last two screenshots so they're taller and a part of the screen is shown twice. The characteristic that changes is the first one though.

@BlakCake
Copy link

I'll try again with SteamVR open

@jeroen1602
Copy link
Owner

So we might get somewhere by reading the 0000CB01-0000-1000-8000-00805F9B34FB characteristic. and using 0x001503020B for on and 0x0012000100 for off.

Also steam VR uses a bit of a different method to turn the base stations on. They send an on command with a timeout, and if they don't send the same command again within the timeout then the base station will turn off. But there is also a mode for just turning it on, and the app uses that mode.

@BlakCake
Copy link

SteamVR open
Unknown State: https://i.imgur.com/K0E15SQ.jpg
After choosing Sleep: https://i.imgur.com/mVPiOx7.jpg
After choosing On: https://i.imgur.com/zBlFpoC.jpg

Everything stopped tracking after this. I may need to restart the base stations

@jeroen1602
Copy link
Owner

@BlakCake I don't see any read properties in your screenshots, did you click the R button?

@Supreeeme
Copy link

Supreeeme commented Nov 19, 2020

Wanted to say it works with powering and turning off my base stations, although it's a bit finicky. The state is listed as unknown though. Also I looked at that BLE scanner and found something that changes:
Screenshot_20201118-221109_BLE Scanner
The value I have opened is x00120001 when my base station is sleeping (like shown), but it's x001200000... when they are on.

@asktoby
Copy link

asktoby commented Jan 7, 2021

Just wanted to say I'm using this with my Vive trackers and it is working great! Thank you!

@RedlineTriad
Copy link

Were these debug features ever merged into the main branch because I don't see a toggle to enable vive base stations and it doesn't seem to find them either.

@nukmuk
Copy link
Author

nukmuk commented Feb 18, 2024

I think some recent(?) update broke support for the V1 base stations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants