| 1 | = FreeBSD Apple Iphone Setup = |
| 2 | |
| 3 | |
| 4 | {{{ |
| 5 | Example 1: Manual Configuration |
| 6 | |
| 7 | The following example shows how to manually configure network access |
| 8 | on a device that is not automatically recognized. |
| 9 | |
| 10 | First, load the driver and find out the unit and the address of the |
| 11 | USB Apple device: |
| 12 | |
| 13 | # kldload ipheth |
| 14 | # usbconfig | grep Apple |
| 15 | ugen0.2: <Apple Inc. iPhone> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) |
| 16 | |
| 17 | In this example, the unit and the address of the device is 0.2 |
| 18 | ("ugen0.2"), and its configuration index is 0 ("cfg=0"). |
| 19 | |
| 20 | Secondly, check what other configurations are available for the de- |
| 21 | vice: |
| 22 | |
| 23 | # usbconfig -d 0.2 dump_all_config_desc | grep -E '(^ Conf|iConf)' |
| 24 | Configuration index 0 |
| 25 | iConfiguration = 0x0005 <PTP> |
| 26 | Configuration index 1 |
| 27 | iConfiguration = 0x0006 <iPod USB Interface> |
| 28 | Configuration index 2 |
| 29 | iConfiguration = 0x0007 <PTP + Apple Mobile Device> |
| 30 | Configuration index 3 |
| 31 | iConfiguration = 0x0008 <PTP + Apple Mobile Device + Apple USB Ethernet> |
| 32 | |
| 33 | In this example, there are 4 different configurations available. The |
| 34 | configuration with index 3 seems to be related to Ethernet. It is |
| 35 | time to configure the device: |
| 36 | |
| 37 | # usbconfig -d 0.2 set_config 3 |
| 38 | # usbconfig | grep 'Apple.*cfg=3' |
| 39 | ugen0.2: <Apple Inc. iPhone> at usbus0, cfg=3 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) |
| 40 | |
| 41 | At this point the Apple device should ask whether the FreeBSD machine |
| 42 | can be trusted ("Mobile Data" has to be on). |
| 43 | |
| 44 | A new ue USB Ethernet interface should become available: |
| 45 | |
| 46 | # dmesg | grep 'ue[0-9]' |
| 47 | ue0: <USB Ethernet> on ipheth0 |
| 48 | ue0: bpf attached |
| 49 | ue0: Ethernet address: 4e:7c:5f:2c:5f:7a |
| 50 | |
| 51 | At this point it might be necessary to run usbmuxd(1) (available in |
| 52 | ports(7) at comms/usbmuxd): |
| 53 | |
| 54 | # usbmuxd --enable-exit --foreground --user root --verbose |
| 55 | |
| 56 | Now it is time to configure the network interface: |
| 57 | |
| 58 | # sysrc ifconfig_ue0="SYNCDHCP" |
| 59 | ifconfig_ue0: -> SYNCDHCP |
| 60 | # service netif restart ue0 |
| 61 | |
| 62 | That is it. The machine should now be connected to the network via |
| 63 | USB tethering. |
| 64 | }}} |