Yes, you can communicate to different devices with same VID and PID parallelly. Please refer to the attachment. I have connected two different devices with same VID, PID. One device is streaming 0xAA and other 0xA7.
And I am running two instances of same C++ application.
You can refer to the source code of this application in the following path:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\streamer\x86\Release
streamer.PNG 20.6 K
thank you for your prompt reply!
I have view the source code of the example. A difference, that I have see, is the instantiation of the pointer USBDevice.
In the example is it:
USBDevice = new CCyUSBDevice((HANDLE)this->Handle,CYUSBDRV_GUID,true);
In the API documentation is it only "NULL". So I have this in my application.
1.) Is it possible, that is the problem?
2.) What handle is necessary? Is this used in the driver or is it just for identification in the driver?
1. The parameter CYUSBDRV_GUID is used to get the handle for the devices which are bound to the cyusb3.sys driver.
2. Do not pass NULL. Instead implement as in the reference 'streamer' source code pointed out.
3. Once USBDevice = new CCyUSBDevice((HANDLE)this->Handle,CYUSBDRV_GUID,true); is called,
You can find howmany devices are connected by accessing the member USBDevice->DeviceCount();
- So based on this count, you need to open right device by calling USBDevice->Open(i);