- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have two FX3 Usb3 devices. and I am developing by referring to the Api manuals and source provided in the SDK.
But it doesn't work as expected.
Here's a brief summary of my routine:
- m_USBDevice = new CCyUSBDevice(this->m_hWnd, CYUSBDRV_GUID, true);
- m_DeviceCount = m_USBDevice->DeviceCount();
- m_USBDevice->Open(0) ;
- Pt1_1 = (CCyBulkEndPoint*)m_USBDevice->EndPoints[1];
- {...}
- m_USBDevice->Open(1) ;
- Pt1_1 = (CCyBulkEndPoint*)m_USBDevice->EndPoints[1];
- .......
In this case, control of Pt2_1 for device0 is possible, but the operation for “Pt1_1” does not work properly.
What should I do when I want to control two or more devices at the same time?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please find the attached console application which works at my end (snippet attached)
Password: cyapi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
From the description, I understand that you cannot access the second device connected to the host. Is my understanding correct?
If yes, please confirm if both the devices are detected by USBDevice->DeviceCount();
After opening the device 1 please check if the device is opened successfully using IsOpen( )
or you can also try the below code snippet
if (USBDevice->DeviceCount() && !USBDevice->Open(1)) {
// If Open() failed, retry Open() after resetting the device
USBDevice->Reset();
USBDevice->Open(1);
}
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There was incorrect information. I'm sorry..
- m_USBDevice = new CCyUSBDevice(this->m_hWnd, CYUSBDRV_GUID, true);
- m_DeviceCount = m_USBDevice->DeviceCount();
- m_USBDevice->Open(0) ;
- Pt0_1 = (CCyBulkEndPoint*)m_USBDevice->EndPoints[1];
- {...}
- m_USBDevice->Open(1) ;
- Pt1_1 = (CCyBulkEndPoint*)m_USBDevice->EndPoints[1];
In this case, control of "Pt1_1(device-1)" for is possible, but the operation for “Pt0_1(device-0)” does not work properly.
USBDevice->DeviceCount returned two correct values.
Both the USBDevice->Open(0) and USBDevice->Open(1) functions returned true.
USBDevice->IsOpen() also returned true.
There are no errors in the related function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know how many endpoints are there for device 0 and can the control endpoint be accessed?
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
Input:3 / Output3
The ControlEndPoint of device-0 also doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please try to reset the device and check if the control endpoint is accessible.
If that doesn't work, please share the host application for us to check
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello. This is my test program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The host application source is not accessible.
Please attach as .zip with your post
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for the details
Please confirm if both the devices are binded to the cyubs3 (v1.2.3.20 ) driver.
Also, please let me know if the issue is seen when the host app is run on different PC
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested it with v1.2.3.20 version and several other PCs, but it still malfunctions.
I tested it with 3 devices as well.
open(0) : X
open(1) : X
open(3) : O
Only the last board works normally. The previous boards still do not work.
Have you ever tested two or more boards using C++?
If C++ is not supported, do I have to implement it in C#?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
Thank you for your support.
As a result of my analysis, it seems that multi-device control is possible using C#.
When " USBDeviceList usbDevices = new SBDeviceList(CyConst.DEVICES_CYUSB)" is called,
The two device information is correctly mapped in usbDevices parameter.
However, I want to use C++.
In C++, it should be open(i) as many as the number of devices.
It seems that the information of the device opened first is lost.
I want to know if C++ is possible.
(Otherwise, "*.tlb" files are required to use C# dlls in C++.
Can you provide "*.tlb"?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The problem described in the document seems to be strange. This is because from the Wireshark traces it seems that the data transfer is done to the BULK endpoint of device 5 but transfer to the bulk endpoint is not initiated by the host app.
Please try to initialize the buffer to zero before calling XferData. Also, please comment out the call for printing ept1/ ept2
You can also refer to Streamer application (C++) in FX3 SDK (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\streamer) which allows the transfer to multiple devices
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I checked.
It works fine on my side too.
Thank you very much for your support.
CCyUSBDevice* USBDevice = new CCyUSBDevice(NULL);
CCyUSBDevice* USBDevice1 = new CCyUSBDevice(NULL);
Is this the correct way to use it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Apologies for late response
Yes, it can be used in the way it is done in the shared host application.
Rashi