GIDNetwork > Linux on Dell Precision M90 - Part VII: Peripherals
« GUI design in Python More OOP in Python »

Linux on Dell Precision M90 - Part VII: Peripherals

by: dsmith - Jun 11, 2006

This section of the document describes the setup and basic use of peripheral devices in Linux, including USB devices, SD Card Reader, Express Card Port and a basic overview of printing. This is written specifically for the Dell Precision M90 running Slackware, but could apply generically to about any linux setup.

USB Setup/Use

Basic USB support is pretty much the standard in Linux. Most default kernel configurations and distributions have the necessary items included for basic USB support. I did not have to do any base USB configuration with the default Slackware kernel or the new updated kernel. Just in case though, here is the lspci output related to the USB system on my Dell Precision:

Generic Code Example:

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

As you can see, the M90 uses both the UHCI driver and EHCI driver. For basic USB support, including most generic input devices and flash drives, the following kernel settings should be sufficient:

Generic Code Example:

Device Drivers -->
	USB Support -->
		Support for Host-side USB
		EHCI HCD (USB 2.0) support
		UHCI HCD support
		USB Mass Storage Support
		USB Human Interface Device Support -->
			HID input layer support
		USB Monitor

For flash drives or any mass storage USB device, it may be a good idea to make these user mountable. This can be done by adding it to the fstab:

Generic Code Example:

/dev/sdb1	/mnt/usb1	auto	noauto,user	0 0
/dev/sdc1	/mnt/usb2	auto	noauto,user	0 0
/dev/sdd1	/mnt/usb3	auto	noauto,user	0 0

Notice that I have three USB devices. These are becoming so popular that it is quite likely that you may have up to three (and even more) plugged in at the same time. They will simply be assigned in the order in which they are plugged in. With this added, any user can simply type: mount /mnt/usb1 to place the drive at the mount point with full permissions for that user in filesystems where permissions are implied (ie FAT). In addition, only the user that mounted the drive (and root of course) can unmount the drive.

There is also a mount option called users that will do the same as above, but give permissions to all users and allow unmounting by any user.

Most Digital Cameras

I had always thought that cameras simply would be recognized as a USB mass storage device. I have never used one before under Linux, but I was surprised to find out that this is not the case. There are several that do have a mass storage type link, but most of the cameras use the Picture Transfer Protocol (PTP). For a list of cameras and their associated transfer protocol, I found this site to be extremely informative.

A camera with PTP will not mount like a mass storage device natively. However, there is a slick program called gphoto2, that is both easy to set up and easy to use.

Step 1: Get Software
Visit the above link for gphoto2. You will need at least the following two items:

  • libgphoto2

  • gphoto2

Step 2: Install Software
These are tarballs, so the hopefully very familiar install instructions apply:

Generic Code Example:

tar zvfx package.tar.gz (or tar jxvf package.tar.bz2)
cd package
make install

Install the library first and then gphoto2. The one thing to make sure of is that PKG_CONFIG_PATH is set before trying to make the command line interface, gphoto2. This can be done with the following command:

Generic Code Example:


Step 3: Use Software
gphoto2 is the command line interface for the library. It is quite simple to use and seems to do about everything that I could want to do with the camera. Here is a quick overview of four functions:

  • gphoto2 --help: Lists a full listing of gphoto2 usage.

  • gphoto2 --list-files: Lists all files on the camera.

  • gphoto2 --get-all-files: Gets all files from the camera and places them in the current directory.

  • gphoto2 --delete-all-files: Deletes all files from the camera.

The really cool thing about this little gphoto2, is that writing a little bash script would be simple and you could do about anything you wanted. If you really want to get GUI, there is a GTK program on the gphoto2 website and there are probably others as well.

Media Ports - SD Card Reader

The Dell Precision M90 comes with a great multi-use card reader built right into the laptop. The following is an lspci listing as it related to the card reader:

Generic Code Example:

03:01.1 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
03:01.2 System peripheral: Ricoh Co Ltd: Unknown device 0843 (rev 01)
03:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)
03:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)

Up to and including the 2.6.16 kernels, there is no support for the Ricoh SD card reader. As of this writing, the latest stable kernel was the 2.6.16 kernel. If you are using a kernel above 2.6.16, then you can most likely ignore the rest of this as support should be included with the 2.6.17 kernel and above. There are several options to get this working. The first is to visit the sdhci website. They have developed a driver that works very well with this card. You will need to apply a patch to your current kernel to do this. I did not use this option, as I struggled to find the latest driver from their site. I believe that it may be buried in the mailing list discussion.

The second option, is to grab the latest prepatch for the kernel. Now this is true cutting edge :). My tutorial on upgrading the kernel will give specific details, so I will just skim the basics here.

Step 1: Download the kernel and patch
Pre-patches can only be applied to the previous full release with the 3 number pair. So, you will need to get the full release of 2.6.16 as well as the latest pre-patch (2.6.17-rc4) from the linux kernel repository. Note that you will need to go into the archives in order to get the 2.6.16 kernel.

Step 2: Make new kernel
I am going to give the basic overview of the steps here making a lot of assumptions that you may need to change in order to get this to work. For more detailed instructions, refer to the Linux Kernel Upgrade tutorial above.

Generic Code Example:

cd /usr/src
tar jxvf linux-2.6.16.tar.bz2
bunzip2 patch-2.6.17-rc4.bz2
cd linux-2.6.16
patch -p1<../patch-2.6.17-rc4.bz2
cp ../linux/.config ./
make oldconfig
cd ..
mv linux-2.6.16 linux-2.6.17-rc4
ln -s linux-2.6.17-rc4 linux
cd linux
make xconfig

That should get you a cutting edge kernel with the configuration based on your previous kernel. It may not be a bad idea to verify that some of the key elements of your kernel configuration are still in tact. In addition, to get the sdhci driver, enable the following:

Generic Code Example:

Device Drivers -->
	MMC/SD Card support -->
		MMC Support -->
			MMC block device driver
			Secure Digital Host Controller Interface Support

Whenever, I am experimenting with a new kernel, I always keep my old one in my lilo boot menu just in case. After I am comfortable with it, then I update the lilo.conf file to remove it. Once you make your kernel and reboot with it, you will need to remake any of the special drivers (ie: Nvidia, sound, wireless) that were compiled outside the kernel. You will need to do a complete re-make of these items as this is a different kernel.

Step 3: Use your SD card
When you plug in your sdcard, it should be recognized now by the system. To confirm this, type dmesg right after inserting the card. You should see something like:

Generic Code Example:

mmcblk0: mmc0:6b41 SD512 500224KiB
mmcblk0: p1

If not, you have done something wrong or perhaps don't have the Ricoh card reader. You should be able to mount the card now as a normal drive:

Generic Code Example:

mount /dev/mmcblk0p1 /mnt/sd

Similar to the usb mass storage device, you may want to add an entry to the fstab file to allow this card to be mounted by the user:

Generic Code Example:

/dev/mmcblk0p1	/mnt/sd		auto	noauto,user	0 0

Express Card Port

What I originally thought was a PCMCIA card slot is actually an Express Card slot.

The best information that I could obtain about linux support for the express card slot came from this thinkpad site. If this is similar on the M90, then support for both the PCI express and USB should allow this port to work without any additional setup.

Whether or not a particular ExpressCard will work may be a different story. This is a fairly new I/O device (in fact this is the first that I have heard about it) and information is not readily available for it. I am not even sure where this device is located in the lspci listing. If I had a ExpressCard or ever get one, I am sure that it would be quite simple to find out.

My best guess, is that this device is apparently working under either the USB bus or the PCI-Express bus.


Printing... the final frontier. Printing has historically been the one area in which Linux support is noticeably lagging. At least with the introduction of CUPS (the Common Unix Printing System), the setup procedure for printers has been drastically improved.

As long as CUPS is installed, you can install your printer through the KDE Control Center in a similar method as to windows. This utility will allow you to browse for a network printer as well as set printing restrictions for the printer. Setup is easy and straight forward.

The downside is the driver support for printers in Linux. If you are going to buy a printer to use with Linux, my advice is to do some research prior to your purchase and do not base it upon manufacturers propaganda. Several years ago "linux" was a buzz word that every manufacturer was using. Unfortunately, in my experience at least, this was simply lip service. Of four printers that I tried to find drivers for, I was only able to get drivers for one printer, which was an HP-8550 Color Laser Jet. If you are going to buy a printer or are wondering if your current printer will work under Linux, visit the Cups Printer Compatibility List. There are hundreds of supported printers. Unfortunately, there are many more printers that are not supported.

That covers a portion of hooking up external devices to your Linux system. Obviously there are many more peripherals available. Generally more common external devices are going to be easily installed on linux. Unfortunately, manufacturer support for these devices is non-existent and it is only thanks to the talents and efforts of the linux community that these things work at all.

Would you like to comment? This story has been viewed 19,893 times.
« GUI design in Python More OOP in Python »


Copyright © GIDNetwork™ 2001 - 2018

Another website by J de Silva

Page generated in : 0.03396 sec.