Raspberry Pi on iPad

27May12

My second Raspberry Pi came at the end of last week[1], so now I have one to tinker with in addition to the first that I’m using as a media player.

It turns out that it’s not just SD cards that the raspi is fussy about, I had a real struggle getting either of my spare monitors to work with it. In the end I somehow found the combination of HDMI-DVI adaptor and cable that had worked last week and things sprung to life.

SSH

Getting a monitor to work wouldn’t be necessary if SSH was enabled by default, which sadly it isn’t.

You can start SSH from the command line with:

sudo /etc/init.d/ssh start

Alternatively you can set it to autostart by renaming one of the files in the boot partition:

sudo mv /boot/boot_enable_ssh.rc /boot/boot.rc

Once SSH is sorted out you can use your favourite client (mine is PuTTY) to connect to the raspi. I also configured key based login, but that’s a different howto[2].

VNC

The purist in me was going to just use an X server (probably Cygwin) to connect to the raspi, but VNC is easier to get going.

To install the VNC server on the raspi:

sudo apt-get install tightvncserver

Once that’s installed start it with:

vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565

I’ve set the resolution here to be the same as the iPad.

At this stage it might make sense to test things with a VNC client from a Windows (or Mac or Linux) box. I used the client from TightVNC .

The iPad bit

There are probably a bunch of VNC clients for the iPad, but I regularly use iSSH for a variety of things, and although at £6.99 it’s one of the most expensive apps I have on my iPad I generally think it’s worth it.

iSSH can connect to VNC servers directly or through an SSH tunnel:

Hit save and then hit the raspi entry to connect, and I get something like this:

At this point things are probably easier if you have a bluetooth keyboard (and mouse).

Conclusion

With two protocols (SSH and VNC) configured it’s possible to do useful stuff with the Raspberry Pi remotely, and the iPad with iSSH makes a fine piece of glass to use it through.

Acknowledgement

With thanks to the My Raspberry Pi Experience blog for the VNC howto I adapted here. If you want more of a detailed walk through with loads of screen shots then take a look there.

[1] I ordered from both suppliers in the first couple of days as it was utterly unclear which was going to get their act together.
[2] If you do use PuTTY then it may make more sense to generate keys using PuTTYgen rather than ssh-keygen (another howto).



8 Responses to “Raspberry Pi on iPad”

  1. We have a vnc client for the iPad, maybe we could integrate a setting just for the Raspberry Pi

  2. 3 Manuel

    Thanks, just what i was looking for! nice to see its working.
    any idea if its possible to use mouse&keyboard CONNECTED TO THE PI with the ipad? Thanks,

    -M

    • Something like that should be possible if you add a bluetooth adaptor to the RPi (or bit bashed it via USB to the 30pin dock on the iPad), but I seriously doubt that it would be worth the effort.

  3. 5 Quarryman

    Hey Chris,

    Can you help me out here.

    I’ve carried out your steps above but the connection is refused when I try to connect. It’s fine via ssh so I know the connection is ok so it must be related to vnc.

    Does issh not need to know what session number it’s connecting to? :1 etc

    • iSSH doesn’t need a session number.

      Are you trying to connect to VNC directly or via an SSH tunnel (and have you tested the VNC connection using a different client such as a PC or Mac)?

      • 7 quarryman

        Thanks for the reply. I have multiple sessions so needed to distinguish between them.

        I found the solution.

        The VNC port dictates the session:

        5901 is session :1
        5902 is session :2

        Hopefully this will be of help to someone else.


  1. 1 Review – BeagleBone Black | Chris Swan's Weblog

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.