If I understood your question correctly, you have connected your USB Device (FX3 / CX3) to a Host with Linux OS.
You want to send a reconnect command from the USB Device to the Host Linux PC. (Please correct me if I understood wrongly).
As per USB Specification, a USB Device is a slave which cannot send a command or data of its own to the host without being asked.
The host has to keep pinging the device asking for a user defined status / data that tells the host that it must disconnect and reconnect. This can be implemented using Vendor Specific Control Request implementation.
Yes I have connected my device on Linux
I'm using the MonoUsbDevice Class with is part of LibUsbDotNet.LudnMonoLibUsb.
I can remap all the commands that I use on windows and everything's going well included streaming with bulk EP Except the Reconnect.
In Windows CyUSB.net, The Reconnect command is part of the CyUsbDevice Class.
My question is : I would like to have the Reconnect available on Linux but it is not included in the MonoUsbDevice.
Is there a way to implement and add it to Linux OS ?
NB : I don't want to initiate a Reconnect from the device, only from the host as I do on Windows with CyUsbDevice.Reconnect().
Some news on that issue ?
I am not sure if the linux libraries you have mentioned have this facility. However if you are able to send a vendor specific command this should be possible.
I am understand that you have a concern against performing the reconnect in the device. But I assure you that it should not be a problem. The host will be able to handle this very well.
- Madhu Sudhan
Thanks for the reply but this answer is not really a solution "But I assure you that it should not be a problem. The host will be able to handle this very well."
I understand the only way to implement the reconnect on Linux is to implement that in the device itself upon vendor specific command AND to send this command from the Host.
On my side:
- I know how to handle a vendor command in the device
- I know how to send a vendor command on the host
- I'm not sure which function to use in order to do the disconnect in the device :
- CyFx3BootUsbConnect() from EZ-USB FX3 API linrary ?
- a full µC reset, in this case how to handle it with the SDK ?
Or CyU3PUsbHostPortReset() ?