Linux Usb Device Driver
- Linux Block Device Driver Tutorial
- Linux Usb Device Driver Source Code
- Linux Usb Device Driver Programming
LDT - Linux Driver Template - sample template of Linux device driver for learning and starting source for a custom driver. Implements UART char device driver for example. Uses following Linux facilities: module, platform driver, file operations (read/write, mmap, ioctl, blocking and nonblocking mode, polling), kfifo, completion, interrupt, tasklet, work, kthread, timer, misc device, proc fs, UART 0x3f8, HW loopback, SW loopback, ftracer.
Main kernel source: usb-ohci on Linux 2.2 and 2.4 kernels, ohci-hcd on Linux 2.6 kernels EHCI: Working; mostly stable on 2.6 David Brownell: Main kernel source (2.4.22+, most current is in 2.6); also see USB 2.0 info: CRIS: Under development: Main kernel source (arch/cris/drivers in 2.4, drivers/usb/host in 2.6) SL-811HS. You should consider making a bigger hub, as it seems to be possible to use it as a powersource for usb devices (2Amps of current). For example external usb 2.5 hdd would already take 2 ports, leaving only one free. Or make an usb controlled power source switcher with relays, it would perfectly go as a combo with this usb hub device:). VMware Workstation 4.5. Note: Windows NT and Linux kernels older than 2.2.17 do not support USB. Although your host operating system must support USB, you do not need to install device-specific drivers for your USB devices in the host operating system if you want to use those devices only in the virtual machine. Linux kernel source tree. Contribute to torvalds/linux development by creating an account on GitHub.
My goal is to create a virtual USB char device (not block device) for Linux 2.6.32 and above (I use debian squeeze) that would be recognize by the system.
I would like that this device be listed with lsusb as a normal USB device, and that every application could use libusb in order to open the device, and send control message, and make bulk write/read. But behind this virtual device, it's behavior would be set by my application. I want to set it's product ID, it's vendor ID, answer to USB status, and bulk read.
I've read some posts about how to use USB/IP in order to create a virtual USB device, and that's exactly what I want to doInstallation and emulation of virtual USB Devicehttp://breaking-the-system.blogspot.fr/2014/08/emulating-usb-devices-in-python-with-no.html
Linux Block Device Driver Tutorial
But unfortunately, when I tried with 2.6.32 kernel and above, I didn't succeed making it work. So I looked at how to create a kernel module that would create the virtual device :http://pete.akeo.ie/2011/08/writing-linux-device-driver-for-kernels.html
This one looks great also, but the sample provided doest not indicate how to make it an USB device.I've seen some post talking about it with windows but none that could help me with Linux.
I would like to avoid buying some USB programmable cards when it can be done with software.
Have anyone any leads on how to make the first methods works under newer kernel, or convert the sample code of the second method for making an USB device ?
1 Answer
I have fixed the code of http://breaking-the-system.blogspot.fr/2014/08/emulating-usb-devices-in-python-with-no.html (first method using USB/IP) to work with linux 4.3. Multi messenger app download.
In the original code are missing USB requests like set configuration and get status. Without the implementation of all USB requests used for the OS driver the code will not work.
The fixed code can be downloaded in https://github.com/lcgamboa/USB-Emulation .