On 08/08/2016 09:11 AM, Greg KH wrote: > On Sun, Aug 07, 2016 at 06:55:36PM +0200, stéphane bryant wrote: >> Hi >> >> We are working on a project where a user-space application (a device >> emulator) creates a USB device on the host machine (thus allowing the >> emulated device to emulate a USB slave and to act as a usb dongle on the >> host machine). >> We have done this using usbip so far, but we'd rather do it directly: >> for that envision to have a vhci_hcd kernel module driver, with hooks to >> the user-space to set-up the device & handle the data. > > Why not just use the CONFIG_USB_DUMMY_HCD and use the existing userspace > USB gadget interfaces? That's traditionally how that code is used. > > Why do you want a userspace program to emulate a USB device in a > different way from this? > Emulating a device using dummy_hcd, as Greg said, is a probably the best way if you use single machine. If you would like to pass this emulated device to other machines there is a vudc driver (UDC for usb/ip protocol) which allows you to emulate the device and connect it to any computer in the network. Best regards -- Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html