How to Tether Your Raspberry Pi with your iPhone 5

If you have been reading my blog lately you know that I have done a lot of projects involving Raspberry Pi‘s, the $35 dollar credit card sized Linux computer. Because of its small size, I recently started of thinking of projects that would allow me to be mobile with the Pi.

That led me to this post.

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 optimized for the Raspberry Pi hardware) and a few scripts.


Make sure your iPhone is disconnected and proceed to install the following iPhone and file system utilities. Open up a terminal or SSH into your Pi and run the following commands:

sudo apt-get install gvfs ipheth-utils
sudo apt-get install libimobiledevice-utils gvfs-backends gvfs-bin gvfs-fuse

After these are installed, and with your iPhone still not plugged in, lets take a look at our available interfaces. Run the following commands:

ifconfig -s

If you have a standard installation, you should see two interfaces, eth0 and lo.

tether iphone 5 raspberry pi

The reason we did this step was to make sure we correctly identified the name of the iPhone’s network interface. Now that you have this list you can turn on your iPhone’s Personal Hotspot and then plug it into your Raspberry Pi’s USB port, and issue the same command.

ifconfig -s

iphone raspberry pi

Your Pi should now recognize your iPhone is plugged in and assign its network interface a name, usually eth1. Now we need to edit our interfaces file to allow for hotswapping and dchp.

Unplug your iPhone and then open up your network interfaces file

sudo nano /etc/network/interfaces

and add the following lines, where eth1 is the name identified above.

allow-hotplug eth1
iface eth1 inet dhcp

Save and close the interfaces file.

Graphical Interface

If you are using the graphical interface, you are now done and the above commands were all that were necessary to use your iPhone as an Internet connection!

You can test this by starting your desktop environment


Then unplug your Ethernet connection, start your Personal Hotspot, and plug in your iPhone. A popup message saying a “Removable medium is inserted” , that is safe to close. Then open a terminal, and run the following command:


You should be connected to the Internet!

Command Line

In my testing, tethering with command line only will only work when the iPhone is mounted. To do this, we need the ifuse package:

sudo aptitude install ifuse

and create a mount directory for the iPhone

sudo mkdir /media/iPhone

Now we can disconnect the ethernet of the Pi, turn on the iPhone’s Hotspot , and plug in then mount the iPhone.

sudo ifuse /media/iPhone

The Internet should now be tethered from your iPhone. Remember, while using command prompt only, the iPhone must manually be mounted each time it is plugged in using the ifuse command.

Putting It All Together

Now that we know how to tether the phone in the graphical interface, and the command line interface, we can add a script(thanks to users djpod and benebeck on the forums) that will automatically mount the iPhone it is plugged in.

To automate the process, I put the following script named iphoneconnect in /lib/udev/:

sudo nano /lib/udev/iphoneconnect

umount /media/iPhone #when the iPhone is unplugged, it is not automatically unmounted.
ifuse /media/iPhone

Remember to make the script executable

sudo chmod 755 /lib/udev/iphoneconnect

The final step is to edit the file ’90-iphone-tether.rules’ in the ‘/lib/udev/rules.d’ directory.

sudo nano /lib/udev/rules.d/90-iphone-tether.rules

This is the script that runs automatically when ever we plug in the iPhone, and we want to edit it to call the script we created (/lib/udev/iphoneconnect) instead of what it currently calls (/lib/udev/ipheth_pair). To do this, we just edit the 5th line of the file replacing ipheth_pair with iphoneconnect.

The file should look like this

# udev rules for setting correct configuration and pairing on tethered iPhones
ATTR{idVendor}!="05ac", GOTO="ipheth_rules_end"

# Execute pairing program when appropriate
ACTION=="add", SUBSYSTEM=="net", ENV{ID_USB_DRIVER}=="ipheth", SYMLINK+="iphone", RUN+="iphoneconnect"


Thats it! Your Raspberry Pi will now automatically Tether your iPhone without Graphical Interface and without Command line!




iPhone Tethered Raspberry Pi


My command line speed tests averaged at about 1.5mb/s download over Verizon LTE neat Boston, MA.

wget --output-document=/dev/null


  1. Scott Barbour

    Hey Dave,

    Your post here is very timely! I’d really appreciate it if you could shoot me a quick email. I’d like to get your opinion on a project I have in mind related to tethering with RBP. Thanks in advance.

  2. Hello Dave,
    Brilliant post! I have a question however, there are Bluetooth 3.0 High Speed & Wi-Fi Combo USB Mini adapters. Could you do the above (with any smartphone) wirelessly? I am building up the courage to buy my RasPi. I say courage because I would like to be able to use it anywhere I go, so an internet connection is essential.
    Your thoughts?

    • dconroy

      Given the number of ways I’ve found to be able to get these online, I don’t think it’ll be a problem.

      Ive gotten them to work with wifi, bluetooth, ethernet, as an access point, with or without dhcp, 3g, and am very close to get 4g working.

      Good luck and shoot me an email if you have any questions getting started.

      • Hello, I am now worked on a project using pi to receive data from the gpio, I would like to know how can I connect the pi with iPhone via wifi so the data can stream out to the server or else.

        Thanks for your tuto… just found it works on my iPhone 5s.

  3. Does this have to be an iPhone 5 or will other models work too ?

    • dconroy

      I believe its any iPhone with Personal Hotspot capabilities.

    • OK I answered my own question by being patient and waiting to try it tonight…tethered perfectly good job!

      Next question – how do I find the IP to SSH/VNC into it? I have a script that auto runs on bootup to email me with the IP but it didn’t run when hooked upto the iPhone, I am guessing it doesn’t get the IP quickly enough todo it. Have no idea how tethering works, never needed todo it on my laptop so all info appreciated!



      • Nathan

        You should be able to call your script from the iphoneconnect script above.

  4. Looks like a great project. Would I there after be able to to Rasbmc using the tethering or would I need to do something else?

    • dconroy

      I haven’t tested it but I dont see why you couldnt using Rasbmc with this type of tethering.


  5. Is there a way to do this with a iPod?

    • dconroy

      Don’t think so, unless it has a wifi connection? Then perhaps

      • It is connected to wifi, do you think it will be worth the time to try it?

        • It doesn’t work, I just tried

          • dconroy

            Oh ok, Cody – thanks for giving it a shot! How far along did it get?

          • The pi wouldn’t recognize it like it did with the iPhone, and Unfortunately the iPod will not give off its own wifi signal even if it is connected to wifi :/

  6. Did iOS 7 break this? I have an iPhone 5 with iOS 7.0.2 and when i connect the iPhone to the Pi i get “Do you want to trust this computer with your data?” on my phone and a popup with “the device ‘Trevor’s iPhone’ is locked. Enter the passcode on the device and try again. When i hit Trust on the iPhone the popups come right back. Please help! Thanks for the work on the guide.

    • I’m in the exact same boat.. not only did iOS 7 prevent the above operation, it took away wifi completely on my iPhone 4S.
      Dave Conroy, if your somewhere out there with iOS 7… please do your magic.

      • I’m getting the Trust issue too, IOS7 here.

        Is there a workaround?


      • Yes please Dave, same problem here. I checked out there is an updated libimobiledevice-utils which solves the problem but it doesn’t appear to be compiled for Pi yet. If I manage to figure out how to compile i’ll post back.

        • Yep same boat. IOS7 does not work. Please fix it if you can.

          • I added the raspberry jessie repo and installed 1.1.5-2 version of libimobiledevice-utils but still run in the same issues with IOS 7.0. Anyone successful yet???

          • Same here – stock and now jailbroken (evasion) on 7.0.4, and no dice. Tried MyWi as well as PDANet, and still getting pop-up.

    • I have the same problem of trust popup with IOS 7.0.4 Any help you can offer will be highly appreciated.

  7. Brent

    Hi Dave. Thanks for the post.

    I have followed the steps up to updating the interfaces file.

    When connecting the iPhone (5s with ios7) a message on the iPhone pops up with a Trust/Don’t Trust. After clicking Trust, a message pops up in Raspian, “DBus error org.freedesktop.DBus.Error.NoReply”.

    Do you know how to continue past this?

    • Brent

      Hi Dave,

      Just waned to say that I got iPhone 5 (iOS 7) teather working by following the instructions in the following gist:

      After following along to the instructions in the link, I then finished up by doing the steps in your `Putting It All Together` section. Tethering now works seamlessly.

      Kind regards,

  8. andrew

    Great tutorial! I’ve run into an odd wall that I can’t seem to find any help with: On a fresh install, I can get ifuse to mount manually via the script or at boot, but not hotplugging my device. I *think* it might be a permission issue with udev? or am I missing something? Thanks for any suggestions!

  9. Very cool idea.I am very new to raspberry pi and I am not sure to follow the above mentioned for a smart phone.Can you please help me.

  10. Anurag Joshi

    Hi,i am making an android app, which will help blind people. So, one of my friend is blind and uptill now i succeded producing static results, i.e if any obstacle comes in between the phone will vibrate.
    However, the problem arises here is, how should i detect real time objects which can be a obstacle for an blind person like car, dog or any human.

    Following is my requirements:
    1) How to connect Rasberry Pi to an IR sensor ?
    2) How to read the data from Rasberry Pi on Android?

    I am doing my final year M.Tech project in CS department, so this sensor stuff is bit confusing for me.
    Hoping to get positive response.

  11. IT worked, thank you.

  12. I enjoy what you guys are usually up too. This type of clever work and exposure!
    Keep up the fantastic works guys I’ve included you guys to

  13. Michael

    Hi Dave, great article. I had a project in mind, and I wanted to get your opinion and a bit of help/insight into it. Could you shoot me an email? Thanks so much

  14. Alessandro Ferri

    Dear Dave Conroy,
    some time ago I installed Bluez 5.23, following this procedure: … &start=100

    Everything works perfectly. But now I want to connect my raspberry to ‘personal hotspot of my iPad or iPhone, using Bluetooth to access the Internet.
    I tried to find something on the web, but nothing worked, primarily because the version I installed is 5.23.

    Can you help me solve the problem.
    Thank you in advance.

  15. Alessandro Ferri

    Hi Conroy,
    after I have read your blog, I try to connect my raspberry with my iPad in Personal Hotspot created by the iPad. My raspberry connects to the iPad, and in my iPad I see a user logged on, but if I ping google (ping, my raspberry is not connected to the internet. Unlike with my mac mini, I’m connected to the internet and I can navigate. I’m forgetting something? You can help me?

  16. This method does not seem to work for Raspbian Jessie.

    ifconfig -s does not show the iPhone eth1 although lsusb lists the iPhone. Is there anything else I can try?

    • I’ve solved this.

      I had to:

      sudo apt-get install usbmuxd
      sudo apt-get install libusbmuxd-tools

      and it began to work!

  17. ist this tutorial still working on 2015-05-05-raspbian-wheezy? i even loose the ethernet connection after following this tutorial on a more or less fresh installed rpi a+.

    or could this installation get into conflickt with avahi (

    thanks for any help (looking for a simple way to use iphone tethering for a command line rpi.

  18. TheRedStormer

    My phone would not show up at all/: what should I do?


  1. Ditch Your Cable Modem/ISP With a Tethered iPhone and Raspberry Pi | - [...] month, I wrote a blog post about tethering your iPhone to your Raspberry Pi. I got a lot of…
  2. Tether Your Raspberry Pi to Your Smartphone | The Cannabis Strain Directory Blog - [...] How to Tether Your Raspberry Pi with Your iPhone 5 | Dave Conroy [...]
  3. bring-your-Own WiFi « Daan Olieroock - [...] plane ride home. A Pi can act as WiFi amplifier, virtual private network, portable media center or tethered to…
  4. Tether Your Raspberry Pi To Your Smartphone | Lifehacker Australia - [...] How to Tether Your Raspberry Pi with Your iPhone 5 [Dave Conroy] [...]
  5. Tether Your Raspberry Pi to Your Smartphone « Music RSS - [...] How to Tether Your Raspberry Pi with Your iPhone 5 | Dave Conroy [...]
  6. Headless tethering between Raspberry Pi and iPhone - [...] necessarily have a target application. But there’s a lot of potential. It’s a headless setup for tethering your Raspberry…
  7. rndm(mod) » Headless tethering between Raspberry Pi and iPhone - [...] necessarily have a target application. But there’s a lot of potential. It’s a headless setup for tethering your Raspberry…
  8. Headless tethering between Raspberry Pi and iPhone - RaspberryPiBoards - [...] necessarily have a target application. But there’s a lot of potential. It’s a headless setup for tethering your Raspberry…
  9. Headless tethering between Raspberry Pi and iPhone | Daily IT News on IT BlogIT Blog - [...] necessarily have a target application. But there’s a lot of potential. It’s a headless setup for tethering your Raspberry…
  10. Headless tethering between Raspberry Pi and iPhone | Blog of MPRosa - [...] necessarily have a target application. But there’s a lot of potential. It’s a headless setup for tethering your Raspberry…
  11. Tethering sin cabeza entre Raspberry Pi y iPhone - | Indagadores |Seguridad informatica |Seguridad en internet - [...] truco no tiene necesariamente una aplicaciĆ³n de destino. Pero hay un gran potencial. Es un instalaciĆ³n sin cabeza…
  12. Headless tethering between Raspberry Pi and iPhone | Make, Electronics projects, electronic Circuits, DIY projects, Microcontroller Projects - - [...] necessarily enjoy a ambition use. Only there’s a multiple of possibility. It’s a headless setup for tethering your Raspberry…
  13. How to Tether Your Raspberry Pi with your iPhone 5 @Raspberry_Pi #piday #raspberrypi « adafruit industries blog - [...] Dave Conroy writes: [...]
  14. Anchored: #3 » Michael Leonard - [...] [Link] This walkthrough from Dave shows how you can mount your iPhone on Raspberry Pi even if you don’t…

Leave a Reply

Your email address will not be published. Required fields are marked *