From: Bob C. <bc...@co...> - 2008-06-16 19:29:29
|
Hi, I'm trying to reverse engineer my iClicker base unit and create a Linux driver. Everything seems to be going OK except: print handle.controlMsg(reqType,usb.REQ_SET_CONFIGURATION,0x40,0x200,0) print "written? ",handle.interruptWrite(0x83,dataOut,1000) The sniffer I am using shows a read rather than a write. I'm stuck. I don't know whether my sniffer is lying to me or if I have a mistake in my code or if I haven't figured out the device's command structure. _________________________________________________________________________________________________________________ A couple of comments: I'm including the code, the program output and the sniffs as attachments so the body of the email doesn't get a mile long. The controlMsg seems a little un-standard according to the usb spec but I'm trying to create a setup packet that I sniffed from the Windows app.: 21 09 00 02 00 00 40 00 The output I get in Linux (using a different sniffer) is: 21 09 0200 0000 0040. I'm not absolutely sure but it looks like the Windows sniffer reverses high and low bytes for the two byte variables. (40 should be in the low byte not the high byte.) If I omit the controlMsg, the result is: USB Error: No Error The Linux sniffer is: sudo cat /sys/kernel/debug/usbmon/1u > /tmp/1.mon.out The Windows sniffer is: *SniffUSB.exe *(http://benoit.papillault.free.fr/usbsnoop/doc.php.en) Thanks, Bob ** |