Previous Section
 < Day Day Up > 
Next Section


PCMCIA Devices

PCMCIA devices are card readers commonly found on laptops to connect devices like modems or wireless cards, although they are becoming standard on many desktop systems as well. The same PCMCIA device can support many different kinds of devices, including network cards, modems, hard disks, and Bluetooth devices. In addition to configuring the PCMCIA card holder itself, you can also configure each particular device you may insert into it, such as a Wireless card. The configurations will be similar to configurations for standard devices connected directly to your system. Check the PCMCIA-HOWTO at the www.tldp.org site for a detailed discussion of PCMCIA cards and their configuration.

Support for PCMCIA devices is managed like a service. Instead of being loaded directly like most device modules, support is loaded by the pcmcia service script, just as services like network or servers are loaded by service scripts. Like other service scripts, the pcmcia script is located in the /etc/rc.d/init.d directory. You can manually enable or disable support using the script with the service command. Like any service, you can use the Service tool or chkconfig to configure pcmcia to run automatically, when your system starts, along with specifying runlevels.

service pcmcia start

On Red Hat, basic configuration is handled by a pcmcia script in the /etc/sysconfig directory, instead of in the /etc directory. Here you can set basic startup options such as PCMCIA to enable pcmcia, PCIC to specify the card interface controller (yenta_socket), and PCIC_OPTS to specify controller options. The CORE_OPTS holds options for the pcmcia_core module and CARDMGR_OPTS holds options for the cardmgr daemon. The SCHEME entry can be used to select a scheme.

Detailed configurations for the different kinds of devices you can attach to a pcmcia device are kept in the /etc/pcmcia directory. Here you will find configuration files for pcmcia wireless, ISDN, serial, SCSI and IDE hard disk, and Bluetooth devices. There are start-up scripts for each along with corresponding options files, such as wireless and wireless.opts, ide and ide.opts, and bluetooth and bluetooth.conf. Each script will hold the commands appropriate for configuring that device, like the wfconfig command for wireless devices, hciattach for Bluetooth, and updfstab for updating partition entries for IDE and SCSI drives. The corresponding option files will hold configuration settings for corresponding kinds of devices. The bluetooth.opts file holds parameters for different kinds of Bluetooth devices, whereas the wireless.opts file lists possible options for different wireless cards. The shared file holds functions used in the various startup scripts, such as add_parts, which will add block devices like a partition on an IDE or SCSI hard disk PCMCIA device, invoking an add_blkdev function, which will check and mount the partition. Many scripts will run the shared script to enable these functions.

You can interchangeably add and remove PCMCIA cards as you wish. They will be recognized from a database of supported cards and configured using their appropriate startup scripts. This task is handled by the cardmgr daemon, which scans for insertion and removal events on the PCMCI device, detecting an added device and automatically loading the appropriate kernel module. The cardmgr tool will generate a /var/lib/pcmcia/stab file, which will list the socket number, device class, driver, and a device number for devices that use the same driver. An stab entry can use the device class to determine which startup configuration script to use for that device.

You can obtain information about a PCMCIA device with the cardctl command, as well as manually eject and insert a device. The status, config, and ident options will display the device's socket status and configuration, and the identification of the device. The insert and eject option will let you add and remove a device. The cardinfo command also provides device information.

It is not advisable to hot swap IDE or SCSI devices. For these you should first manually shutdown the device using the cardctl command.

cardctl eject

All PCMCIA configurations support the use of schemes, which let you specify different sets of settings for your devices. For example, for an Ethernet device you could have one set of settings to use at the office and one to use at home. For the office settings you could create an office scheme and for the home settings, a home scheme. When starting up the device you can specify which scheme to use. You can find out the current scheme in use with the cardctl command and the scheme option with no argument. To change to a certain scheme you supply the scheme argument, which will change the scheme for that device.

cardctl scheme home


Previous Section
 < Day Day Up > 
Next Section
This HTML Help has been published using the chm2web software.