Polishing Your Linux Laptop Setup
In my past laptop oriented articles, I talked about procedures for installing a base Linux system and setting up GNOME 2.2. This time around, I discuss a few odds and ends that did not quite fit those other two articles but definitely deserve further attention.
Wireless networking is an integral advantage to laptop computing. In my situation, I never would have gotten involved with Linux on laptops if wireless networking had not become available. There's nothing quite like browsing the Web from your favorite chair with a cold beverage nearby, the way all computing should be done. For this example, I'm going to set up a Lucent Orinoco 802.11b PCMCIA card. There are many new and old standards in the wireless world, but from what I have seen 802.11b is by far the most popular. Also, you may find it necessary to implement different layers of security if you live in a populated area. Plenty of articles already are written that discuss the complicated world of WiFi security, so I'm not going to dabble in that arena. If you'd like to learn more about WiFi security, check out the Resources at the end of this article, and your questions will be answered.
As with most network device installs, the first thing you need to do is make sure the kernel module or modules are installed for the hardware in question. In the case of the Orinoco, you should have set the following options in your kernel configuration under Network device support. If you have not set these options, you now need to recompile and reinstall the kernel.
Selected - Wireless LAN (non-hamradio)
Module - Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)
Module - Hermes PCMCIA card support
In my case, I also had to enable ISA Bus support for the 16 bit PCMCIA card. This is done under General setup, and the option is [*] ISA bus support. As far as I can tell, this option is new to the 2.4.20 kernel. After reading through many newsgroups and Web searches, it looks like a lot of people have problems with Orinoco cards after upgrading to the 2.4.20 kernel. So make sure that you enable ISA Bus support.
With the kernel modifications complete, the next task is to install the Debian packages needed to access a PCMCIA card. A quick apt-get install wireless-tools and apt-get install pcmcia-cs should grab everything you require. All of the configuration files for PCMCIA can be found in the /etc/pcmcia directory. The three files that need to be manipulated are config, network.opts and wireless.opts.
Let's start by editing the config file. Scroll down to the device orinoco_cs section, and make sure it looks like the following. If any other lines are present in the device "orinoco_cs" section, comment them out.
device "orinoco_cs" class "network" module "hermes", "orinoco", "orinoco_cs"
Next, open up network.opts and alter the TCP/IP values beneath the line # Host's IP address, netmask, network address, broadcast address. These values are the same as if you were configuring a traditional TCP/IP network card. Some may be left null or filled in as needed. As an example, here are the values I used to configure to my local LAN:
IPADDR="192.168.1.4" NETWORK="192.168.1.0" BROADCAST="192.168.1.255" GATEWAY="192.168.1.1" DNS_1="192.168.9.47" DNS_2="192.168.9.48"
Then, open wireless.opts, which contains many options specific to the wireless connection. To simplify my example, I am not going to use any security options. This is not recommended if you live in an urban area, but if you're out in the boonies, I don't think there is anything wrong with letting the local raccoon population get some free Internet access. The only things that need to be changed are two ESSID settings. One of them is under the section commented by Lucent Wavelan IEEE and the other is under Generic example. Under both of these sections, change the ESSID value to any, so it looks like ESSID="any".
If you haven't rebooted yet, now would be a good time to do so, to make sure the PCMCIA services are brought up correctly. During boot you should see something like the following output. If the boot messages scroll too fast, you can check in /var/log/syslog.
cardmgr: watching 1 sockets cardmgr: starting, version is 3.2.2
Once the machine is booted, use tail -f /var/log/syslog to watch the syslog and insert the Orinoco card. If things are set up correctly, you should see something in the log like the following:
cardmgr: socket 0: Lucent Technologies WaveLAN/IEEE Adapter kernel: cs: memory probe 0xa0000000-0xa0ffffff: clean. cardmgr: executing: 'modprobe hermes' kernel: hermes.c: 5 Apr 2002 David Gibson <email@example.com> cardmgr: executing: 'modprobe orinoco' kernel: orinoco.c 0.11b (David Gibson <firstname.lastname@example.org> and others) cardmgr: executing: 'modprobe orinoco_cs' kernel: orinoco_cs.c 0.11b (David Gibson <email@example.com> and others) kernel: eth1: Station identity 001f:0001:0008:0048 kernel: eth1: Looks like a Lucent/Agere firmware version 8.72 kernel: eth1: Ad-hoc demo mode supported kernel: eth1: IEEE standard IBSS ad-hoc mode supported kernel: eth1: WEP supported, 104-bit key kernel: eth1: MAC address 00:02:2D:3A:35:08 kernel: eth1: Station name "HERMES I" kernel: eth1: ready kernel: eth1: index 0x01: Vcc 5.0, irq 3, io 0x0100-0x013f cardmgr: executing: './network start eth1'
When you remove the card you should see
cardmgr: executing: './network stop eth1' cardmgr: executing: 'modprobe -r orinoco_cs' cardmgr: executing: 'modprobe -r orinoco' cardmgr: executing: 'modprobe -r hermes'
At this point you should have a fully functional wireless laptop. The Orinoco card can be removed and inserted as required without a need to reboot or to configure any further. If you have problems, one useful command for troubleshooting PCMCIA issues is cardctl. Using cardctl, you can verify that your card is what you think it is. You also can gather information on the state of the PC card slot in your laptop.
Here's one little trick I'm using. In my case I use my laptop at two primary locations, work and home. When I'm home I use the WiFi card and when I'm at work I use the integrated NIC. At work I have no issues, because I keep the WiFi unplugged so the device is never brought up. But at home, I had a problem: when I used WiFi I had to manually down the integrated NIC, because some applications did not like eth0 being up but not connected to anything. It was not a major issue, but it got to be an annoyance to have to manually ifconfig down eth0 every time I booted the laptop at home. What I did to correct this problem was add the following line to the end of /etc/pcmcia/wireless:
ifconfig eth0 down
This script is executed only when the wireless device is brought up, so it works perfectly. Whenever I insert the Orinoco card, the integrated NIC is disabled.
- My Childhood in a Cigar Box
- Papa's Got a Brand New NAS
- Applied Expert Systems, Inc.'s CleverView for TCP/IP on Linux
- Tech Tip: Really Simple HTTP Server with Python
- Let's Go to Mars with Martian Lander
- Rogue Wave Software's TotalView for HPC and CodeDynamics
- Panther MPC, Inc.'s Panther Alpha
- Simplenote, Simply Awesome!
- NethServer: Linux without All That Linux Stuff