cancel
Showing results for 
Search instead for 
Did you mean: 

Quest Link Automation

grumpyfurey
Level 3

Hi! 👋

I have a Unity VR application added to a Windows PC's Oculus application displaying on a Meta Quest 2 headset via Quest Link cable. The Unity application runs all day in a Museum exhibition environment and shuts down overnight.

To enable Quest Link in the PC Oculus application you manually select:

Device → Device setup → Select a Connection Method (Link Cable)

To enable Quest Link on the Quest 2 headset you manually select:

Quick Settings → Quest Link → (select PC) → Launch

Whenever you restart the PC or the Quest 2 headset, both PC and headset require you to go through their menus again to enable the Quest Link connection. Even if you leave the headset on standby you need to do the PC setup again.

After a PC or headset restart, is it possible to automate the enabling of the Quest Link connection on both the headset and PC without having to manually go through their setup menus every time?

I reached out to Oculus support who pointed me to Meta Quest Developer Hub (specifically the Create a Custom Command page of the Unity section of the Oculus Documentation website). Reading the docs and trawling the web I've gotten my head around passing shell commands through to the headset via "adb shell [command]" (hinted at in the Use Meta Quest Scriptable Testing Services section of docs) but I can't find an instructive list of Oculus operating system-related commands anywhere and am thus kinda stuck.

Would appreciate any tips the forum can provide regarding my automation inquiry.

Cheers!

🤓🙏

1 ACCEPTED SOLUTION

Accepted Solutions

grumpyfurey
Level 3

Hi again! 👋

@mreimer: Thanks for sharing that link. It presented the same adb solution I ended up finding elsewhere, but implemented with additional clever plug and play automation I found really interesting. Cheers!

TL;DR: With adb installed, via the command line run:

adb shell am start -S com.oculus.xrstreamingclient/.MainActivity

Here's some more context about my search for the answer, plus follow up frustrations I'm still keen to solve.

As instructed by Oculus support I installed the Windows Meta Quest Developer Hub (MQDH) application. With MQDH running and the Quest 2 headset connected to the PC via Quest Link cable, opening the MQDH "Device Manager" section I saw the "Meta Quest Link" action presented in its "Device Actions" panel:

MQDH-MetaQuestLinkSettingDisabled.png

Enabling the action connected the headset and PC without having to manually go through their setup menus:

MQDH-MetaQuestLinkSettingEnabled.png

This felt like a great win. Bypassing both headset and PC menus with a single click? Woohoo!

Unfortunately when you subsequently disable the setting, while the headset and PC Quest Link connection successfully disconnects (sending you back to the Oculus home environment from the Quest Link environment), the headset also unmounts from the PC, meaning you can't re-enable the setting via the "Meta Quest Link" action again without manually removing then reconnecting the Quest Link cable:

MQDH-MetaQuestLinkSettingWarning.png

Referring back to Oculus support's original instructions regarding custom commands, I searched through these forums until I found the following comment:

Custom Command Solution for ODH to create a toggle off/on Quest Link outside the device.

Start Link (button 1):
adb shell am start -S com.oculus.xrstreamingclient/.MainActivity

Stop Link (button 2):
adb shell am force-stop com.oculus.xrstreamingclient

Via MQDH's "Custom Commands" panel, I added both of the adb commands found in the above comment:

MQDH-StartQuestLinkCustomCommand.png

MQDH-StopQuestLinkCustomCommand.png

Re-establishing the headset and PC cable connection, I ran my "Start Quest Link" command:

MQDH-StartQuestLinkCustomCommandItem.png

The headset and PC connected without having to manually go through their setup menus which was the same successful outcome as running the previously mentioned "Meta Quest Link" action, and I now had a command that could run directly via the command line (custom commands are just console commands) which means I could theoretically wrap it in a script file to run whenever I needed it to. Woohoo!

I then ran my "Stop Quest Link" command:

MQDH-StopQuestLinkCustomCommandItem.png

Unfortunately, while the headset and PC Quest Link connection successfully disconnected, the headset once again unmounted from the PC, meaning I couldn't successfully re-run my "Start Quest Link" command without manually removing then reconnecting the Quest Link cable (same problem as the MQDH "Meta Quest Link" action).

When re-running my "Start Quest Link" command, the Quest Link environment would begin to boot then after a short while I'd be pushed back to the Oculus home environment where I'd see a "PC Disconnected" dialog:

Quest2-PCDisconnectedDialog.png

I'm guessing under the hood the MQDH "Meta Quest Link" action is probably using those same adb commands I found elsewhere in this forum. Both MQDH action and adb commands enable the Quest Link connection seamlessly, but when disabling the connection they also unmount the headset leaving users to manually unplug then reconnect cables to re-enable Quest Link again.

Notably, if you disable your Quest Link connection from within the headset experience…

Quest Link Menu → Disable Quest Link → Disable

…both MQDH "Meta Quest Link" action and custom commands can be re-enabled without having to manually reconnect cables.

Alas, automated re-enabling of the Quest Link connection eludes me, but my original issue is answered so I'm marking my question as solved.

Thanks for listening, and hope this helps someone facing similar issues in the future.

🤓✌️

View solution in original post

5 REPLIES 5

FunkyTanuki
Meta Quest Support
Meta Quest Support

Hey there, this sounds like a very interesting idea. While I don't have any info regarding this specifically, I hope someone here in the community can help you further on this. Good luck!

mreimer
Level 4

Not sure if this is exactly what you want but it might lead you in the right direction. automatically connect your Meta Quest 2 when plugging it to your pc through USB 

grumpyfurey
Level 3
Hi again! ‌👋
 
@mreimer: Thanks for sharing that link. It presented the same adb solution I ended up finding elsewhere, but implemented with additional clever plug and play automation I found interesting. Cheers!
 
TL;DR: With adb installed, via the command line run: 

 

 

adb shell am start -S com.oculus.xrstreamingclient/.MainActivity

 

 

 
Here's some more context about my search for the answer, plus follow up frustrations I'm still keen to solve.
 
As instructed by Oculus support I installed the Windows Meta Quest Developer Hub (MQDH) application. With MQDH running and the Quest 2 headset connected to the PC via Quest Link cable, opening the MQDH "Device Manager" section I saw the "Meta Quest Link" action presented in its "Device Actions" panel:


MQDH-MetaQuestLinkSettingDisabled.png

Enabling the action connected the headset and PC without having to manually go through their setup menus:
 
MQDH-MetaQuestLinkSettingEnabled.png
 
This felt like a great win. Bypassing both headset and PC menus with a single click? Woohoo!
 
Unfortunately when you subsequently disable the setting, while the headset and PC Quest Link connection successfully disconnects (sending you back to the Oculus home environment from the Quest Link environment), the headset also unmounts from the PC, meaning you can't re-enable the setting via the "Meta Quest Link" action again without manually removing then reconnecting the Quest Link cable:
 
MQDH-MetaQuestLinkSettingWarning.png
 
Referring back to Oculus support's original instructions regarding custom commands, I searched through these forums until I found the following comment:

 

 

Custom Command Solution for ODH to create a toggle off/on Quest Link outside the device.

Start Link (button 1):
adb shell am start -S com.oculus.xrstreamingclient/.MainActivity

Stop Link (button 2):
adb shell am force-stop com.oculus.xrstreamingclient

 

 

Via MQDH's "Custom Commands" panel, I added both of the adb commands found in the above comment:
 
MQDH-StartQuestLinkCustomCommand.png
 
MQDH-StopQuestLinkCustomCommand.png
 
Re-establishing the headset and PC cable connection, I ran my "Start Quest Link" command:
 
MQDH-StartQuestLinkCustomCommandItem.png
 
The headset and PC connected without having to manually go through their setup menus which was the same successful outcome as running the previously mentioned "Meta Quest Link" action, and I now had a command that could run directly via the command line (custom commands are just console commands) which means I could theoretically wrap it in a script file to run whenever I needed it to. Woohoo!
 
I then ran my "Stop Quest Link" command:
 
MQDH-StopQuestLinkCustomCommandItem.png
 
Unfortunately, while the headset and PC Quest Link connection successfully disconnected, the headset once again unmounted from the PC, meaning I couldn't successfully re-run my "Start Quest Link" command without manually removing then reconnecting the Quest Link cable (same problem as the MQDH "Meta Quest Link" action).
 
When re-running my "Start Quest Link" command, the Quest Link environment would begin to boot then after a short while I'd be pushed back to the Oculus home environment where I'd see a "PC Disconnected" dialog:
 
Quest2-PCDisconnectedDialog.png
 
I'm guessing under the hood the MQDH "Meta Quest Link" action is probably using those same adb commands I found elsewhere in this forum. Both MQDH action and adb commands enable the Quest Link connection seamlessly, but when disabling the connection they also unmount the headset leaving users to manually unplug then reconnect cables to re-enable Quest Link again.
 
Notably, if you disable your Quest Link connection from within the headset experience…
 
Quest Link Menu → Disable Quest Link → Disable
 
…both MQDH "Meta Quest Link" action and custom commands can be re-enabled without having to manually reconnect cables.
 
Alas, automated re-enabling of the Quest Link connection eludes me, but my original issue is answered so I'm marking my question as solved.
 
Thanks for listening, and hope this helps someone facing similar issues in the future.
 
🤓✌️

grumpyfurey
Level 3

Hi again! 👋

@mreimer: Thanks for sharing that link. It presented the same adb solution I ended up finding elsewhere, but implemented with additional clever plug and play automation I found really interesting. Cheers!

TL;DR: With adb installed, via the command line run:

adb shell am start -S com.oculus.xrstreamingclient/.MainActivity

Here's some more context about my search for the answer, plus follow up frustrations I'm still keen to solve.

As instructed by Oculus support I installed the Windows Meta Quest Developer Hub (MQDH) application. With MQDH running and the Quest 2 headset connected to the PC via Quest Link cable, opening the MQDH "Device Manager" section I saw the "Meta Quest Link" action presented in its "Device Actions" panel:

MQDH-MetaQuestLinkSettingDisabled.png

Enabling the action connected the headset and PC without having to manually go through their setup menus:

MQDH-MetaQuestLinkSettingEnabled.png

This felt like a great win. Bypassing both headset and PC menus with a single click? Woohoo!

Unfortunately when you subsequently disable the setting, while the headset and PC Quest Link connection successfully disconnects (sending you back to the Oculus home environment from the Quest Link environment), the headset also unmounts from the PC, meaning you can't re-enable the setting via the "Meta Quest Link" action again without manually removing then reconnecting the Quest Link cable:

MQDH-MetaQuestLinkSettingWarning.png

Referring back to Oculus support's original instructions regarding custom commands, I searched through these forums until I found the following comment:

Custom Command Solution for ODH to create a toggle off/on Quest Link outside the device.

Start Link (button 1):
adb shell am start -S com.oculus.xrstreamingclient/.MainActivity

Stop Link (button 2):
adb shell am force-stop com.oculus.xrstreamingclient

Via MQDH's "Custom Commands" panel, I added both of the adb commands found in the above comment:

MQDH-StartQuestLinkCustomCommand.png

MQDH-StopQuestLinkCustomCommand.png

Re-establishing the headset and PC cable connection, I ran my "Start Quest Link" command:

MQDH-StartQuestLinkCustomCommandItem.png

The headset and PC connected without having to manually go through their setup menus which was the same successful outcome as running the previously mentioned "Meta Quest Link" action, and I now had a command that could run directly via the command line (custom commands are just console commands) which means I could theoretically wrap it in a script file to run whenever I needed it to. Woohoo!

I then ran my "Stop Quest Link" command:

MQDH-StopQuestLinkCustomCommandItem.png

Unfortunately, while the headset and PC Quest Link connection successfully disconnected, the headset once again unmounted from the PC, meaning I couldn't successfully re-run my "Start Quest Link" command without manually removing then reconnecting the Quest Link cable (same problem as the MQDH "Meta Quest Link" action).

When re-running my "Start Quest Link" command, the Quest Link environment would begin to boot then after a short while I'd be pushed back to the Oculus home environment where I'd see a "PC Disconnected" dialog:

Quest2-PCDisconnectedDialog.png

I'm guessing under the hood the MQDH "Meta Quest Link" action is probably using those same adb commands I found elsewhere in this forum. Both MQDH action and adb commands enable the Quest Link connection seamlessly, but when disabling the connection they also unmount the headset leaving users to manually unplug then reconnect cables to re-enable Quest Link again.

Notably, if you disable your Quest Link connection from within the headset experience…

Quest Link Menu → Disable Quest Link → Disable

…both MQDH "Meta Quest Link" action and custom commands can be re-enabled without having to manually reconnect cables.

Alas, automated re-enabling of the Quest Link connection eludes me, but my original issue is answered so I'm marking my question as solved.

Thanks for listening, and hope this helps someone facing similar issues in the future.

🤓✌️

mreimer
Level 4

Glad to hear that this helped. 👍