xref: /freebsd/share/man/man4/ipheth.4 (revision 4c1a82cea504df7a79f5bd8f7d0a41cacccff16e)
1.\" Copyright (c) 2014 Gavin Atkinson
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\"
8.\"    - Redistributions of source code must retain the above copyright
9.\"      notice, this list of conditions and the following disclaimer.
10.\"    - Redistributions in binary form must reproduce the above
11.\"      copyright notice, this list of conditions and the following
12.\"      disclaimer in the documentation and/or other materials provided
13.\"      with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
25.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26.\" POSSIBILITY OF SUCH DAMAGE.
27.\"
28.\" $FreeBSD$
29.\"
30.Dd May 26, 2019
31.Dt IPHETH 4
32.Os
33.Sh NAME
34.Nm ipheth
35.Nd "USB Apple iPhone/iPad tethered Ethernet driver"
36.Sh SYNOPSIS
37To load the driver as a module at boot time, place the
38following line in
39.Xr loader.conf 5 :
40.Bd -literal -offset indent
41if_ipheth_load="YES"
42.Ed
43.Pp
44Alternatively, to compile this driver into the kernel, place the
45following lines in your kernel configuration file:
46.Bd -ragged -offset indent
47.Cd "device uhci"
48.Cd "device ohci"
49.Cd "device usb"
50.Cd "device miibus"
51.Cd "device uether"
52.Cd "device ipheth"
53.Ed
54.Sh DESCRIPTION
55The
56.Nm
57driver provides support for network access through Apple
58iPhone and iPad devices, often referred to as USB tethering.
59.Pp
60.Nm
61should work with any Apple iPhone or iPad device.
62In most cases this must be explicitly enabled on the device first.
63.Pp
64For more information on configuring this device, see
65.Xr ifconfig 8 .
66The device does not support different media types or options.
67.Sh HARDWARE
68The following devices are supported by the
69.Nm
70driver:
71.Pp
72.Bl -bullet -compact
73.It
74Apple iPhone tethering (all models)
75.It
76Apple iPad tethering (all models)
77.El
78.Sh EXAMPLES
79.Bl -tag -width 0n
80.It Sy Example 1\&: No Manual Configuration
81.Pp
82The following example shows how to manually configure network access on a
83device that is not automatically recognized.
84.Pp
85First, load the driver and find out the unit and the address of the USB
86Apple
87device:
88.Bd -literal -offset 2n
89.Li # Ic kldload ipheth
90.Li # Ic usbconfig | grep Apple
91ugen0.2: <Apple Inc. iPhone> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
92.Ed
93.Pp
94In this example, the unit and the address of the device is 0.2
95.Pq Dq Li ugen0.2 ,
96and its configuration index is 0
97.Pq Dq Li cfg=0 .
98.Pp
99Secondly, check what other configurations are available for the device:
100.Bd -literal -offset 2n
101.Li # Ic usbconfig 0.2 dump_all_config_desc | awk '/^ Conf/{print} /iConf/{print}'
102 Configuration index 0
103    iConfiguration = 0x0005  <PTP>
104 Configuration index 1
105    iConfiguration = 0x0006  <iPod USB Interface>
106 Configuration index 2
107    iConfiguration = 0x0007  <PTP + Apple Mobile Device>
108 Configuration index 3
109    iConfiguration = 0x0008  <PTP + Apple Mobile Device + Apple USB Ethernet>
110.Ed
111.Pp
112In this example, there are 4 different configurations available.
113The configuration with index 3 seems to be related to Ethernet.
114It is time to configure the device:
115.Bd -literal -offset 2n
116.Li # Ic usbconfig 0.2 set_config 3
117.Li # Ic usbconfig | grep 'Apple.*cfg=3'
118ugen0.2: <Apple Inc. iPhone> at usbus0, cfg=3 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
119.Ed
120.Pp
121At this point the Apple device should ask whether the
122.Fx
123machine can be trusted
124.Po Dq Mobile Data
125has to be on
126.Pc .
127.Pp
128A new
129.Em ue
130USB Ethernet interface should become available:
131.Bd -literal -offset 2n
132.Li # Ic dmesg | grep 'ue[0-9]'
133ue0: <USB Ethernet> on ipheth0
134ue0: bpf attached
135ue0: Ethernet address: 4e:7c:5f:2c:5f:7a
136.Ed
137.Pp
138At this point it might be necessary to run
139.Xr usbmuxd 1
140.Po available in
141.Xr ports 7
142at
143.Pa comms/usbmuxd
144.Pc :
145.Bd -literal -offset 2n
146.Li # Ic usbmuxd --enable-exit --foreground --user root --verbose
147.Ed
148.Pp
149Now it is time to configure the network interface:
150.Bd -literal -offset 2n
151.Li # Ic sysrc ifconfig_ue0="SYNCDHCP"
152ifconfig_ue0:  -> SYNCDHCP
153.Li # Ic service netif restart ue0
154.Ed
155.Pp
156That is it.
157The machine should now be connected to the network via USB tethering.
158.El
159.Sh SEE ALSO
160.Xr arp 4 ,
161.Xr cdce 4 ,
162.Xr cdceem 4 ,
163.Xr intro 4 ,
164.Xr netintro 4 ,
165.Xr urndis 4 ,
166.Xr usb 4 ,
167.Xr ifconfig 8 ,
168.Xr usbconfig 8
169.Sh HISTORY
170The
171.Nm
172device driver first appeared in
173.Fx 8.2 .
174.Sh AUTHORS
175.An -nosplit
176The
177.Nm
178driver was written by
179.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org .
180.Sh BUGS
181Some devices are not recognized automatically and may need to be manually
182configured to use an alternative configuration with the
183.Xr usbconfig 8
184utility.
185See
186.Sx EXAMPLES
187for workarounds.
188