xref: /freebsd/share/man/man4/ipheth.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
159d9081fSGavin Atkinson.\" Copyright (c) 2014 Gavin Atkinson
259d9081fSGavin Atkinson.\" All rights reserved.
359d9081fSGavin Atkinson.\"
459d9081fSGavin Atkinson.\" Redistribution and use in source and binary forms, with or without
559d9081fSGavin Atkinson.\" modification, are permitted provided that the following conditions
659d9081fSGavin Atkinson.\" are met:
759d9081fSGavin Atkinson.\"
859d9081fSGavin Atkinson.\"    - Redistributions of source code must retain the above copyright
959d9081fSGavin Atkinson.\"      notice, this list of conditions and the following disclaimer.
1059d9081fSGavin Atkinson.\"    - Redistributions in binary form must reproduce the above
1159d9081fSGavin Atkinson.\"      copyright notice, this list of conditions and the following
1259d9081fSGavin Atkinson.\"      disclaimer in the documentation and/or other materials provided
1359d9081fSGavin Atkinson.\"      with the distribution.
1459d9081fSGavin Atkinson.\"
1559d9081fSGavin Atkinson.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1659d9081fSGavin Atkinson.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1759d9081fSGavin Atkinson.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
1859d9081fSGavin Atkinson.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1959d9081fSGavin Atkinson.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2059d9081fSGavin Atkinson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2159d9081fSGavin Atkinson.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2259d9081fSGavin Atkinson.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2359d9081fSGavin Atkinson.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2459d9081fSGavin Atkinson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2559d9081fSGavin Atkinson.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2659d9081fSGavin Atkinson.\" POSSIBILITY OF SUCH DAMAGE.
2759d9081fSGavin Atkinson.\"
28d0b92c06SMateusz Piotrowski.Dd January 29, 2022
2959d9081fSGavin Atkinson.Dt IPHETH 4
3059d9081fSGavin Atkinson.Os
3159d9081fSGavin Atkinson.Sh NAME
3259d9081fSGavin Atkinson.Nm ipheth
33a47bbf3fSGavin Atkinson.Nd "USB Apple iPhone/iPad tethered Ethernet driver"
3459d9081fSGavin Atkinson.Sh SYNOPSIS
3559d9081fSGavin AtkinsonTo load the driver as a module at boot time, place the
3659d9081fSGavin Atkinsonfollowing line in
3759d9081fSGavin Atkinson.Xr loader.conf 5 :
3859d9081fSGavin Atkinson.Bd -literal -offset indent
3959d9081fSGavin Atkinsonif_ipheth_load="YES"
4059d9081fSGavin Atkinson.Ed
4159d9081fSGavin Atkinson.Pp
4259d9081fSGavin AtkinsonAlternatively, to compile this driver into the kernel, place the
4359d9081fSGavin Atkinsonfollowing lines in your kernel configuration file:
4459d9081fSGavin Atkinson.Bd -ragged -offset indent
4559d9081fSGavin Atkinson.Cd "device uhci"
4659d9081fSGavin Atkinson.Cd "device ohci"
4759d9081fSGavin Atkinson.Cd "device usb"
48ff6b30b9SKevin Lo.Cd "device miibus"
49ff6b30b9SKevin Lo.Cd "device uether"
5059d9081fSGavin Atkinson.Cd "device ipheth"
5159d9081fSGavin Atkinson.Ed
5259d9081fSGavin Atkinson.Sh DESCRIPTION
5359d9081fSGavin AtkinsonThe
5459d9081fSGavin Atkinson.Nm
5559d9081fSGavin Atkinsondriver provides support for network access through Apple
5659d9081fSGavin AtkinsoniPhone and iPad devices, often referred to as USB tethering.
5759d9081fSGavin Atkinson.Pp
5859d9081fSGavin Atkinson.Nm
5959d9081fSGavin Atkinsonshould work with any Apple iPhone or iPad device.
6059d9081fSGavin AtkinsonIn most cases this must be explicitly enabled on the device first.
6159d9081fSGavin Atkinson.Pp
6259d9081fSGavin AtkinsonFor more information on configuring this device, see
6359d9081fSGavin Atkinson.Xr ifconfig 8 .
64a47bbf3fSGavin AtkinsonThe device does not support different media types or options.
6559d9081fSGavin Atkinson.Sh HARDWARE
6659d9081fSGavin AtkinsonThe following devices are supported by the
6759d9081fSGavin Atkinson.Nm
6859d9081fSGavin Atkinsondriver:
6959d9081fSGavin Atkinson.Pp
7059d9081fSGavin Atkinson.Bl -bullet -compact
7159d9081fSGavin Atkinson.It
72a47bbf3fSGavin AtkinsonApple iPhone tethering (all models)
7359d9081fSGavin Atkinson.It
74a47bbf3fSGavin AtkinsonApple iPad tethering (all models)
7559d9081fSGavin Atkinson.El
767005cea3SMateusz Piotrowski.Sh EXAMPLES
777005cea3SMateusz Piotrowski.Bl -tag -width 0n
787005cea3SMateusz Piotrowski.It Sy Example 1\&: No Manual Configuration
797005cea3SMateusz Piotrowski.Pp
807005cea3SMateusz PiotrowskiThe following example shows how to manually configure network access on a
817005cea3SMateusz Piotrowskidevice that is not automatically recognized.
827005cea3SMateusz Piotrowski.Pp
837005cea3SMateusz PiotrowskiFirst, load the driver and find out the unit and the address of the USB
847005cea3SMateusz PiotrowskiApple
857005cea3SMateusz Piotrowskidevice:
867005cea3SMateusz Piotrowski.Bd -literal -offset 2n
877005cea3SMateusz Piotrowski.Li # Ic kldload ipheth
887005cea3SMateusz Piotrowski.Li # Ic usbconfig | grep Apple
897005cea3SMateusz Piotrowskiugen0.2: <Apple Inc. iPhone> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
907005cea3SMateusz Piotrowski.Ed
917005cea3SMateusz Piotrowski.Pp
927005cea3SMateusz PiotrowskiIn this example, the unit and the address of the device is 0.2
937005cea3SMateusz Piotrowski.Pq Dq Li ugen0.2 ,
947005cea3SMateusz Piotrowskiand its configuration index is 0
957005cea3SMateusz Piotrowski.Pq Dq Li cfg=0 .
967005cea3SMateusz Piotrowski.Pp
977005cea3SMateusz PiotrowskiSecondly, check what other configurations are available for the device:
987005cea3SMateusz Piotrowski.Bd -literal -offset 2n
99*60401b38SMateusz Piotrowski.Li # Ic usbconfig -d 0.2 dump_all_config_desc | grep -E '(^ Conf|iConf)'
1007005cea3SMateusz Piotrowski Configuration index 0
1017005cea3SMateusz Piotrowski    iConfiguration = 0x0005  <PTP>
1027005cea3SMateusz Piotrowski Configuration index 1
1037005cea3SMateusz Piotrowski    iConfiguration = 0x0006  <iPod USB Interface>
1047005cea3SMateusz Piotrowski Configuration index 2
1057005cea3SMateusz Piotrowski    iConfiguration = 0x0007  <PTP + Apple Mobile Device>
1067005cea3SMateusz Piotrowski Configuration index 3
1077005cea3SMateusz Piotrowski    iConfiguration = 0x0008  <PTP + Apple Mobile Device + Apple USB Ethernet>
1087005cea3SMateusz Piotrowski.Ed
1097005cea3SMateusz Piotrowski.Pp
1107005cea3SMateusz PiotrowskiIn this example, there are 4 different configurations available.
1117005cea3SMateusz PiotrowskiThe configuration with index 3 seems to be related to Ethernet.
1127005cea3SMateusz PiotrowskiIt is time to configure the device:
1137005cea3SMateusz Piotrowski.Bd -literal -offset 2n
114d0b92c06SMateusz Piotrowski.Li # Ic usbconfig -d 0.2 set_config 3
1157005cea3SMateusz Piotrowski.Li # Ic usbconfig | grep 'Apple.*cfg=3'
1167005cea3SMateusz Piotrowskiugen0.2: <Apple Inc. iPhone> at usbus0, cfg=3 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
1177005cea3SMateusz Piotrowski.Ed
1187005cea3SMateusz Piotrowski.Pp
1197005cea3SMateusz PiotrowskiAt this point the Apple device should ask whether the
1207005cea3SMateusz Piotrowski.Fx
1217005cea3SMateusz Piotrowskimachine can be trusted
1227005cea3SMateusz Piotrowski.Po Dq Mobile Data
1237005cea3SMateusz Piotrowskihas to be on
1247005cea3SMateusz Piotrowski.Pc .
1257005cea3SMateusz Piotrowski.Pp
1267005cea3SMateusz PiotrowskiA new
1277005cea3SMateusz Piotrowski.Em ue
1287005cea3SMateusz PiotrowskiUSB Ethernet interface should become available:
1297005cea3SMateusz Piotrowski.Bd -literal -offset 2n
1307005cea3SMateusz Piotrowski.Li # Ic dmesg | grep 'ue[0-9]'
1317005cea3SMateusz Piotrowskiue0: <USB Ethernet> on ipheth0
1327005cea3SMateusz Piotrowskiue0: bpf attached
1337005cea3SMateusz Piotrowskiue0: Ethernet address: 4e:7c:5f:2c:5f:7a
1347005cea3SMateusz Piotrowski.Ed
1357005cea3SMateusz Piotrowski.Pp
1367005cea3SMateusz PiotrowskiAt this point it might be necessary to run
1377005cea3SMateusz Piotrowski.Xr usbmuxd 1
1387005cea3SMateusz Piotrowski.Po available in
1397005cea3SMateusz Piotrowski.Xr ports 7
1407005cea3SMateusz Piotrowskiat
1417005cea3SMateusz Piotrowski.Pa comms/usbmuxd
1427005cea3SMateusz Piotrowski.Pc :
1437005cea3SMateusz Piotrowski.Bd -literal -offset 2n
1447005cea3SMateusz Piotrowski.Li # Ic usbmuxd --enable-exit --foreground --user root --verbose
1457005cea3SMateusz Piotrowski.Ed
1467005cea3SMateusz Piotrowski.Pp
1477005cea3SMateusz PiotrowskiNow it is time to configure the network interface:
1487005cea3SMateusz Piotrowski.Bd -literal -offset 2n
1497005cea3SMateusz Piotrowski.Li # Ic sysrc ifconfig_ue0="SYNCDHCP"
1507005cea3SMateusz Piotrowskiifconfig_ue0:  -> SYNCDHCP
1517005cea3SMateusz Piotrowski.Li # Ic service netif restart ue0
1527005cea3SMateusz Piotrowski.Ed
1537005cea3SMateusz Piotrowski.Pp
1547005cea3SMateusz PiotrowskiThat is it.
1557005cea3SMateusz PiotrowskiThe machine should now be connected to the network via USB tethering.
1567005cea3SMateusz Piotrowski.El
15759d9081fSGavin Atkinson.Sh SEE ALSO
15859d9081fSGavin Atkinson.Xr arp 4 ,
15959d9081fSGavin Atkinson.Xr cdce 4 ,
16063722e52SEdward Tomasz Napierala.Xr cdceem 4 ,
16159d9081fSGavin Atkinson.Xr intro 4 ,
16259d9081fSGavin Atkinson.Xr netintro 4 ,
16359d9081fSGavin Atkinson.Xr urndis 4 ,
16459d9081fSGavin Atkinson.Xr usb 4 ,
1650b3504fdSChristian Brueffer.Xr ifconfig 8 ,
166a47bbf3fSGavin Atkinson.Xr usbconfig 8
16759d9081fSGavin Atkinson.Sh HISTORY
16859d9081fSGavin AtkinsonThe
16959d9081fSGavin Atkinson.Nm
17059d9081fSGavin Atkinsondevice driver first appeared in
17159d9081fSGavin Atkinson.Fx 8.2 .
17259d9081fSGavin Atkinson.Sh AUTHORS
17359d9081fSGavin Atkinson.An -nosplit
17459d9081fSGavin AtkinsonThe
17559d9081fSGavin Atkinson.Nm
17659d9081fSGavin Atkinsondriver was written by
17759d9081fSGavin Atkinson.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org .
178a47bbf3fSGavin Atkinson.Sh BUGS
1797005cea3SMateusz PiotrowskiSome devices are not recognized automatically and may need to be manually
1807005cea3SMateusz Piotrowskiconfigured to use an alternative configuration with the
181a47bbf3fSGavin Atkinson.Xr usbconfig 8
182a47bbf3fSGavin Atkinsonutility.
1837005cea3SMateusz PiotrowskiSee
1847005cea3SMateusz Piotrowski.Sx EXAMPLES
1857005cea3SMateusz Piotrowskifor workarounds.
186