On Wed, 31 Jan 2007, Radomir Zugic wrote: > Hello list, > > I am trying to communicate with a Logitech IO Digital Pen using > libusb. I get a protocol error whenever I use the bulk transfer > functions or usb_control_msg. > > code: > memcpy(buf = "\x09\x02\x37\x00\x02\x01\x00\xC0\x4B", 0x9); > result = usb_control_msg( digipen, 0x6, USB_TYPE_STANDARD, 0x200, 0x0, > buf, 0x9, 10000); > > output: > error sending control message: Protocol error > > I am trying to get the configuration here.
That's not what the code says. You didn't specify USB_DIR_IN, so you are _sending_ data rather than _receiving_ data. > Could someone please > explain to me what exactly a protocol error in this context means and > what I am doing wrong? "Protocol error" is EPROTO. According to Documentation/usb/error-codes.txt in the kernel source, EPROTO means (among other things) that no response was received from the device. Not surprising, since it thought you were trying to write the config descriptor rather than read it. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users