If you want to automatically connect your Meta Quest 2 when plugging it to your pc through USB, use this small guide
First, install adb https://developer.oculus.com/downloads/package/oculus-adb-drivers/
Second execute that script from a command line terminal
– adb shell am start -S com.oculus.xrstreamingclient/.MainActivity (Source)
This script is starting the Oculus Link from your Quest device. Tada!
Third, because we want it to be automatic we will add an automated script task using Windows Task Scheduler
- Create a .bat file that contain the script above. We name it here QuestAutoLink.bat
- Track which event is doing USB plug and Unplug
- Right click on the detected event and do an Attach Task to this Event
- As an Action, pinpoint it to our previously created .bat file named QuestAutoLink.bat
Et voilà! Each time you will plug an usb to your pc the script will run. However, only an Oculus Quest device will respond to it and auto start the Quest Link for you!
In order to not get bother by this spawning windows each time you plug an usb, check the Run whether user is logged or not in the Task Scheduler
Todo List to upgrade:
– Script execute each time
– Dunnot work if the Quest is not already unlocked
– Your Quest will disconnect/reconnect when you plug/unplug other usb