Enumerate more devices that have same pID&vID

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Hello everyone

   

Now i meet a problem.I have two (meybe more) boards connect to PC by usb3.0. I want to read/write data with a Application.If just one board I know how to do that.But now two board connect to PC ,and I want to control them at the same time .e.g my device vID= 0x0547&pID = 0x1002
When just one device ,Enumerate like follows and it works well.

int devices = USBDevice->DeviceCount();
int vID, pID;
int d = 0;
do {
USBDevice->Open(d); // Open automatically calls Close() if necessary
vID = USBDevice->VendorID;
pID = USBDevice->ProductID;
d++;
} while ((d < devices ) && (vID != 0x0547) && (pID != 0x1002)); 

but now it has two device and has the same pID&vID.How can I Enumerate them.Can you give me a example 

Best Regards
Thanks

0 Likes
1 Reply
Anonymous
Not applicable

Hi Ayi,

   

You can use serial number to distinguish the two different boards.

   

USBDevice->SerialNumber can be added to your condition checks to identify the devices differently.

   

Thanks,

   

sai krishna.

0 Likes