On Wed, Mar 22, 2017 at 02:26:52AM -0700, Greg Hazel wrote:
Hi,
I’m working with Greybus and I’m wondering if there’s any support or code for virtual USB devices.
Yes, the USB virtual controller driver is in the kernel, but you need to have it enabled in your firmware as well, as it passes USB commands from the kernel down to the firmware and then USB device directly.
Note, there are some limits on the size of a USB transaction at the moment, we never got the chance to fix them up, but small transactions (like a keyboard), should work fine. Once you start to get up to 4kb in a transaction, you might have firmware issues.
On one side of Greybus I have a small nuttX environment with a UART connected device which I can write modules for, and on the other side of Greybus I’d like to provide a network interface. I can’t modify that side, so I have to work with the kernel modules it has available. I thought it might be possible to present a virtual USB CDC-EVM to Greybus, and my guess (hope) is that cdc_ether would pick it up on the other side.
Ah, if this isn't really a network device, or modem, I wouldn't mess with cdc-evm. If it is a modem, then it should "just work" with the uart code today, just tell userspace this is a modem and all should be fine.
What exactly do you want userspace to see your device as?
hope this helps,
greg k-h