On Sun, 2004-08-15 at 04:31, Nuno Tavares wrote:
> Hello all developers,
> 
> I'm just starting to play around with libusb and linux-usb, so I can build
>  a driver for my webcam (Creative Webcam). This is being done based on
> (both) sniffusb/UsbSnoop and usbmon logs (these last more easy to read),
> and I've came across my first problem: I can't reproduce the first
> VENDOR_REQ, and still don't understand exactly how the subsystem works.
> I've searched the net for other examples besides libusb tests/ but only
> get code for specific devices (which I don't even know what they do)
> instead of general examples.
> 
> I've read USB-in-a-nutshell and the USB guide. The first one is more
> compreehensive, though.
> 
> I've sniffed the USB traffic for the device plug-in both with UsbSnoop[1]
> and usbmon[2]. This is supposed to be the enumeration, right? So after
> setting the configuration, the Windows driver prepares the webcam with
> some VENDOR_REQ. Since linux-usb core won't do this kind of extension, I'd
> need to do it in the driver, so this is my problem. The current code is at
> [3].
> 
> Please take a look at URB 5 for [1] *or* 000015 for [2] (preferred) -
> these are only the first transfers. Here is 000015:
> ---------------------------------------------------------------------------
> 000015: Vendor-Specific Request (DOWN), 15.08.2004 01:19:28.2916864 +0.0
> Destination: Device
> Reserved Bits: 0
> Request: 0x0
> Value: 0x8
> Send 0x0 bytes to the device
> 
> 
> 000016: Control Transfer (UP), 15.08.2004 01:19:28.2916864 +0.0 
> Pipe Handle: 0x824559a0
> 
> Setup Packet
>  40 00 08 00 00 82 00 00
> 
> Recipient: Device 
> Request Type: Vendor 
> Direction: Host->Device 
> Request: 0x0 (Unknown) 
> Value: 0x8 
> Index: 0x8200 
> Length: 0x0
> ---------------------------------------------------------------------------
> 
> I think the corresponding libusb call would be:
> #define USB_DIR_OUT 0x0
> #define USB_DIR_IN  (0x1 << 7)
> char buf[255];
> usb_control_msg(udev, \
>       USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_DEVICE,\
>       0,0x08,0x8200,buf,0,500);
> 
> Is this correct?
> Why does usb_control() return 0, and buf is empty:
> buf: 00 00 00 00 00 00 00 00 (00 ...)
> 
> According to the logs, buf should be: 40 00 08 00 00 82 00 00, right?
> 
> I will need to do some ISO transfers, and libusb doesn't seem to provide
> them. Am I correct? If so, how will I proceed after this enumeration
> extension is solved?
> 
> Can you guide me in the right direction? I'm sure I'm missing something.
> 
> [1] http://danuninho.dhis.org/~nmct/cvista-plugin.log
> [2] http://danuninho.dhis.org/~nmct/cvista-plugin.htm
> [3] http://danuninho.dhis.org/~nmct/cvista.c
> 
> Please reply,


For isochronous routines see the libusb mailinglist, check the emails
from Mac Cody about his isochronous routine.

Maybe if you want to write a SANE VIDCAM backend see some
examples on gkall.hobby.nl/notes5.html.

No working backend yet only the skeleton program is more or less ready.

-- 
----------
m.vr.gr.
Gerard Klaver



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to