7

I have a need for mirroring my Android phone display to TV/Monitor and besides I have RPi 2. Can I implement this without buying any additional devices, cables or adapters? Casting protocol is of no importance for me. It could be Miracast, Samsung Allshare cast or whatever.
My device is Samsung LPH-720 (Galaxy S4).

UPDATE: in the first answer VNC was offered as way of screencasting. However, I doubt that Wi-Fi bandwidth will be enough for stable screencasting. Another shortcoming is high battery drain.
Is there any way to connect phone to RPi via wired connection? USB or GPIO connector?

4

You can install any VNC server app on your Android, such as VMLite VNC Server. On the RPi you can use a VNC viewer, such as SSVNC (sudo apt-get install ssvnc) or xtightvncviewer (sudo apt-get install xtightvncviewer) to connect to your Android VNC server and take control of your Android desktop. This does require you to have access to the RPi - so it doesn't work like a typical "cast" solution.

If casting is what you want - I'd just fork out the extra $35 and get a Chromecast - I'm using one regularly plugged in to a projector during classes - my Android tablet just does a Screencast from the Settings menu and performance is fantastic. There are "casting" solutions for the RPi (check out PiCAST or the suggestions in this thread on raspberrypi.org) but they typically only do remote invocation of content such as YouTube videos and the like. No screen mirroring.

You might want to look into writing a clever script on the RPi which you can call from a webpage, which in turn launches a VNC viewer on the RPi using the VNC server IP of your Android. That way you can just visit the webpage on your Android and have the Android screen "magically" appear on your TV via the RPi. When I say "clever", I mean that you could make the webpage use the IP address of the Android visiting the page as the address of the VNC server. That way your webpage would just have 1 big button saying "Cast my screen" and once pressed, the webpage initiates a VNC viewing session to the IP of the connected Android device.

  • Casting is exactly what I want but paying extra 35$ is absolutely what I don't :) – Suncatcher Oct 26 '15 at 14:07
  • You might want to look into writing a clever script on the RPi which you can call from a webpage, which in turn launches a VNC viewer on the RPi using the VNC server IP of your Android. That way you can just visit the webpage on your Android and have the Android screen "magically" appear on your TV via the RPi. – Phil B. Oct 26 '15 at 14:18
  • Added more details on how to do this webpage as simple as possible. – Phil B. Oct 26 '15 at 16:11
  • It's all wonderful, but I am bothering if Wi-Fi bandwidth will be sufficient for smooth VNC connection? Also high battery drain is a shortcoming. Is there any way to connect phone to RPi via wired connection? Maybe USB or GPIO connector? – Suncatcher Oct 27 '15 at 8:36
  • If you have further questions like the ones in your comment, you should add them to your question so others can answer as well. And if they are radically different than the original question, perhaps open a new question. – Phil B. Oct 27 '15 at 11:53
0

The MiracleCast project can turn a Raspberry Pi into a Miracast reciever or transmitter. See here for a success story on a Raspberry Pi.

https://www.github.com/albfan/miraclecast

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.