Bug 210830 - iPhone 5S not working with if_ipheth network driver without changing setting config index to 3
Summary: iPhone 5S not working with if_ipheth network driver without changing setting ...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-usb mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-04 23:04 UTC by Ben Woods
Modified: 2019-05-12 15:23 UTC (History)
4 users (show)

See Also:


Attachments
Before usbconfig -d 3.3 set_config 3 (388.50 KB, image/jpeg)
2019-01-15 04:22 UTC, Nathaniel
no flags Details
After usbconfig -d 3.3 set_config 3 p. 1 (377.96 KB, image/jpeg)
2019-01-15 04:24 UTC, Nathaniel
no flags Details
After usbconfig -d 3.3 set_config 3 p. 2 (358.50 KB, image/jpeg)
2019-01-15 04:25 UTC, Nathaniel
no flags Details
After usbconfig -d 3.3 set_config 3 p. 3 (349.10 KB, image/jpeg)
2019-01-15 04:26 UTC, Nathaniel
no flags Details
After usbconfig -d 3.3 set_config 3 p. 4 (345.72 KB, image/jpeg)
2019-01-15 04:27 UTC, Nathaniel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woods freebsd_committer 2016-07-04 23:04:37 UTC
On FreeBSD 11-current r302246 I was only able to get the ue0 network device to show up after the ipheth(4) driver was loaded if I run:
# usbconfig -d X.Y set_config 3

 (where X and Y are the ugen values shown in dmesg when connected to USB)


Details of the configuration descriptors are shown below:
# usbconfig -u X -a Y dump_curr_config_desc
ugen0.4: <iPhone Apple Inc.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)


 Configuration index 0

    bLength = 0x0009 
    bDescriptorType = 0x0002 
    wTotalLength = 0x0027 
    bNumInterfaces = 0x0001 
    bConfigurationValue = 0x0001 
    iConfiguration = 0x0005  <PTP>
    bmAttributes = 0x00c0 
    bMaxPower = 0x00fa 

    Interface 0
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0000 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0003 
      bInterfaceClass = 0x0006  <Still imaging>
      bInterfaceSubClass = 0x0001 
      bInterfaceProtocol = 0x0001 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0002  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x000a 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 1
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x000a 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 2
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0083  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0040 
        bInterval = 0x000a 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000
Comment 1 Ben Woods freebsd_committer 2016-07-04 23:06:26 UTC
Note that this bug is actually mentioned at the end of the ipheth(4) man page in the BUGS section.
Comment 2 Nathaniel 2019-01-14 04:37:48 UTC
This bug also affects me on a new FreeBSD install 12.0 tethering to a 6s. 

You may want to make the fix a little more public if it isn’t going to be solved quickly by updating the handbook. 
https://www.freebsd.org/doc/handbook/network-usb-tethering.html
Comment 3 Hans Petter Selasky freebsd_committer 2019-01-14 11:36:16 UTC
Can you dump all the USB configuration descriptors?

--HPS
Comment 4 Nathaniel 2019-01-15 04:22:28 UTC
Created attachment 201148 [details]
Before usbconfig -d 3.3 set_config 3

Before issuing usbconfig -d 3.3 set_config 3
Comment 5 Nathaniel 2019-01-15 04:24:45 UTC
Created attachment 201149 [details]
After usbconfig -d 3.3 set_config 3 p. 1

After usbconfig -d 3.3 set_config 3 p. 1
Comment 6 Nathaniel 2019-01-15 04:25:21 UTC
Created attachment 201150 [details]
After usbconfig -d 3.3 set_config 3 p. 2
Comment 7 Nathaniel 2019-01-15 04:26:14 UTC
Created attachment 201151 [details]
After usbconfig -d 3.3 set_config 3 p. 3
Comment 8 Nathaniel 2019-01-15 04:27:51 UTC
Created attachment 201152 [details]
After usbconfig -d 3.3 set_config 3 p. 4
Comment 9 Nathaniel 2019-01-15 04:39:21 UTC
Sorry for all the pictures, I am currently compiling Xorg on the machine... 
it is an older PowerPC G4 laptop (with some PITA wireless which I haven’t figured out yet, thus the phone tethering)

Anyrate, first picture is before I issue the set_config 3 command

After I issue that command the phone pops up a “Do you want to trust this computer” message (every time)

Then the next 4 pictures are after I hit trust 

FreeBSD still will not connect yet, for some reason I always have to toggle “Personal Hotspot” off and then on (on the iPhone)

After that I have to issue dhclient ue0

After dhcp address is received, the blue bar appears at the top of the iPhone indicating that tethering is active. 

Hope that helps.