Alan, Gerard: Thanks! I'll be digging ISO [EMAIL PROTECTED] whenever I checkpoint camera preparation. Right now I'm interested in testing if my understanding of the protocol is correct.
The documents I've read tend only to deal with the enumeration, which is done by the subsystem (right?), so I just found 1 example of a basic device operation (written by GregKH, IIRC). In fact all USB communications seem so simple that I'm affraid of falling into misunderstanding. Em Sun, 15 Aug 2004 11:57:50 -0400, Alan Stern escreveu: >> 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? > > Yes, although you could just as easily use NULL instead of buf. I had tried it already, same result. >> Why does usb_control() return 0, and buf is empty: >> buf: 00 00 00 00 00 00 00 00 (00 ...) > > Since it's an OUT transfer, the only data in buf will be what you put > there yourself (in this case, none). There won't be any data coming IN > from the device. The there is an "URB coming back" right? And it comes from the device..? >From what I've understood, this is a reply from the device which just acknoledges the packet. >> According to the logs, buf should be: 40 00 08 00 00 82 00 00, right? > > Wrong. According to the logs, those bytes are the contents of the SETUP > packet. They correspond to the second, third, fourth, fifth, and seventh > arguments of the usb_control_msg() call. I thought of 2 possibilities, both in these 2 paragraphs. So this means I have to proceed blindly, right? Isn't there anyway to detect camera state? -- - Nuno Tavares http://nthq.cjb.net/ ------------------------------------------------------- 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