Now add this line to the end of the -output HDMI-1 -rotate right To rotate your display 90º so it fits your mirror, open a Terminal and enter the following: boot/config.txt to easily rotate the screen, but with Raspberry Pi 4’s fancy new graphics support, this is no longer possible. Follow our Build a magic mirror tutorial to get your own mirror up-and-running.Ĭan a mirror be upside-down? A magic mirror can! Most mirrors tend to be portrait, whereas screens are normally landscape. You can try it in a terminal or as a GUI application.ĭo you use another screen-mirroring application? If so, let us know about it in the comments.Building a magic mirror is one of the easiest, and most rewarding Raspberry Pi projects. Once it's connected, you can run scrcpy as usual. For instance, assuming my mobile's IP address is 10.1.1.22, the command is: Whenever you want to connect over WiFi, first connect to the mobile with the command adb connect. ![]() Now you can disconnect your mobile from USB. This, you must do through the adb command: To connect to your device over WiFi, you must enable TCP/IP connections. It usually starts with 192.168 or 10.Īlternately, you can get your mobile's IP address using adb: $ adb shell ip route | awk '' Look at the Status option to get your address. Next, get your phone's IP address by navigating to Settings and selecting About phone. Do NOT disconnect your phone from USB yet! ![]() To try it, make sure your phone is connected over WiFi on the same wireless network your computer is using. Then execute $ scrcpy to launch it with the default settings. Nexus/Pixel Device (PTP + debug)īus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubīus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubīus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Hubīus 004 Device 001: ID 18d1:4ee6 Google Inc. F310 Gamepadīus 005 Device 005: ID 0951:1666 Kingston Technology DataTraveler G4īus 005 Device 004: ID 05e3:0608 Genesys Logic, Inc. You only have to do this the first time you connect after that, your phone will recognize and trust your computer.Ĭonfirm the setting with the lsusb command: $ lsusbīus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubīus 011 Device 004: ID 046d:c21d Logitech, Inc. Your phone will probably prompt you to authorize your computer, identified by its RSA fingerprint. If your phone doesn't use PTP, set the mode your phone uses for transferring files (rather than, for instance, serving as a tethering or MIDI device). Then connect the phone to your Raspberry Pi or laptop (or whatever device you're using) over USB and set the mode to PTP, if that's an option. If Developer options is not activated, follow Android's instructions to unlock it. Open the Settings app on your Android and scroll down to Developer options. Once scrcpy is installed, you must enable USB debugging and authorize each device (your Raspberry Pi, laptop, or workstation) as a trusted controller. ![]() It doesn't take long to build, even on a Raspberry Pi, using the instructions on scrcpy's GitHub page. On Debian or Ubuntu: $ sudo apt install scrcpy If you're running Fedora, you can install it from a Copr repository: $ sudo dnf copr enable zeno/scrcpy Scrcpy's setup and configuration are very easy. It uses TCP/IP and does not require any root access. Communication between the Android device and the computer is primarily done over a USB connection and Android Debug Bridge (ADB). Scrcpy, commonly known as Screen Copy, is an open source screen-mirroring tool that displays and controls Android devices from Linux, Windows, or macOS. Sound appealing? Here's how you can do it too. This helps me keep my attention on my desktop, prevents me from mentally wandering away, and makes it easier for me to reply to urgent notifications. In essence, I made my phone into an app running alongside all of my other applications. I decided to solve this problem by copying my phone's screen onto my computer. I wanted a way to unify the different sources of data in my life on whatever screen I am staring at.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |