On Tue, 11 Nov 2003, G. Del Merritt wrote:

> I'm working with two digital cameras - a Sanyo Xacti S1 and a Canon PowerShot
> A80 - and I'm writing an application to talk to them which uses libusb.  Each
> DSC advertises that the maximum bytecount per transfer on the interrupt
> endpoint is 8 bytes, so I only read a maximum of 8 bytes at a time from the
> interrupt endpoint, even though the higher level protocol (PTP) usually sends
> a total of 16 bytes in a "logical interrupt".
> 
> Having hooked up a USB analyzer between the camera and my Linux system, I see
> interrupt data on the scope, but I don't always see the data when I read the
> interrupt endpoint.

Do you _always_ see the interrupt data on the scope?  That is, is it 
possible that on the few occasions you can't read it from the interrupt 
endpoint the camera didn't actually send it?

> I've enabled debug in USB for this kernel, and I've cruised the source a
> little in core/urb.c and core/message.c, but I'm not sure of the best place to
> add a printk() or two (or otherwise enable more debug output) to see if the
> interrupt data I'm looking for is being seen by the kernel.

If it were seen, you would have received it.  But if you want to
experiment some more, look at usb_hcd_giveback_urb() in
drivers/usb/core/hcd.c.

> Below is the output of dmesg from when I fire up my application and turn on
> the camera until I turn off the camera.  Note that the "USBDEVFS_BULK failed"
> messages are instances of timeouts on reads to the interrupt endpoint.  What
> you don't see here (because dmesg doesn't include it) is lots of successful
> I/O to and from the input, output, and interrupt endpoints.
> 
> Suggestions?  What other information would be useful?  Thanks,
> -Del

Is it possible that your timeout is set too short?

Your problem reminds me a lot of another one reported last August.  See 
the thread beginning with

http://sourceforge.net/mailarchive/message.php?msg_id=5831507

Although the packets were sent to the host, the controller didn't indicate
it received anything.  We never resolved it -- it's possible that this is
a flaw in some UHCI controllers.

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to