Managing PCMCIA

 < Day Day Up > 

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, Compact Flash hard drives, external storage devices, serial ports, and modems. Many different types of PCMCIA cards and Compact Flash form-factor cards in a PCMCIA caddy are supported by the Linux kernel and David Hinds' 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 according to the /etc/sysconfig/pcmcia file and /etc/rc.d/init.d/pcmcia startup script. The /etc/sysconfig/pcmcia file might look something like

 PCMCIA=yes PCIC=yenta_socket PCIC_OPTS= CORE_OPTS=   

Previous incarnations of Linux distros from Red Hat and PCMCIA used specific controller information in this file. 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 compact flash storage device and insert it into your notebook while using Fedora, 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 may 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 (see Chapter 37, "Managing the File System," for more information on using hard drives with Linux).

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 17, "Network Connectivity," 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 trouble shooting is likely to require downloading, building, and installing new drivers.

Fortunately, however, nearly all serial, modem, and Compact Flash 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/kernel-pcmcia-cs-3.X.XX/ directory (where X.XX is the version of the package) if you install the pcmcia-cs RPM package.

NOTE

If you have trouble configuring and using a PCMCIA card, browse to the Linux PCMCIA home page at http://pcmcia-cs.sourceforge.net/. Click the SUPPORTED.CARDS link to see if your card is supported. Click the known problems link to see if other users with the same card are having problems, or if the card is not fully supported. If a new version of the PCMCIA kernel drivers are 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. See Chapter 38 for information on installing the new PCMCIA modules, or follow the directions included with the PCMCIA software.


Controlling PCMCIA Service

Although PCMCIA cards can be inserted or removed while using Red Hat, be careful when using these cards. For example, do not remove a network card while connected to a remote computer. Don't pull a compact flash card or other storage media card (such as an IBM microdrive) while the card's filesystem is mounted and in use you could corrupt the media's filesystem and experience loss of data.

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 compact flash card, eject the card (after unmounting its filesystem) using the cardctl command and its eject option, along with the card's slot number like this:

 # cardctl eject 0 

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

 # cardctl insert 0 

     < Day Day Up > 


    Red Hat Fedora 4 Unleashed
    Red Hat Fedora 4 Unleashed
    ISBN: 0672327929
    EAN: 2147483647
    Year: 2006
    Pages: 361

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