Re: Fixing gvfs-backend-afc for iPhone/iPod Touch access



On Fri, 2009-07-31 at 12:42 +0100, Bastien Nocera wrote:
> On Fri, 2009-07-31 at 13:27 퍭㐱ꫭ詴낮譞:
> > On Fri, 2009-07-31 at 11:43 퍝㐅ꬭ觩춡잫權誖⢺奛禦򗝆眡 contains an updated HAL callout
> > which does exactly this using libiphone...
> 
> And the devicekit branch does the same thing using udev :)
> 
> > > > Still there appears to be some read/write issues when testing sqlite3 db
> > > > creation needed for music sync (probably some seek issue).
> > > > Investigating...
> > > 
> > > I had problems writing files with the original gvfs code from Patrick,
> > > but never had a chance to debug the problem...
> > 
> > Yeah, me aswell, actually it didn't work (backend crashed for me) and
> > emulated seeking. Read/write appears to work now just that
> > sqlite3_exec() appears to do something that is unhandled by the backend
> > which needs fixing.
> 
> Tomas mentions that the gvfs-fuse-daemon has a debug option
> (/usr/libexec//gvfs-fuse-daemon -d), and that there's a define for
> DEBUG_ENABLED in gvfsfusedaemon.c.
> 
> Cheers
> 

Thanks, while that helped to track it down a bit, it turned out to be
some kind of low level USB issue.

Using USB 1.1, packets with an exact size of N*128 fail to arrive at the
device and cause it to shutdown the AFC connection. On USB 2.0 it was
N*512. It seems to have to do with the "wMaxPacketSize" value for the
endpoint and according to that is probably N*64 for USB 1.1.

Despite the host controller having to split packets accordingly, it
appears if you have those exact sized packets, some bug is triggered in
the USB core stack or hardware.

-- Martin S.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]