The Raspberry Pi is a powerful device, but many of its benefits rely on being connected to the internet. If you want to take your Pi with you on the go, try this method of tethering it to your smartphone to get it online.
Photo by Clive Darra
Dave Conroy sent this over to us. While his instructions involve tethering a Pi to an iPhone 5, you can adapt his method to just about any smartphone, including your Android device — you just need to use the tethering or personal hotspot app of your choice instead of the iPhone’s built-in Personal Hotspot app, which Dave uses in his tutorial. He explains:
There are plenty of resources online about tethering the iPhone 5 with the graphical interface, but I wanted to be able ‘hotswap’ my Raspberry Pi’s Internet connection without command line, and without the graphical interface. Plug and play, essentially.
I was able to get this working last night using Raspian (a free operating system based on Debian optimised for the Raspberry Pi hardware) and a few scripts.
As he mentions, you’ll need Raspian on your Pi for the method he outlines to work. While the commands he specifies aren’t iPhone specific, the output he gives you is, so things may look a little different if you’re using an Android device or another mobile hotspot instead of an iPhone.
Once you’re done, your Pi should automatically mount and connect to your mobile device when you plug it in, without you having to fiddle around in the command line — which means you can fire up a Pi running a specific server app, such as a media streamer, and not have to configure the network interfaces every time.
Hit the link below to see all of the commands from start to finish, and the full step-by-step to get it all working.
How to Tether Your Raspberry Pi with Your iPhone 5 [Dave Conroy]