Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 2013 17:40:21 +0200
From:      Hans Petter Selasky <hps@bitfrost.no>
To:        Alexey Dokuchaev <danfe@nsu.ru>, usb@FreeBSD.org
Subject:   Re: iPhone 4(S) access via gphoto2
Message-ID:  <525ABEE5.8030809@bitfrost.no>
In-Reply-To: <20131013111518.GA3478@regency.nsu.ru>
References:  <20131012175942.GA2554@regency.nsu.ru> <20131012190107.GA15100@regency.nsu.ru> <525A42CD.5020201@bitfrost.no> <20131013082210.GA65964@regency.nsu.ru> <525A5BE6.4050801@bitfrost.no> <20131013094530.GA85752@regency.nsu.ru> <525A79B5.5080700@bitfrost.no> <20131013111518.GA3478@regency.nsu.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?525ABEE5.8030809>