From 0c9b4ac32a98a6cfbc7aa5e0e1bee6c723671e9e Mon Sep 17 00:00:00 2001 From: Shane Harris Date: Sat, 6 Aug 2022 12:05:53 +0200 Subject: [PATCH] added ability to manually connect to wifi --- desktop-app/src/app/adb-client.service.ts | 2 +- .../headset-settings.component.ts | 1 - .../wireless-connection.component.html | 30 +++++++++++++++++-- .../wireless-connection.component.ts | 8 +++++ package.json | 2 +- 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/desktop-app/src/app/adb-client.service.ts b/desktop-app/src/app/adb-client.service.ts index 0f592925..19f2960f 100644 --- a/desktop-app/src/app/adb-client.service.ts +++ b/desktop-app/src/app/adb-client.service.ts @@ -135,7 +135,7 @@ export class AdbClientService { return this.deviceStatus === ConnectionStatus.CONNECTED; } runAdbCommand(adbCommandToRun, skipSettingResponse?: boolean) { - if (this.deviceStatus !== ConnectionStatus.CONNECTED) { + if (this.deviceStatus !== ConnectionStatus.CONNECTED && !adbCommandToRun.startsWith('adb connect ')) { return Promise.reject('Adb command failed - No device connected!'); } if (!skipSettingResponse) { diff --git a/desktop-app/src/app/headset-settings/headset-settings.component.ts b/desktop-app/src/app/headset-settings/headset-settings.component.ts index fbf4c732..ed0d19eb 100644 --- a/desktop-app/src/app/headset-settings/headset-settings.component.ts +++ b/desktop-app/src/app/headset-settings/headset-settings.component.ts @@ -293,7 +293,6 @@ export class HeadsetSettingsComponent implements OnInit { ); }) .catch(e => this.statusService.showStatus(e, true)); - console.log(this.videoCaptureSize); } setGuardian(guardian: GU) { this.runAdbCommand('setprop debug.oculus.guardian_pause ' + (guardian === GU.ON ? 0 : 1)) diff --git a/desktop-app/src/app/wireless-connection/wireless-connection.component.html b/desktop-app/src/app/wireless-connection/wireless-connection.component.html index 90189b6c..df4a945d 100644 --- a/desktop-app/src/app/wireless-connection/wireless-connection.component.html +++ b/desktop-app/src/app/wireless-connection/wireless-connection.component.html @@ -1,8 +1,13 @@
-
You are not currently connected. +
You are not currently connected. You can try entering your quest IP, if Wireless ADB is enabled then it will connect.

-
Open Setup Instructions
+
Open Setup Instructions
+
Enter IP to connect
+

+ + Last known device IP: {{adbService.deviceIp}} +
Enable wifi mode to install apps wirelessly. You must be connected with USB to enable wifi mode.
@@ -23,3 +28,24 @@
+ + + +

Enter Quest Wifi IP

+
+ + If you previously enable Wireless ADB on your headset then you can enter the IP to connect here. + +

+
+
+ +
+
+
+
+ +
Close
+
Connect
+
+
diff --git a/desktop-app/src/app/wireless-connection/wireless-connection.component.ts b/desktop-app/src/app/wireless-connection/wireless-connection.component.ts index 62c3db8b..5d6c8617 100644 --- a/desktop-app/src/app/wireless-connection/wireless-connection.component.ts +++ b/desktop-app/src/app/wireless-connection/wireless-connection.component.ts @@ -9,9 +9,13 @@ import { StatusBarService } from '../status-bar.service'; styleUrls: ['./wireless-connection.component.scss'], }) export class WirelessConnectionComponent implements OnInit { + connectWifiIp: string; constructor(public adbService: AdbClientService, appService: AppService, private statusService: StatusBarService) { appService.webService.isWebviewOpen = false; appService.resetTop(); + if (adbService.deviceIp) { + this.connectWifiIp = adbService.deviceIp; + } } ngOnInit() {} @@ -40,4 +44,8 @@ export class WirelessConnectionComponent implements OnInit { // } return isConnected; } + + connectManualWifi() { + this.adbService.runAdbCommand('adb connect ' + this.connectWifiIp + ':5555', true); + } } diff --git a/package.json b/package.json index 24df90bd..bf2aeb58 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "SideQuest", "productName": "SideQuest", - "version": "0.10.30", + "version": "0.10.31", "description": "A open app store for mobile android based VR devices such as the Levovo Mirage, Oculus Go, Oculus Quest, Vive Focus.", "repository": "https://github.com/SideQuestVR/SideQuest.git", "license": "UNLICENCED",