Hi libusbx-devel, Firstly thanks for the lively fork! It's great that libusb is being so actively developed.
I'm in the process of debugging some host-side code and Cypress FX2LP firmware. Things work fine on Linux and on MacOSX, but things go awry on Windows (using WinUSB driver). I coult show you traces of things actually going wrong on Windows, but I notice even when things go well, the Linux message-flow differs from the Windows message-flow; I'd like to understand there reason for these differences. On Windows I'm using the libusbx-1.0.12 binary distribution. On MacOSX I'm using libusbx-1.0.12 built from source. It's hard to discover what's being used on Linux. The Ubuntu 12.04 package is libusb-1.0-0, version 2:1.0.9~rc3-2ubuntu1. The Ubuntu site claims this was built from libusbx-1.0.9 source. On Linux, running my libusb-1.0 test program three times gives this: http://pastebin.com/raw.php?i=0jGbaAxM Notice that the message sequence is: 1) Write 0x00 bytes to EP0: SET_CONFIGURATION(0x0001, 0x0000) 2) Read 0x10 bytes from EP0: 0x80(0x0000, 0x0000) 3) Write 0x05 bytes to EP2: 0x00, 0x00, 0x00, 0x00, 0x01 4) Write 0x01 byte to EP2: 0x10 And notice that this sequence is repeated three times (for three separate invocations of the test program). Now the same code built against libusbx-1.0.12 on Windows, running on the same host inside a VirtualBox VM: http://pastebin.com/raw.php?i=9dPb0uiC Notice that the message sequence is now: 1a) Read 0x09 bytes from EP0: GET_DESCRIPTOR(0x0200, 0x0000) 1b) Read 0x2E bytes from EP0: GET_DESCRIPTOR(0x0200, 0x0000) 2) Read 0x10 bytes from EP0: 0x80(0x0000, 0x0000) 3) Write 0x05 bytes to EP2: 0x00, 0x00, 0x00, 0x00, 0x01 4) Write 0x01 byte to EP2: 0x10 Notice that, again, the message sequence is repeated three times (for three separate invocations of the test program). Also notice that 2, 3 & 4 are exactly the same as they were on Linux, but the call to SET_CONFIGURATION on Linux has been replaced with a pair of calls to GET_DESCRIPTOR on Windows. If I run the same code natively on a dedicated Windows machine (and use USBTrace to sniff), neither the SET_CONFIGURATION nor the GET_DESCRIPTOR are sent; it just goes straight into 2, 3 & 4. Why is the message flow different? Why do calls to libusb_set_configuration() (and libusb_set_interface_alt_setting(), incidentally) result in messages being sent from Linux, but not from Windows? Chris ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel