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

Wireless disconnection when removing USB (oculus go) #189

Closed
elodesignco opened this issue Jul 3, 2018 · 4 comments
Closed

Wireless disconnection when removing USB (oculus go) #189

elodesignco opened this issue Jul 3, 2018 · 4 comments

Comments

@elodesignco
Copy link

elodesignco commented Jul 3, 2018

  1. Connect the device to the same Wi-Fi as computer
  2. Get device IP address: adb shell ip addr show wlan0
  3. Enable adb over TCP/IP on device: adb tcpip 5555
  4. Connect to device: adb connect DEVICE_IP:5555 (replace DEVICE_IP)
  5. adb devices: shows two connections, one usb and one to the ip
  6. Unplug device

At this point I'm expecting to be able to run;
7. Run scrcpy: scrcpy -s 192.168.1.185:5555

However, both devices are disconnected when pulling the usb cable out.
As an alternate permutation: If I leave the usb connected and run step #7, scrcpy loads and then if I pull the usb - it disconnects.

Is there a better method for getting wireless connectivity working?

@rom1v
Copy link
Collaborator

rom1v commented Jul 3, 2018

However, both devices are disconnected when pulling the usb cable out.

I can't reproduce (with a Nexus 5, not an Oculus go). If I unplug the device, there is still the device connected over TCP.

Your device seems to restart/reconfigure adb when you unplug it.

@elodesignco
Copy link
Author

elodesignco commented Jul 3, 2018

I've been doing some more testing and after unplugging the USB, I can still use: adb connect DEVICE_IP:5555 and connect to the device. Can also ping the device also and get a response.

It appears to just disappear from the list of devices within ADB. I think it has something to do with MAC USB enumeration killing ADB, not the device itself.

[disconnect USB]

$ adb connect 192.168.1.185:5555
connected to 192.168.1.185:5555

$ ping 192.168.1.185
PING 192.168.1.185 (192.168.1.185): 56 data bytes
64 bytes from 192.168.1.185: icmp_seq=0 ttl=64 time=757.020 ms
64 bytes from 192.168.1.185: icmp_seq=1 ttl=64 time=210.854 ms
64 bytes from 192.168.1.185: icmp_seq=2 ttl=64 time=768.758 ms

$ scrcpy
adb: error: failed to get feature set: no devices/emulators found
2018-07-03 16:40:33.600 scrcpy[37756:4675145] ERROR: "adb push" returned with value 1

$ adb devices -l
List of devices attached

[reconnect USB]

$ adb devices -l
List of devices attached
1KWPH813818187         device usb:336592896X product:vr_pacific model:Pacific device:pacific transport_id:5
192.168.1.185:5555     device product:vr_pacific model:Pacific device:pacific transport_id:6

@petermg
Copy link

petermg commented Jul 9, 2018

I use this for my Oculus Go all the time, never have an issue. However if I connect to my Go via WiFi BEFORE disconnecting the USB, I ALWAYS get disconnected. I have to FIRST disconnect the USB connection, THEN I can connect to it over WiFi with ADB. Think you're just doing it wrong.

@ambhaiji
Copy link

please see #209 this might resolve the issue you are having

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants