WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Howto: Internet tethering with iPhone using usb cable  (Read 5390 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Howto: Internet tethering with iPhone using usb cable
« on: February 14, 2018, 03:04:19 AM »
Just so I don't forget how it's done  :P

Using corepure64

* connect to wifi (or disable wifi to use 3g/4g) on iphone
* enable personal hotspot on iphone
* connect iphone to laptop with usb cable

Then:
Code: [Select]
$ tce-load -i usbmuxd
$ sudo modprobe ipheth
[reply "OK" to trust message on iphone]

$ dmesg
...
usb 2-6: new high-speed USB device number 4 using xhci_hcd
usbcore: registered new interface driver ipheth
ipheth 2-6:4.2: Apple iPhone USB Ethernet device attached

make software connection between iphone and laptop:
Code: [Select]
$ sudo usbmuxd

$ sudo idevicepair pair
SUCCESS: Paired with device 68adde1bf526b8cb76316c18dc2529d68e35c384

bring up the network interface:
Code: [Select]
$ sudo ifconfig eth1 up
[blue bar appears at top of iphone screen]

$ sudo /sbin/udhcpc -b -i eth1 -x hostname:boxdell -p /var/run/udhcpc.eth1.pid

$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 56:E4:3A:22:48:E8 
          inet addr:172.20.10.4  Bcast:172.20.10.15  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:9 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3516 (3.4 KiB)  TX bytes:1405 (1.3 KiB)
« Last Edit: February 14, 2018, 05:22:04 AM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Howto: Internet tethering with iPhone using usb cable
« Reply #1 on: February 14, 2018, 03:49:06 AM »
Out of interest, to see how easy it would be to use the iphone 4g connection, I used gnome-session in corepure64, i.e.
Code: [Select]
$ tce-load -i graphics-KERNEL gnome-session usbmuxd xdg-user-dirs
$ xdg-user-dirs-update
$ sudo /usr/local/etc/init.d/dbus start
$ sudo /usr/local/etc/init.d/networkmanager start
$ startx

After disabling the iphone wifi, enabling the personal hotspot and connecting the usb cable, I got the trust message and, after answering "OK", things connected automagically  without the need for any further commands 8)

I'm far from being a fan of gnome bloat, but that was reasonably impressive..