Skip to content
Advertisement

libusb for USB target user space driver

I would like to implement a USB device driver in user space by means of libusb. I’m using a Linux machine supporting a USB OTG controller which is switched to device mode. The USB host is another machine which needs to communicate with my Linux machine by means of a USB vendor specific interface with a bulk in/out interface.

I would like to know if it is possible to use libusb to communicate with the USB host on the other side. Or, if libusb could be used only for host side functionalities.

If libusb can’t be used is there any other way to implement the device driver in user space?

Thank you.

Advertisement

Answer

As of my knowledge this is not possible. (Vanilla) libusb is only for host usage because the whole process of how to use libusb can only provide this mode.

You can find an answer in the FAQ of the old libusb (before libusbx, the abandoning of the old libusb and the rename of libusbx to the new libusb): libusb FAQ

Also there is a question on SO to this topic with some suggestions: How to communicate with the USB Host from a Linux USB Client

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement