Gentoo Wiki ArchivesGentoo Wiki

USB

Wikipedia has an article on:
USB

Contents

Introduction

Here's a quote from the excellent Gentoo Linux USB Guide:

What is USB?

USB stands for Universal Serial Bus and is basically an external interface standard that enables communication between the computer and various other peripherals. Some of the most commonly used USB devices today are keyboards, mice, pen drives, digital cameras, external CD & DVD writers, printers etc.

There are currently two versions of USB in use, i.e. USB 1.1 and USB 2.0. Since USB has always been backward compatible with its previous versions, USB 2.0 is backwards compatible with USB 1.1. The latest USB devices are typically USB 2.0 compatible. USB 2.0 supports a maximum data transmission speed of 480 Mbps or 60 MBps and this is the major difference between the two standards. Another advantage with USB is that the devices are all hot-pluggable, which means that you do not have to restart your system in order for you to be able to use these devices.

A Technical Perspective

A USB system has a host controller, hubs, a root hub amongst others and can support up to 127 USB devices including the hubs. The host controller is nothing but the hardware interface between the USB device and the operating system. There are a couple of HCI (Host Controller Interface) in use today and they are the OHCI (Open HCI) by Compaq, UHCI (Universal HCI) and EHCI (Enhanced HCI), both from Intel. The OHCI/UHCI are the two industry standard USB 1.1 interfaces whereas the EHCI is for USB 2.0.

The hardware vendor provides an interface for the programmer that allows the system to interact with the hardware and this is called the HCD or Host Controller Device. It is through this HCD that the device interacts with the system software. The following diagram should make things easier to comprehend.

(Software consists of other components as well like the device driver, but for the sake of simplicity, they are not shown)

   + ----  Hardware  ----   + ----  Software  ---- +
   |                        |                      |
   | [USB Dev] -+-> {EHCI} -+--->  ( EHCD )        |
   |            |           |                      |  User
   |            `-> {UHCI} -+--->  ( UHCD )        |
   |                        |                      |
   + ----  Hardware  ----   + ----  Software  ---- +

A USB device can either use a custom driver or use one already present in the system and this is based on the concept of a device class. This means that if a device belongs to a certain class, then other devices belonging to the same class can make use of the same device driver. Some of these classes are the USB HID (Human Interface Devices) class which covers input devices like keyboards and mice, the USB Mass Storage devices class which covers devices like pen drives, digital cameras, audio players etc and the USB CDC (Communication Devices Class) which essentially covers USB modems and similar devices.

Basic Setup

Kernel Setup

By default all important drivers are activated, so at least input devices and USB sticks and drives works out of the box.

Linux Kernel Configuration:
Device Drivers  --->
    [*] USB support  --->
        <*>   Support for Host-side USB
        [*]     USB device filesystem
        <*>     EHCI HCD (USB 2.0) support
        <*>   OHCI HCD support
        <*>   UHCI HCD (most Intel and VIA) support
        <*>   USB Printer support
        <*>   USB Mass Storage support
        [*]   USB Monitor
    [*] HID Devices  --->
        -*-   Generic HID support
        <*>   USB Human Interface Device (full HID) support

You only need either OHCI or UHCI. If the command lspci | grep UHCI finds some devices, you need only UHCI, if not, you need only OHCI. Also driver for USB Printers or Monitors may be superfluous.

Follow-Ups

See guides in the USB category.

Retrieved from "http://www.gentoo-wiki.info/USB"

Last modified: Fri, 29 Aug 2008 11:46:00 +1000 Hits: 12,701

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.