Imagine you’re sitting in a coffee shop, and you suddenly feel the need to do some coding. Your iPad has some decent code editors, but you’d like to execute what you wrote. How about connecting a Raspberry Pi and running it there?
The above is my new fave home-away setup:
- 11″ iPad Pro
- Brydge keyboard
- Magic Mouse
- Raspberry Pi 4 / 4Gig
What makes this work is that the Pi is both powered and gets a network connection over the USB-C port. To enable that, all you have to do on recent versions of Raspian is:
- Add
dtoverlay=dwc2
to /boot/config.txt - Add
modules-load=dwc2,g_ether
to /boot/cmdline.txt - Reboot
Assuming you’ve got SSH on your RPi, at this point you should be able to connect it directly to the iPad with a USB-C to USB-C cable, then use your favourite iOS SSH client to do the equivalent of ssh pi@hostname-of-pi.local
, with “hostname-of-pi” being whatever you chose (“raspberrypi” by default). Usually, I use Remoter VNC for SSH but that’s mostly because I’ve owned the full version of it forever.
If you’re astute, you’ll have noticed that it’s not ssh running on the screen above. 🙂 There are many ways to get an actual GUI desktop attached to the RPi, but the one I’ve found works the best for me is (believe it or not) using Windows Remote Desktop. To enable this, on the RPi, you can sudo apt-get install xrdp
, and on the iPad install Microsoft Remote Desktop or whatever RDP client you like best. When you create the connection, use hostname-of-pi.local just like you would have for SSH.
There are a couple of downsides to this setup.
- The microsoft remote desktop client, at least, is tuned for using a finger on the screen, rather than a mouse. In fact, support for mice on iPad OS is still in its infancy, though I expect it will improve over time.
- The RPi is being powered from the iPad, so you can expect the battery life to be reduced — it’s not impossibly bad, but it’s visible. (Btw, if anyone knows of a good USB-C hub that will power multiple devices with a data passthrough, let me know.)
Anyway, if you’re looking to try this, there are lots of good tutorials out there on YouTube and elsewhere, by people who have invested more effort than me. Regardless, I’m happy to try and help if you get stuck, so leave a comment.
Note I tried this USB-C hub…
https://juicedsystems.com/products/vertexhub-usb-c-hub-data-and-charging-hub-usb-3-1-gen2
… but found that it will *either* power both devices (if you plug them into the USB-C connectors on the top), *or* it will pass data through, if you plug the iPad into the USB-C connector on the side, but in neither configuration will it do both.
Good news, everyone! It’s easier than I thought. It turns out any USB connection to the iPad will work, as long as it can provide enough power to drive the Pi. In fact, the Apple HDMI adapter, which I happened to already have more than one of ;-), works fine.
https://www.apple.com/shop/product/MUF82AM/A/usb-c-digital-av-multiport-adapter