xref: /freebsd/share/man/man4/ipheth.4 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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.Dd January 29, 2022
29.Dt IPHETH 4
30.Os
31.Sh NAME
32.Nm ipheth
33.Nd "USB Apple iPhone/iPad tethered Ethernet driver"
34.Sh SYNOPSIS
35To load the driver as a module at boot time, place the
36following line in
37.Xr loader.conf 5 :
38.Bd -literal -offset indent
39if_ipheth_load="YES"
40.Ed
41.Pp
42Alternatively, to compile this driver into the kernel, place the
43following lines in your kernel configuration file:
44.Bd -ragged -offset indent
45.Cd "device uhci"
46.Cd "device ohci"
47.Cd "device usb"
48.Cd "device miibus"
49.Cd "device uether"
50.Cd "device ipheth"
51.Ed
52.Sh DESCRIPTION
53The
54.Nm
55driver provides support for network access through Apple
56iPhone and iPad devices, often referred to as USB tethering.
57.Pp
58.Nm
59should work with any Apple iPhone or iPad device.
60In most cases this must be explicitly enabled on the device first.
61.Pp
62For more information on configuring this device, see
63.Xr ifconfig 8 .
64The device does not support different media types or options.
65.Sh HARDWARE
66The following devices are supported by the
67.Nm
68driver:
69.Pp
70.Bl -bullet -compact
71.It
72Apple iPhone tethering (all models)
73.It
74Apple iPad tethering (all models)
75.El
76.Sh EXAMPLES
77.Bl -tag -width 0n
78.It Sy Example 1\&: No Manual Configuration
79.Pp
80The following example shows how to manually configure network access on a
81device that is not automatically recognized.
82.Pp
83First, load the driver and find out the unit and the address of the USB
84Apple
85device:
86.Bd -literal -offset 2n
87.Li # Ic kldload ipheth
88.Li # Ic usbconfig | grep Apple
89ugen0.2: <Apple Inc. iPhone> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
90.Ed
91.Pp
92In this example, the unit and the address of the device is 0.2
93.Pq Dq Li ugen0.2 ,
94and its configuration index is 0
95.Pq Dq Li cfg=0 .
96.Pp
97Secondly, check what other configurations are available for the device:
98.Bd -literal -offset 2n
99.Li # Ic usbconfig -d 0.2 dump_all_config_desc | grep -E '(^ Conf|iConf)'
100 Configuration index 0
101    iConfiguration = 0x0005  <PTP>
102 Configuration index 1
103    iConfiguration = 0x0006  <iPod USB Interface>
104 Configuration index 2
105    iConfiguration = 0x0007  <PTP + Apple Mobile Device>
106 Configuration index 3
107    iConfiguration = 0x0008  <PTP + Apple Mobile Device + Apple USB Ethernet>
108.Ed
109.Pp
110In this example, there are 4 different configurations available.
111The configuration with index 3 seems to be related to Ethernet.
112It is time to configure the device:
113.Bd -literal -offset 2n
114.Li # Ic usbconfig -d 0.2 set_config 3
115.Li # Ic usbconfig | grep 'Apple.*cfg=3'
116ugen0.2: <Apple Inc. iPhone> at usbus0, cfg=3 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
117.Ed
118.Pp
119At this point the Apple device should ask whether the
120.Fx
121machine can be trusted
122.Po Dq Mobile Data
123has to be on
124.Pc .
125.Pp
126A new
127.Em ue
128USB Ethernet interface should become available:
129.Bd -literal -offset 2n
130.Li # Ic dmesg | grep 'ue[0-9]'
131ue0: <USB Ethernet> on ipheth0
132ue0: bpf attached
133ue0: Ethernet address: 4e:7c:5f:2c:5f:7a
134.Ed
135.Pp
136At this point it might be necessary to run
137.Xr usbmuxd 1
138.Po available in
139.Xr ports 7
140at
141.Pa comms/usbmuxd
142.Pc :
143.Bd -literal -offset 2n
144.Li # Ic usbmuxd --enable-exit --foreground --user root --verbose
145.Ed
146.Pp
147Now it is time to configure the network interface:
148.Bd -literal -offset 2n
149.Li # Ic sysrc ifconfig_ue0="SYNCDHCP"
150ifconfig_ue0:  -> SYNCDHCP
151.Li # Ic service netif restart ue0
152.Ed
153.Pp
154That is it.
155The machine should now be connected to the network via USB tethering.
156.El
157.Sh SEE ALSO
158.Xr arp 4 ,
159.Xr cdce 4 ,
160.Xr cdceem 4 ,
161.Xr intro 4 ,
162.Xr netintro 4 ,
163.Xr urndis 4 ,
164.Xr usb 4 ,
165.Xr ifconfig 8 ,
166.Xr usbconfig 8
167.Sh HISTORY
168The
169.Nm
170device driver first appeared in
171.Fx 8.2 .
172.Sh AUTHORS
173.An -nosplit
174The
175.Nm
176driver was written by
177.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org .
178.Sh BUGS
179Some devices are not recognized automatically and may need to be manually
180configured to use an alternative configuration with the
181.Xr usbconfig 8
182utility.
183See
184.Sx EXAMPLES
185for workarounds.
186