Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Expand your laptop's capabilities through the use of PCMCIA cards.
Most laptops have PCMCIA (also called PC Card) slots for card-based expansion. Under Windows, before you install a PCMCIA card, you usually have to install a software driver in order for the card to operate. Under Ubuntu Linux, however, the drivers are typically built into the operating system, shipped as kernel modules. It's the job of the PCMCIA subsystem to load and unload these modules when a card is inserted.
Usually, you don't need to do anything more than insert a card for the system to recognize it and load the proper driver. If you open a terminal window and examine the system log, you can see the card-insertion event and note what driver the PCMCIA subsystem loads. The system log will also show what new devices were created for that particular card. You can view the log with the command tail -f /var/log/messages.
Here, we are inserting a 3Com 10/100 Ethernet adapter into our laptop's PCMCIA slot while monitoring the log:
Mar 8 23:54:19 localhost kernel: [4554419.074000] PCI: Enabling device 0000:02:00.0 (0000 -> 0003) Mar 8 23:54:19 localhost kernel: [4554419.074000] ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11 Mar 8 23:54:19 localhost kernel: [4554419.074000] 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html Mar 8 23:54:19 localhost kernel: [4554419.074000] 0000:02:00.0: 3Com PCI 3CCFE575BT Cyclone CardBus at 0x4000. Vers LK1.1.19 Mar 8 23:54:19 localhost pci.agent[17859]: 3c59x: loaded successfully Mar 8 23:54:19 localhost kernel: [4554419.155000] ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
Once the driver is loaded, we can address this device via /dev/eth2.
Some combination cards are also supported. In this example, we're inserting a 10/100 Ethernet card and 56K modem combo card:
Mar 8 23:57:29 localhost kernel: [4554609.400000] eth2: NE2000 (DL10019 rev 05): io 0x300, irq 11, hw_addr 00:E0:98:90:D5:3C Mar 8 23:57:29 localhost kernel: [4554609.442000] ttyS1 at I/O 0x2f8 (irq = 11) is a 16550A
The Ethernet portion of the card is addressable as /dev/eth2 on this machine, and the 56K modem is addressable as /dev/ttyS1.
Some wireless cards, such as the classic Orinoco and Prism 2/3-based adapters, are also supported by the PCMCIA subsystem out of the box. In this case, we inserted an Orinoco adapter. It's also addressable as /dev/eth2:
Mar 8 23:59:40 localhost kernel: [4554740.196000] eth2: New link status: Connected (0001)
Ubuntu even supports pretty obscure devices. We own an old Iomega Clik PCMCIA 40 MB hard disk and a Socket Communications serial card. Both devices work great under Ubuntu. The Clik drive is mountable as /dev/hdc4, and the serial card shows up as /dev/ttyS0.
Mar 9 00:10:57 localhost kernel: [4555416.871000] hdc: IOMEGA Clik! 40 CZ ATAPI, ATAPI cdrom or floppy?, assuming FLOPPY drive Mar 9 00:10:57 localhost kernel: [4555417.177000] ide1 at 0x180-0x187,0x386 on irq 3 Mar 9 00:10:57 localhost kernel: [4555417.182000] hdc: 39441kB, 78882 blocks, 512 sector size Mar 9 00:10:58 localhost kernel: [4555417.185000] /dev/ide/host1/bus0/target0/lun0: p4 Mar 9 00:10:58 localhost kernel: [4555418.047000] ide-cs: hdc: Vcc = 5.0, Vpp = 0.0 Mar 9 00:11:29 localhost kernel: [4555449.006000] ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A
Just about any device you can put in a PCMCIA slot will work just great under Ubuntu (although some wireless cards need an extra configuration step [Hack #41]). Give it a shot!