From owner-svn-src-all@freebsd.org Sun May 26 14:15:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAE8715A78C5; Sun, 26 May 2019 14:15:55 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1906088C5D; Sun, 26 May 2019 14:15:55 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E20121CC35; Sun, 26 May 2019 14:15:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4QEFs8s037025; Sun, 26 May 2019 14:15:54 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4QEFsE8037024; Sun, 26 May 2019 14:15:54 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201905261415.x4QEFsE8037024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 26 May 2019 14:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348287 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 348287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1906088C5D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2019 14:15:56 -0000 Author: 0mp (ports committer) Date: Sun May 26 14:15:54 2019 New Revision: 348287 URL: https://svnweb.freebsd.org/changeset/base/348287 Log: ipheth.4: Explain how to manually configure USB tethering on Apple devices Reviewed by: danfe, hselasky Approved by: src (hselasky) Differential Revision: https://reviews.freebsd.org/D20353 Modified: head/share/man/man4/ipheth.4 Modified: head/share/man/man4/ipheth.4 ============================================================================== --- head/share/man/man4/ipheth.4 Sun May 26 12:41:03 2019 (r348286) +++ head/share/man/man4/ipheth.4 Sun May 26 14:15:54 2019 (r348287) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2015 +.Dd May 26, 2019 .Dt IPHETH 4 .Os .Sh NAME @@ -75,6 +75,87 @@ Apple iPhone tethering (all models) .It Apple iPad tethering (all models) .El +.Sh EXAMPLES +.Bl -tag -width 0n +.It Sy Example 1\&: No Manual Configuration +.Pp +The following example shows how to manually configure network access on a +device that is not automatically recognized. +.Pp +First, load the driver and find out the unit and the address of the USB +Apple +device: +.Bd -literal -offset 2n +.Li # Ic kldload ipheth +.Li # Ic usbconfig | grep Apple +ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) +.Ed +.Pp +In this example, the unit and the address of the device is 0.2 +.Pq Dq Li ugen0.2 , +and its configuration index is 0 +.Pq Dq Li cfg=0 . +.Pp +Secondly, check what other configurations are available for the device: +.Bd -literal -offset 2n +.Li # Ic usbconfig 0.2 dump_all_config_desc | awk '/^ Conf/{print} /iConf/{print}' + Configuration index 0 + iConfiguration = 0x0005 + Configuration index 1 + iConfiguration = 0x0006 + Configuration index 2 + iConfiguration = 0x0007 + Configuration index 3 + iConfiguration = 0x0008 +.Ed +.Pp +In this example, there are 4 different configurations available. +The configuration with index 3 seems to be related to Ethernet. +It is time to configure the device: +.Bd -literal -offset 2n +.Li # Ic usbconfig 0.2 set_config 3 +.Li # Ic usbconfig | grep 'Apple.*cfg=3' +ugen0.2: at usbus0, cfg=3 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) +.Ed +.Pp +At this point the Apple device should ask whether the +.Fx +machine can be trusted +.Po Dq Mobile Data +has to be on +.Pc . +.Pp +A new +.Em ue +USB Ethernet interface should become available: +.Bd -literal -offset 2n +.Li # Ic dmesg | grep 'ue[0-9]' +ue0: on ipheth0 +ue0: bpf attached +ue0: Ethernet address: 4e:7c:5f:2c:5f:7a +.Ed +.Pp +At this point it might be necessary to run +.Xr usbmuxd 1 +.Po available in +.Xr ports 7 +at +.Pa comms/usbmuxd +.Pc : +.Bd -literal -offset 2n +.Li # Ic usbmuxd --enable-exit --foreground --user root --verbose +.Ed +.Pp +Now it is time to configure the network interface: +.Bd -literal -offset 2n +.Li # Ic sysrc ifconfig_ue0="SYNCDHCP" +ifconfig_ue0: -> SYNCDHCP +.Li # Ic service netif restart ue0 +.Ed +.Pp +That is it. +The machine should now be connected to the network via USB tethering. +.El .Sh SEE ALSO .Xr arp 4 , .Xr cdce 4 , @@ -96,12 +177,10 @@ The driver was written by .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . .Sh BUGS -Some devices may need to be manually configured to use an alternative -configuration with the +Some devices are not recognized automatically and may need to be manually +configured to use an alternative configuration with the .Xr usbconfig 8 utility. -A command similar to -.Dl usbconfig -u 1 -a 2 set_config 3 -may be required if the device is not recognised automatically by -.Nm -after it is connected. +See +.Sx EXAMPLES +for workarounds.