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

SCRCPY wifi #4866

Open
Step72 opened this issue Apr 20, 2024 · 8 comments
Open

SCRCPY wifi #4866

Step72 opened this issue Apr 20, 2024 · 8 comments

Comments

@Step72
Copy link

Step72 commented Apr 20, 2024

Environment

  • OS: Mac Os 14.4.1
  • scrcpy version:
  • installation method: Terminal brew install scrcpy
  • device model: Redmi note 12
  • Android version: 14

Good morning
I have a question regarding SCRCPY
If I don't let SCRCPY connect via USB to my computer, when I start my computer in the morning, I have to reconnect SCRCPY via USB and redo the adb tcpip 5555 procedure to be able to use SCRCPY via WIFI

Is there a way when I start my computer that SCRCPY detects and works automatically over Wi-Fi

@rom1v
Copy link
Collaborator

rom1v commented Apr 20, 2024

You must execute adb tcpip 5555 on every phone reboot. But not on computer reboot.

@Step72
Copy link
Author

Step72 commented Apr 20, 2024

Ok but my phone must always be connected to my computer!

@rom1v
Copy link
Collaborator

rom1v commented Apr 20, 2024

If you don't want to connect over USB at all, as mentioned in the doc, from Android 11 you can pair wirelessly: https://developer.android.com/tools/adb#wireless-android11-command-line

@Step72
Copy link
Author

Step72 commented Apr 20, 2024

If I type in my terminal adb pair 192.168.1.16:5555 I don't receive any code association requests on my phone !

@rom1v
Copy link
Collaborator

rom1v commented Apr 20, 2024

Did you enable wireless debugging?

Please follow the steps here, I cannot help more, it's the official Android documentation: https://developer.android.com/tools/adb#wireless-android11-command-line

@Step72
Copy link
Author

Step72 commented Apr 22, 2024

Good morning
In the morning, when I start my computer, and I want to connect to SCRCPY directly via Wi-Fi, I have to each time in my terminal type adb connect 192.168.1.16:5555 THEN scrcpy -s 192.168.1.16:5555 to connect to my phone via wifi.

Why if I directly type scrcpy -s 192.168.1.16:5555 do I not connect via Wi-Fi to my phone?

@rom1v
Copy link
Collaborator

rom1v commented Apr 22, 2024

scrcpy -s XXXX just selects a device listed by adb devices (like adb -s XXXX shell would do), it does not create any new connection.

So if your device is not connected, you must connect using adb connect XXXX beforehand (so that it is listed by adb devices).

But instead, you can use scrcpy --tcpip=192.168.1.16:5555 and it will connect if necessary. See https://github.com/Genymobile/scrcpy/blob/master/doc/connection.md#tcpip-wireless

@Step72
Copy link
Author

Step72 commented Apr 22, 2024

But instead, you can use scrcpy --tcpip=192.168.1.16:5555 and it will connect if necessary.

With this method it works really well. Thank you so much

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

No branches or pull requests

2 participants