Installing a Wireless PC Card with Linux

Abstract

This page covers in short how to set up a Wireless PC Card on SuSE Linux and Debian GNU/Linux distributions.


Table of Contents

1. Software Requirements
2. Distribution specific setup
2.1. SuSE
2.2. Debian
3. Testing
4. Links

Note

This is just a basic configuration to get you started. For more advanced features refer to the respective docs.

All the PCMCIA configuration stuff resides in /etc/pcmcia/. During this walkthrough, the Elsa AirLancer MC-11 PC card, which uses the wvlan_cs driver, is used. You have to adjust these settings for your card accordingly.

First you have to determine the brand and name of your Wireless PC card. You can do this by inserting the card into one of the PCMCIA slots and after that running cardctl ident (the PCMCIA subsystem must already be running for this).

Socket 0:
  product info: "ELSA", "AirLancer MC-11", "Version 01.01", ""
  manfid: 0x0156, 0x0002
  function: 6 (network)
Socket 1:
  no product info available
In /var/log/messages you can see, whether your system already knows the card:
krios cardmgr[129]: initializing socket 1
krios cardmgr[129]: unsupported card in socket 1
krios cardmgr[129]:   product info: "ELSA", "AirLancer MC-11", "Version 01.01", ""
krios cardmgr[129]:   manfid: 0x0156, 0x0002  function: 6 (network)
In this example, the card is unknown to the PCMCIA subsystem, and identified as Elsa AirLancer MC-11. You can lookup which driver is needed for the card in /usr/share/doc/packages/pcmcia/SUPPORTED.CARDS. In this case it's the wvlan_cs driver.

Now edit /etc/pcmcia/config and add the card to the PCMCIA configuration. The file should contain the following lines:

device "wvlan_cs"
  class "network" module "wvlan_cs"

card "ELSA AirLancer MC-11"
  version "ELSA", "AirLancer MC-11"
  bind "wvlan_cs"

Then add/replace the following line to /etc/pcmcia/config.opts:

module "wvlan_cs" opts "network_name=mops"

Network name

The configuration value mops is the current network name. This might change in the future.

In /etc/pcmcia/network.opts just change the value of DCHP to "y". The resulting file should look similar to:

case "$ADDRESS" in
SuSE,*,*,*)
    INFO="This scheme is configured by YaST"
    # Transceiver selection, for some cards -- see 'man ifport'
    IF_PORT=""
    # Use BOOTP (via /sbin/bootpc)? [y/n]
    BOOTP="n"
    # Use DHCP (via /sbin/dhcpcd or /sbin/dhclient)? [y/n]
    DHCP="y" ####### <--------------------------------- CHANGE HERE TO "y"!
    # Use /sbin/pump for BOOTP/DHCP? [y/n]
    PUMP="n"
    # Host's IP address, netmask, network address, broadcast address
    IPADDR=""
    NETMASK=""
    NETWORK=""
    BROADCAST=""
    # Gateway address for static routing
    GATEWAY=""
    # Things to add to /etc/resolv.conf for this interface
    DOMAIN=""
    SEARCH=""
    DNS_1=""
    DNS_2=""
    DNS_3=""
    # NFS mounts, should be listed in /etc/fstab
    MOUNTS=""
    # For IPX interfaces, the frame type and network number
    IPX_FRAME=""
    IPX_NETNUM=""
    # Extra stuff to do after setting up the interface
    start_fn () { return; }
    # Extra stuff to do before shutting down the interface
    stop_fn () { return; }
    ;;

After that, make sure to restart the PCMCIA subsystem, e.g. by using /etc/rc.d/pcmcia stop; /etc/rc.d/pcmcia start:

host:~/# /etc/rc.d/pcmcia stop
PCMCIA: Shutting down services:
PCMCIA: cardinfo is down
PCMCIA: cardmanager is down                                           done
host:~/# /etc/rc.d/pcmcia start
PCMCIA: Starting services:
PCMCIA: using scheme: SuSE
PCMCIA: cardmanager is running                                        done

host:~/# apt-get install pcmcia-cs pcmcia-modules-2.2.19 dhcpcd wireless-tools

[...]
Unpacking dhcp-client (from .../dhcp-client_2.0pl5-5_i386.deb) ...
Selecting previously deselected package pcmcia-cs.
Unpacking pcmcia-cs (from .../pcmcia-cs_3.1.22-0.1potato_i386.deb) ...
Setting up dhcp-client (2.0pl5-5) ...
Setting up pcmcia-cs (3.1.22-0.1potato) ...

[...]
Your PCMCIA network interface has not been configured.
Do you want to configure it now? [y] 
Press Enter here.
This program will create a basic /etc/pcmcia/network.opts file, the
pcmcia-cs package's network adapter configuration file, based on choices
that you make.

A sample network.opts file is supplied in pcmcia-cs; you can edit this
file to match your local network setup.  Refer to the PCMCIA-HOWTO
(usually in /usr/doc/HOWTO/PCMCIA-HOWTO.gz) for a detailed description
of this file's contents.

Before continuing with this program, ensure that you know your host's
network configuration.

Do you want to continue? [y] 
Press Enter here.

Choose a method for obtaining the host's IP address and routing
information
1) Use the BOOTP protocol
2) Use the DHCP protocol
3) Use netenv (from the netenv package)
4) Specify the IP address now (default)
Select option 2 here.
[...]
This program will now write the network.opts file.  Please take care
not to overwrite a previously configured version of this file.

Do you want to write /etc/pcmcia/network.opts? [y] 
Press Enter here.

For configuring the PCMCIA subsystem specific bits in /etc/pcmcia/ the same applies as in the SuSE section. Please, refer to that for more information.

That's it! Now restart the PCMCIA subsystem with /etc/init.d/pcmcia restart.

To test your setup, now re-insert your Wireless card and watch the output of /var/log/messages. It should look similar to:

host cardmgr[951]: initializing socket 0
host cardmgr[951]: socket 0: ELSA AirLancer MC-11
host kernel: cs: memory probe 0xa0000000-0xa0ffffff: clean.
host cardmgr[951]: executing: 'modprobe wvlan_cs network_name=mops'
host kernel: wvlan_cs: WaveLAN/IEEE PCMCIA driver v1.0.4
host kernel: wvlan_cs: (c) Andreas Neuhaus <andy@fasta.fh-dortmund.de>
host kernel: wvlan_cs: index 0x01: Vcc 5.0, irq 3, io 0x0100-0x013f
host kernel: wvlan_cs: Registered netdevice wvlan0
host kernel: wvlan_cs: MAC address on wvlan0 is 00 02 2d 03 b0 c9
host cardmgr[951]: executing: './network start wvlan0'
host dhclient: Internet Software Consortium DHCP Client 2.0pl3
host dhclient: Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
host dhclient: All rights reserved.
host dhclient:
host dhclient: Please contribute if you find this software useful.
host dhclient: For info, please visit http://www.isc.org/dhcp-contrib.html.
host dhclient:
host dhclient: Listening on Socket/wvlan0
host dhclient: Sending on   Socket/wvlan0

Also, now there should be a new network device wvlan0.

host:~/# ifconfig
[...]
wvlan0    Link encap:Ethernet  HWaddr 00:02:2D:x:x:x
          inet addr:x.x.x.x  Bcast:x.x.x.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:3 Base address:0x100

Finally, the DHCP client should already have kicked in and provided you with a IP address, gateway, etc.

host dhclient: DHCPDISCOVER on wvlan0 to 255.255.255.255 port 67 interval 4
host dhclient: DHCPOFFER from x.x.x.x
host dhclient: DHCPREQUEST on wvlan0 to 255.255.255.255 port 67
host dhclient: DHCPACK from x.x.x.x
host dhclient: bound to x.x.x.x -- renewal in 3600 seconds.

Now try pinging various computers, e.g. the gateway, etc. and see if it works. If not, check your routing tables and your card's signal reception strength. You can see this in /proc/net/wireless:

Inter-| sta-|   Quality        |   Discarded packets
 face | tus | link level noise |  nwid  crypt   misc
wvlan0: 0000   28.  190.  162.       0      0      0

You might want to check out other resources of information: