Multiple USB devices application

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

cross mob
Anonymous
Not applicable

Hi,

   

I am writing an application which need to manage two same USB devices and I am using cypress cy7c68013A as the controller in the device. How can I manage to control these two devices in my application. Do I need to generate two independent instances using CCyUSBDevice for these two device?

   

Thanks,

   

Martin

0 Likes
1 Solution
Anonymous
Not applicable

Hi Martin,

   

I could see two devices with the same PID_VID being detected on Control Center and you can communicate with them one at a time.
You can definitly not communicate with two devices at the same time using CyAPI.lib. You can use the threads in CyUSB.net.

You can achieve it in CyUSB.NET.
There are different ways of identifying a device to be accessed  in CYUSB. You can use the index operator to identify the device: USBDeviceList [int index] in CyUSB.NET APIs.
I am attaching an application in CyUSB.NET I built for this purpose. Simply attach two devices programmed with streamer firmware.

You can refer to this if you are searching to build an application on CyUSB.NET.

   

Njoy...

 

View solution in original post

0 Likes
10 Replies
Anonymous
Not applicable

Hi Martin,

   

You can have two different serial numbers assigned to FX2LP devices and you should be able to distinguish the two devices based on serial numbers once the enumeration is done.

   

Thanks,

   

sai krishna.

0 Likes
Anonymous
Not applicable

Hi Sai,

   

Thanks for the reply. If I don't use the serial number, what do I need to do to access multiple devices by the Cylib.lib?

   

regards,

   

Martin

0 Likes
Anonymous
Not applicable

You need to have some other differentiator between those two devices...

   

Regards,

   

sai krishna.

0 Likes
Anonymous
Not applicable

Hi Martin,

   

If you want to communicate to two devices, you will need at least either different PIDs or different serial numbers as Sai has conveyed. The application needs to know of a way to differentiate between devices.

   

Also, you cannot communicate with two devices at the same time using CyAPI.lib. Session with one device has to be closed and only then you can communicate with the other. You can communicate one after the other.

Njoy...

0 Likes
Anonymous
Not applicable

Hi,

   

Thanks. If I need open two device which have the same PID and VID which may use different serial number at the same time for I need to combine the data which are collected form these two devices in my application. what do I need to do?

   

I know that some of applications can open multi-devices which use the same PIDs and don't use the serial number. The application find the device by the USB hub and port address. Will Cylib give the similar solution?

   

Thanks,

   

Martin

0 Likes
Anonymous
Not applicable

Hi Martin,

   

I could see two devices with the same PID_VID being detected on Control Center and you can communicate with them one at a time.
You can definitly not communicate with two devices at the same time using CyAPI.lib. You can use the threads in CyUSB.net.

You can achieve it in CyUSB.NET.
There are different ways of identifying a device to be accessed  in CYUSB. You can use the index operator to identify the device: USBDeviceList [int index] in CyUSB.NET APIs.
I am attaching an application in CyUSB.NET I built for this purpose. Simply attach two devices programmed with streamer firmware.

You can refer to this if you are searching to build an application on CyUSB.NET.

   

Njoy...

 

0 Likes
Anonymous
Not applicable

Hi,

   

Thanks for the suggestion.  I haven't seen the attachment.

   

regards,

   

Martin

0 Likes
Anonymous
Not applicable

Somehow it didn't get attached.

   

Attaching here again.

   

Do verify once if I'm correct that its communicating with different devices. Someway to display on the device, when its communicating.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Didn't attach again....
Probably because its a .rar file.
attaching the file...

   

Njoy...

0 Likes
Anonymous
Not applicable

Hi,

   

I got it. Thanks.

   

Martin

0 Likes