|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Monday, 15 May 2000||Author: Luke Groeninger|
|Published to: In-Depth Reports/In-Depth Reports||Page: 1/1 - [Printable]|
The Linux USB Project
The Linux USB Project, originally started in early 1999, is currently the definitive USB stack for Linux. Originally based upon a debug USB mouse driver that Linus wrote and released March 30, 1999, it rapidly progressed into a state of acceptable maturity.
|Page 1 of 1|
The Linux USB Project, originally started in early 1999, is currently the definitive USB stack for Linux. Originally based upon a debug USB mouse driver that Linus wrote and released March 30, 1999, it rapidly progressed into a state of acceptable maturity. The current version supports much more than the UHCI controller and USB mouse combination supported by this early implementation, and has become a part of the latest kernel releases.
Throughout the summer of 1999, development expanded, adding support for OCHI compliant controllers, HID keyboards, mice and preliminary storage, audio and video support. Recently, some of the biggest changes have come from the switch over from a synchronous driver to an asynchronous driver. This is also known as the URB change over, and has allowed for easier interfacing between the device drivers and the USB stack.
Even though they have kept affected source code inside their own directory, the Linux USB Project promises to bring about changes in the kernel. To properly utilize the full capabilities of USB, the drivers all had to be written to allow hot connecting and disconnecting. While this works great for hardware that is not being used all the time, peripherals such as mice where the mouse server, which usually loads at boot time, will refuse to run if it cannot find a mouse. Resulting hacks in the mouse driver allow this to work (by keeping the driver open even if no mouse is connected), but other hardware is not as easy. Linux drivers have never particularly liked the hot-swapping of hardware, which the USB spec is designed for.
On the other hand, the information that they have learned will impact the kernel eventually. The hot-swap capabilities of the CardBus drivers were based on the Linux USB concepts, and a rewrite of the input handling will probably be required later so that some device drivers are not such ugly hack, perhaps even adding support for multiple independent keyboards to be used at the same time.
While the drivers are stabilizing and new device support is being added, the drivers can only go so far. While most vendors do choose to go with the standard classes, it is possible to make a device not conform to any standard class. Unfortunately, these devices cannot be supported by the Linux USB project, unless the manufacture chooses to open the protocols used to the public (or at least a willing Linux developer). While it is possible to reverse engineer nonstandard protocols, it requires very expensive USB analyzers, which cost more than $10k.
The stack that the Linux USB Project has produced has proven to be stable for me. By downloading and compiling support for it into the latest developers kernel, I was able to run both my keyboard and mouse in a pure USB environment without any problems. The keyboard patches into the standard keyboard driver, and for the mouse /dev/mouse had to be linked to a new device so that it would talk to the USB mouse driver instead of the PS/2 mouse port. While this is not difficult to set up USB support, it does require running an unstable kernel, which I do not recommend for new users.
While none of the current distributions include USB support, look for support to be included in kernel 2.4.x. Look for distributions based on this elusive next release of the kernel to include out-of-box support for not only USB keyboards and mice, but hopefully audio, video camera and storage support as well.
For those of you who want to help the project out, start by visiting The Linux USB Project Homepage and the Linux USB SourceForge page. Of course, the only way to really stay on top of the development is to join the Linux USB mailing list by sending an e-mail to firstname.lastname@example.org.
While the impact on Linux as a whole is not great, the Linux USB Project will probably have long lasting repercussions on the kernel. Even though the drivers are still considered unstable, they are for the most part stable and work well enough to be used. While I would avoid it for a production level computer, if you are willing to work with some bugs this project I would highly recommend it. Hopefully, the problems with vendors not releasing specs will be resolved, and development on those devices will start.
Luke Groeninger, the Linux.com Hardware Correspondent, can be reached at email@example.com with questions, comments, and suggestions. Luke currently is savoring the upcoming break from school and getting better acquainted with the local LUG.
|Page 1 of 1|