- Please check if the return value of cyusb_gethandle is non zero or not
mHandle = cyusb_gethandle(mDeviceDB->cyDevId);
printf("Error in getting a handle. curent_device_index = %d\n", current_device_index);
- If the return value of cyusb_gethandle is non zero please check the return value of cyusb_control_transfer
cyusb_control_transfer returns the actual number of bytes transferred on success, in the range from and including zero up to and including wLength. On error a LIBUSB_ERROR code is returned, for example, LIBUSB_ERROR_TIMEOUT if the transfer timed out, LIBUSB_ERROR_PIPE if the control request was not supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and another LIBUSB_ERROR code on other failures. The LIBUSB_ERROR codes are all negative.
I already checked the return values. It seems OK.
And when i checked using USB monitoring tool (wireshark), the transmitted data looks OK.
So I was wondering if there is any other way to transfer with the same settings as the function I used in Windows.
The CyUSB Suite for Linux is a wrapper around an existing Open Source user-space USB Library called libusb.
Whereas the CyAPI.lib provides a simple, powerful C++ programming interface to USB devices. It is a C++ class library that provides a high-level programming interface to the CyUsb3.sys device driver via Windows API.
CyAPI.lib is not available for Linux so XferData cannot be used in CyUSB Suite for Linux
Please let me know if any query on this