Managing PCMCIA


Mobile Linux users take advantage of notebook PCMCIA slots to add 70-pin, credit-card-sized devices to support ethernet LAN connectivity, wireless operations, FireWire devices, CompactFlash hard drives, external storage devices, serial ports, and modems. Many different types of PCMCIA cards and CompactFlash form-factor cards in a PCMCIA caddy are supported by the Linux kernel and David Hinds's Card Services software.

Power is provided to PCMCIA devices and adapters directly through the card slot, although some external hardware might require an additional power source. PCMCIA support is enabled and configured at boot time. With the newer Linux kernels, however, support is provided by kernel modules or direct Linux kernel support.

Using PCMCIA

The PCMCIA Card Services software provides diagnostic information by one or more high or low beeps upon card insertion. One high and one low beep indicate that a card is recognized but failed to be configured. A single beep indicates that the card was only recognized. Two high beeps indicate that a card was recognized and configured.

For example, if you use a CompactFlash storage device and insert it into your notebook while using Ubuntu, you should hear two high beeps. You can then check to see what device has been assigned to the card by using the dmesg command:

$ dmesg ... hde: SunDisk SDCFB-8, ATA DISK drive ide2 at 0x100-0x107,0x10e on irq 3 ide-floppy driver 0.99.newide hde: 15680 sectors (8 MB) w/1KiB Cache, CHS=245/2/32  hde: hde1 ... 


Not all the output is shown here (and yours might look different), but this example shows that the card has been recognized and configured as the /dev/hde device (with a single partition, /dev/hde1). You can then use the device as any other storage medium.

Other devices can be similarly recognized and configured. For example, if you have a combination ethernet and modem PCMCIA card and insert it into your notebook, you should hear two sets of high beeps (to indicate successful recognition and configuration of the network interface and modem). The Linux kernel will report the interface and device information:

$ dmesg ... eth0: NE2000 (DL10019 rev 05): io 0x300, irq 3, hw_addr 00:E0:98:06:84:C5 ttyS04 at port 0x0af8 (irq = 3) is a 16450 .. 


Here, the network interface has been recognized as eth0 (see Chapter 18, to see how to connect to a network). The modem is configured to use /dev/ttyS04.

Again, troubleshooting problems with PCMCIA cards can be difficult, especially with the explosion in popularity and type of 802.11b/g wireless networking cards. Such troubleshooting is likely to require downloading, building, and installing new drivers.

Fortunately, however, nearly all serial, modem, and CompactFlash storage cards are easily recognized and configured. Many ethernet cards are also supported. To check on the current support status for many cards, read the file SUPPORTED.CARDS. You will find a copy under the /usr/share/doc/pcmciautils/ directory.

Note

If you have trouble configuring and using a PCMCIA card, browse to the Linux PCMCIA home page at http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html/. Click the Known Problems link to see whether other users with the same card are having problems or whether the card is not fully supported. If a new version of the PCMCIA kernel drivers is available and changes have been made to your card's drivers (or if a new driver has been developed), download and install the newer software.


Controlling PCMCIA Service

Although PCMCIA cards can be inserted or removed while using Ubuntu, be careful when using these cards. For example, do not remove a network card while connected to a remote computer. Do not pull a CompactFlash card or other storage media card (such as an IBM microdrive) while the card's file system is mounted and in useyou could corrupt the media's file system and experience data loss.

You can control a PCMCIA device from the command line and insert and remove the card without physically removing and then inserting the card. Use the cardctl command to control PCMCIA service to one or more card slots on your notebook or desktop PC with a PCMCIA adapter. The cardctl command is used to get and print information about an inserted card, suspend or resume power to a card, reset a card, perform a software insertion or removal, or to configure a card according to a particular, predefined scheme (such as using a network in the office or at home). The format of the command is cardctl command slot_number (such as 0 or 1).

For example, if you have inserted a CompactFlash card, eject the card (after unmounting its file system) using the cardctl command and its eject option, along with the card's slot number, as follows:

# cardctl eject 0 


This can save power when running a notebook. When the card is needed again, you can subsequently "insert" the card like so:

# cardctl insert 0 




Ubuntu Unleashed
Ubuntu Unleashed 2011 Edition: Covering 10.10 and 11.04 (6th Edition)
ISBN: 0672333449
EAN: 2147483647
Year: 2006
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net