Date: Fri, 17 Apr 2020 12:00:22 +0200 From: Daniel Morandini <danielmorandini@me.com> To: freebsd-net@freebsd.org Subject: ipheth device and iPhone tetheting Message-ID: <A2DB0B17-C241-4886-8857-A012450CF864@me.com>
next in thread | raw e-mail | index | archive | help
Hi folks, Obtaining an Internet access from an iOS device connected via USB is = currently quite a pain. The flow is supposed to be something like: 1. load the ipheth module 2. plug in the iOS device with tethering enabled 3. a new ueN interface is created 4. dhclient ueN and you should have a new gateway. At least this is what I expect, which = is similar to what happens when connecting an Android device with = tethering enabled, the only difference being you have to use the urndis = module. After step 3 instead the ipheth module is not capable of creating the = interface, and you have to actually configure the device manually as = explained in the ipheth(4) BUG note, using `usbconfig -d <unit>.<addr> 2 = set_config 3`. This triggers an authentication request on the iPhone, and after that = the interface is eventually created, but the dhclient is not able to = obtain a lease with it, "No DHCPOFFERS received=E2=80=9D. Digging around the web you=E2=80=99ll eventually find this guide [1] = which, even though it is quite old (10 yrs now), points to the right = direction: usbmuxd and libimobiledevice. The usbmuxd is available as a port now, under comms/usbmuxd (not = maintained though). Install, run the daemon, plug the phone again and = you=E2=80=99ll get your interface. This time dhclient is able to obtain = a lease, but you=E2=80=99ll not get internet out of that (at least, = I=E2=80=99m not): ``` # ifconfig lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> ue0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 options=3D80009<RXCSUM,VLAN_MTU,LINKSTATE> ether b8:27:eb:ed:a1:c9 media: Ethernet autoselect (none) status: no carrier nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> ue1: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 ether 7e:a1:ae:6a:11:1d inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> ``` ``` # netstat -rn Routing tables Internet: Destination Gateway Flags Netif Expire 0.0.0.0/8 link#3 U ue1 127.0.0.1 link#1 UH lo0 Internet6: Destination Gateway Flags = Netif Expire ::/96 ::1 UGRS = lo0 ::1 link#1 UH = lo0 ::ffff:0.0.0.0/96 ::1 UGRS = lo0 fe80::/10 ::1 UGRS = lo0 fe80::%lo0/64 link#1 U = lo0 fe80::1%lo0 link#1 UHS = lo0 ff02::/16 ::1 UGRS = lo0 ``` ``` # uname -a FreeBSD generic 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC arm ``` Long story short: do we want to work on this issue? I=E2=80=99m = available for helping, but I need some guidance. Greetings, Daniel [1] = https://forums.freebsd.org/threads/howto-iphone-internet-connection-sharin= g-via-usb.19995/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A2DB0B17-C241-4886-8857-A012450CF864>