Hi,
I've got a device that uses a FT2232H chip; and our application uses
both interfaces - INTF1 to control the device (I2C and GPIO), and INTF0
to send image data to the host. I'm doing some unit testing under Win8.1
x64, and am using the WinUSB driver with an INF file generated from
libusbK-inf-wizard.
My test is fairly simple - open and close the device 50 times. The logic
is very straightforward (error checking removed for clarity):
for (i=0; i<50; i++) {
struct ftdi_context *dev = ftdi_new();
ftdi_set_interface(dev, INTERFACE_B);
ftdi_usb_open(dev, PICAM_USB_VID, PICAM_USB_PID);
ftdi_usb_close(dev);
ftdi_free(dev);
}
Depending on how my WinUSB driver is configured, different things happen:
- with WinUSB configured to point to my composite device (ie DeviceID =
"VID_0403&PID_7C38"), this fails after 32 iterations (way down in the
guts of libusb - basically after 32 iterations it runs out of valid
interfaces).
- with WinUSB configured with two interfaces (ie DeviceID_0 =
"VID_0403&PID_7C38&MI_00" and DeviceID_1 = "VID_0403&PID_7C38&MI_01"),
this run without any issues.
The problem I'm having is that if the WinUSB driver is configured with
two interfaces, then I can't access both interfaces simultaneously - the
only way I've been able to do that is to have the driver configured for
the composite device.
Is this a bug, or am I missing something in how to configure and talk to
two interface?
Any help or ideas would be appreciated!
Steve
PS - for full disclosure, in our real code I'm using libMPSSE to open
Interface B for controlling the device, then using libFTDI to open
Interface A when I start capturing images. In troubleshooting, I've
narrowed the issue down to the code shown above... and I'm not sure if
it's an issue with libFTDI or libUSB or me!
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|