Digicom Tintoretto LAN Plus ISDN LAN Modem Instrukcja Użytkownika Strona 2

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 7
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 1
and keyboard. As before, knowledge of the Univer-
sal Serial Bus and the Linux USB driver architecture is
necessary when operating scanners, printers and
multimedia devices, but as a user of the one of the
abovementioned distributions you do at least save
yourself the kernel installation procedure described
in the box “USB installation and configuration” as
all the necessary driver modules will have been “fac-
tory compiled”.
Kernel modules
The structure and dependencies of the device dri-
vers for the Linux USB system are shown in Figure 2.
The basis for all USB drivers is the combination of
the USB core system (usbcore) with at least one host
controller driver (usb-uhci or usb-ohci). Apart from
the integrated hub driver, the core driver offers the
option of creating an information structure in the
/proc directory (“USB device file system”.) It is with
this in user mode that drivers can also access USB
devices. The usbdevfs also enables tools such as
lsusb to output a list of connected devices (analo-
gous to lspci for plug-in cards in a PCI bus).
After compilation and installation of the mo-
dules the drivers can be integrated as usual into the
current kernel using insmod:
insmod usbcore
insmod usb-uhci # or: insmod usb-ohci
You can check the success of this action with
dmesg. If no USB device is connected, at least the
host controller should signal and output the num-
ber of USB ports detected. Further hubs are also
KNOWHOW USB
50 LINUX MAGAZINE 2 · 2000
USB Principles
The “Universial Serial Bus” has a
strictly hierarchical structure and is
managed by a host controller. The
host uses a master/slave protocol to
communicate with the USB devices
that are connected: in other words all
data transfers are initiated by the
host. USB devices cannot communi-
cate with each other, which is of no
great significance to peripheral
equipment and saves on costs, as the
hardware and software need no
great intelligence. Also, this means
that problems like collision detection
or bus arbitration don't arise. At the
moment, a USB enables a maximum
of 127 devices to be connected, pro-
viding a bandwidth of 12MBit/s via
the four-pole connecting cable (+5V,
ground, data+ and data-), but this
can only be used to 90 per cent
capacity. In the case of the USB 2.0
specification recently shown for the
first time, up to 480MBit/s should be
possible. To enable the synchronisa-
tion of multimedia dataflow, such as
audio or video, USB transactions are
embedded in a frame structure. One
frame lasts exactly 1 ms (12,000 bits).
Normally, the required USB host
controller is integrated into the
motherboard. Older circuit boards
can be retrofitted with suitable PCI
cards. In spite of the multitude of
USB chip sets in existence, the manu-
facturers fortunately stick to two
standards only: the “Universal Host
Controller Interface” (UHCI) devel-
oped by Intel and the “Open Host
Controller Interface” (OHCI) from
Compaq and Microsoft. This makes no
difference for USB device drivers (rather
as in the case of SCSI host adapters.)
What are known as “class specifica-
tions” exist for frequently used USB
devices such as modems, bulk storage,
keyboards, mice, joysticks, monitors,
audio devices, printers and USB-to-IrDA
converters. Therefore, it should be the
case that as many devices as possible with
the same functions will work with the
same driver. Unfortunately, there are no
open class specifications in existence for
webcams, digital cameras, scanners and
USB/RS232 converters and a special driver
is needed as a rule. In the case of Linux
this causes familiar problems.
Although the programming models of
typical USB devices certainly don't display
any technical peculiarities some manufac-
turers are trying not to give out specifica-
tions or will do so only if a non disclosure
agreement is signed. Therefore, the
development of drivers for these devices
is difficult or even downright impossible
and at best only possible with time-con-
suming reverse engineering (with the
help of tools like “USB-Snoopy” and
“Playback” – see “Info” box.)
The functions of USB devices are logi-
cally subdivided into so-called “inter-
faces”. An interface covers all communi-
cation with a particular part of the
device. An interface can have different
operating modes, known as “Alternate
Settings”. Only one alternate setting can
be active at one time. Audio input and
output interfaces, for instance, use alter-
nate settings in order to distinguish dif-
ferent scanning formats. An interface
can include several end points. An end
point is to a certain extent comparable
with a TCP/IP port. End points are, how-
ever, unidirectional, which means that
data can only be transferred in one direc-
tion.
Fig. 1: The world turned
upside down. In reality,
the universal serial bus
has a star structure and
the hubs work physical-
ly like switches. The
drivers communicate
with one another using
the end points of the
interfaces of a device.
Przeglądanie stron 1
1 2 3 4 5 6 7

Komentarze do niniejszej Instrukcji

Brak uwag