Friday, August 13, 2010

Working with Device Drivers

Under Linux, there are a couple of required elements forworkingwith devices. First, you need a kernel driver that can recognize the device. This is usually a low-level driver, such as a parallel port driver for use with parallel printers or USB support (regardless of the USB device).

The second element depends on the type of hardware—some devices need software support for managing the device. The kernel driver only knows how to address the device; the software driver actually speaks the right language. This means that different versions of the same device may speak different languages but communicate over the same kernel driver. Printers are one such example. A printer may use PostScript, HP PCL, oki182, or some other format to communicate data. The kernel driver knows how to send data to the printer, but the software driver knows what data to send. The same is true for most scanners, cameras, pointer devices, and even keyboards.

The final element is the user-level application that accesses the device. This is the program that says ‘‘print’’ or the audio system that says ‘‘play.’’

There are four steps needed before using any device:
1. Install a device driver, if one is not already installed.
2. Create a device handle if one is not created automatically.
3. Load any required software drivers and configuration parameters.
4. Configure applications as necessary for using the device.

In some cases, some or all of these steps are automated. In other cases, devices will need manual configuration.

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: