iPhone 4(S) access via gphoto2

Hans Petter Selasky hps at bitfrost.no
Sun Oct 13 15:39:15 UTC 2013


Hi,

Your iPhone times out when reading the configuration descriptor:

> 19:05:57.365047 usbus4.2 SUBM-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
>  frame[0] WRITE 8 bytes
>  0000  80 06 02 02 00 00 09 00  -- -- -- -- -- -- -- --  |........        |
>  frame[1] READ 9 bytes
>  flags 0x10 <PROXY_BUFFER|0>
>  status 0xea1a3 <OPEN|TRANSFERRING|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
> 19:05:57.365404 usbus4.2 DONE-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=12,IVAL=0,ERR=0
>  frame[0] WRITE 8 bytes
>  frame[1] READ 9 bytes
>  0000  09 02 3E 00 02 03 07 C0  FA -- -- -- -- -- -- --  |..>......       |
>  flags 0x10 <PROXY_BUFFER|0>
>  status 0xca1a1 <OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
> 19:05:57.365412 usbus4.2 SUBM-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
>  frame[0] WRITE 8 bytes
>  0000  80 06 02 02 00 00 3E 00  -- -- -- -- -- -- -- --  |......>.        |
>  frame[1] READ 62 bytes
>  flags 0x10 <PROXY_BUFFER|0>
>  status 0xca1a3 <OPEN|TRANSFERRING|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
> 19:05:58.353453 usbus4.2 DONE-CTRL-EP=00000080,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT
>  flags 0x10 <PROXY_BUFFER|0>
>  status 0xaa1a5 <OPEN|DID_DMA_DELAY|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|DOING_CALLBACK|0>

Subsequent reads of the configuration descriptor are successful. 
Probably a driver problem in the USB firmware stack of the iPhone.
To figure out what is actually going on you need a USB analyzer 
connected to the USB cable. The problem you are seeing is probably 
timing dependant.

BTW: You can add "options USB_REQ_DEBUG" to the kernel config file. Then 
you will get some more sysctls which affect the timing of control 
transfers under hw.usb.

You can try contacting Apple about this. I'm sure if you hit the right 
guy, they will fix try to fix it.

--HPS


More information about the freebsd-usb mailing list