OK, I made more progress with my Windows/Linux discrepancies, and I have now hit another problem. I haven't totally ruled out the possibility that it's another FX2 firmware bug, but I have narrowed it down to a pretty simple example on the host and FX2 side:
http://www.swaton.ukfsn.org/temp/libusbx.tar.gz Basically, the supplied FX2 firmware (in libusbx/fx2/fw/firmware.hex) enumerates with two IN endpoints, EP1IN and EP2IN. It also supports a couple of OUT vendor commands, 0x81 and 0x82. Both ignore wValue and wIndex. Both accept some OUT data on EP0. Data written to command 0x81 is put in the EP1IN buffer ready for the host to read it back. Similarly, data written to command 0x82 is put in the EP2IN buffer ready for the host to read it back. On the host side there's a small libusbx-based test program (libusbx/host/test/test.c), which accepts a command-line argument of "1" or "2". If "1", it writes 16 bytes of data to vendor command 0x81 and then tries to read it back from EP1IN. Similarly, if "2", it writes the 16 bytes to vendor command 0x82 and then tries to read it back from EP2IN. On Linux, both EP1IN and EP2IN read back correctly. On Windows, regardless of whether I use the winusb, libusbk or libusb0 drivers, the behaviour is the same: the EP2IN readback works fine, but the EP1IN readback returns immediately with zero bytes. I have included the debug log and a USB trace for each of the four configurations (linux, winusb, libusbk & libusb0) in the archive; each has the EP2IN readback attempt first, then the EP1IN attempt. I thought about implementing the same protocol in an Atmel AVR, to eliminate the possibility that it's just more FX2 weirdness, but I thought I'd post in the current state in case anyone has ideas. The libusbx code included in the archive is the github head as of a couple of days ago. I'm happy to try with the latest head if necessary. 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