Comments on installing the ISA WLAN software:
---------------------------------------------

  Eventually the ISA and PCMCIA code are going to be merged, until
  that moment this setup is needed.

  History:  14-jun-99   Created - Peter Teuben
            14-jun-99   commented on non-PnP cards,  pcmcia locations
            15-jun-99   added notes from Adrian Perez Jorge, fixed
			bug in driver to make it work in 2.0.37
            28-jun-99   added ISOLATE.EXE and comments, changed tar names
            17-jul-99   merged in Adrian's code changes for stable rmmod
             5-sep-99   documented suse and double card 
            14-sep-99   documented power supply problems

  References:   
	http://www.absoval.com/linux-wlan/index.html        Linux WLAN
        ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs-3.0.9.tar.gz  -- old --
        ftp://pcmcia.sourceforge.org/pcmcia/pcmcia-cs-3.1.2.tar.gz  -- new --
        http://www.infotechsrl.it
        ftp://ftp.astro.umd.edu/pub/teuben/wlan-isa.tar     (THESE FILES)
	http://www.ydi.com/download.htm			    (THESE FILES)
		(note that YDI sometimes trails a version with mine)
	http://www.asdf.demon.co.uk/linnet//                LINNET
	http://www.linuxrouter.org/                         Linux Router Project


NOTE: Please read this file carefully, it explains the current status of
the ISA version, it's caveats, and what we are working on. There are
some example scripts, and this file guides you through the install
process. For somebody somewhat familiar with linux setup, it should not
be very hard. The comments in this file are mostly distribution "free",
so you may have to translate them to your specific case.


In this directory you will find a slightly modified version of the
PCMCIA version of the WLAN software. The latest stable release for
PCMCIA cards itself, as of this writing (June 14, 1999), was
linux-wlan-0.2.6.tar.gz. Mark Mathews has released a 0.3.1
experimental/beta release,and is working hard on 0.3.2 and this should
be coming  out soon. However, I have not tried compiling this version in
ISA mode.  The file you will need here is linux-wlan-isa-0.2.6.tar.gz
My patches will append a letter to 0.2.6, e.g. 0.2.6a would be the
first patch, etc.

So far, I have installed the ISA version on two different distributions,
a Slackware 4.0 and a Redhat 6.0, both running 2.2.x kernels. With the
first patch, the ISA code also runs on 2.0.37. I'll confirm 2.0.36 later
on. The code did not run clean on a fresh SuSe 6.1 distribution, in fact, 
the wlanctl program coredumps, and of course networking setup fails. 


Basically you will see the following things below:

   * installing the WLAN software
   * make your WLAN card PnP aware
   * activate the card and install the networking software


- make sure you have pcmcia installed, or at least source code available.

  In Redhat you will find the code in /usr/src/linux/pcmcia-cs-3.0.9
  (or perhaps a more recent version). In Slackware it may be in 
  /usr/src instead. 
  If you don't have the latest pcmcia code, go and get it from

	ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs-3.0.9.tar.gz

  (3.0.12 should be fine too, except  my current installations have only
   tested 3.0.9)

  and install the PCMCIA drivers in /usr/src:

	tar -C /usr/src -zxf pcmcia-cs-3.0.9.tar.gz


  If you have never installed the code, you need to create a "dummy" config.h
  file, in order for the WLAN software to compile. Simply do this:
  
	cd /usr/src/pcmcia-cs-3.0.9
        make config
		Linux source directory [/usr/src/linux]:
		Alternate target install directory []:
		Module install directory [/lib/modules/2.2.7]:
		C compiler name [gcc]: 
		....
		How would you like to set kernel-specific options?
		    1 - Read from the currently running kernel
		    2 - Read from the Linux source tree
		    3 - Set each option by hand (experts only!)
		Enter option (1-3) [1]: 

   Probably the only important entries are that linux source directory, and
   the modules insttall directory, and of course the kernel specific options
   should be from the currently running kernel [option 1], although any
   should do if you know what you are doing.


- install the source code for wlan (or whatever tar.gz file comes with this
  release:

	tar -C /usr/src -zxf linux-wlan-isa-0.2.6.tar.gz
	cd /usr/src
	ln -s linux-wlan-isa-0.2.6 wlan
	cd wlan

- edit the config.mk file in wlan (this example is from rehdat 6.0)

	LINUX = /usr/src/linux				<-- make sure
	PCMCIA = /usr/src/linux/pcmcia-cs-3.0.9		<--   these are
	UTS_RELEASE=2.2.5				<--      all ok
        MODULES_DIR=/lib/modules/2.2.5-15               <--    ** new **
	INST_EXEDIR=/sbin
	DESTDIR=


			(you can check your the UTS_RELEASE in
			/usr/include/linux/version.h)
			Just make sure they are all ok.
  You can also use

	UTS_RELEASE=`uname -r`

  if you want to make it see the kernel version automatically.

  The MODULES_DIR is only showing up in the new 0.3.x series., otherwise
  it will just assume /lib/modules/$UTS_RELEASE

- now compile and install the code in the wlan directory:

        make all
        make install

  this should have installed the /sbin/wlanctl program, as well as your
  isa module in /lib/modules/$UTS_RELEASE/pcmcia/am930_isa.o


- you probably should do
        depmod -a
  to double check if there are not some worrysome module dependancy problems.


- Your WLAN card is a PnP card, and I assume you know how to install those.

  If not, you can skip this section, but somehow you need to figure out
  what the IRQ and IOBASE of your card are.

  Before you install the card, check out your /proc/interrupts and
  /proc/ioports files. Maybe make a logfile of them.
  Also helpful is reading the PnP HOWTO in the Linux Documentation Project
  (LPD).
  First of all, it's probably best to turn PnP on in your BIOS.
  Next, you need to run pnpdump to detect your devices:

	pnpdump > /tmp/isapnp.conf

  Inspect this file, and one of your card should read something like

	# Card 2: (serial identifier b7 f8 06 64 f0 c9 30 96 04)
	# Vendor Id ADV30c9, Serial Number 4161168624, checksum 0xB7.
	...
	#  (IO 0 (SIZE 16) (BASE 0x0240))
	...
	# (INT 0 (IRQ 9 (MODE +E)))
	# (NAME "ADV30c9/4161168624[0]{AMD PCnet-Mobile    }")
	# (ACT Y)

  You can see this card can run at IRQ 9 and IO address 0x240. So, commment
  out those last 4 lines, and put this file in /etc/isapnp.conf, and activate
  it (normally your boot process will do this if it finds a /etc/isapnp.conf
  file):

	isapnp /etc/isapnp.conf

  and you should see no problems with this install. If you do, make sure
  you don't have IRQ and/or IO conflict, by inspecting
	/proc/interrupts
  and
	/proc/ioports
  In my case I had to reconfigure my ethernet card to use another IRQ from
  the 9 that the WLAN appeared to like to use.

  The accompanying program ISOLATE.EXE can be run from a DOS environment
  (perhaps even DOSEMU, but that needs to be confirmed), and bypass the problem
  that on some BIOS versions (e.g. AWARD PnP BIOS v4.51) the IO Port is 
  allocated, but the IRQ is not. WindowsNT does not like this behavior, however
  linux can probably live through the isapnp.conf file.

  Formally though isapnp.conf should be able to configure the card, but if
  you have problems, you may want to try ISOLATE.EXE to enter the
  IRQ/IOBASE on the card


- Now insert the module, using the IRQ and IOBASE derived from the previous
  step:

	insmod am930_isa am930_irq=9 am930_iobase=0x240

  but sometimes it's needed to manually insert this

	cd /lib/modules/2.2.7/pcmcia
	insmod ./am930_isa.o am930_irq=9 am930_iobase=0x240

  if module dependancies have not been properly registered.

  CAVEAT: Be very careful, currently the "rmmod" command *may* crash your 
  machine. Count on rebooting if you must *rmmod* this module for some reason. 
  We are working on solving this. If you must rmmod, better "umount -a" all
  unimportant devices.


- Now the WLAN network can be installed. Here's a manual example of
  this (assuming this is in bash-shell notation)

    E=eth1

    IP=192.168.2.31         <-  your IP
    BC=192.168.2.255
    NM=255.255.255.0        <- C-class network
    NW=192.168.2.0


    #  note here we are using channel 6 !

    wlanctl $E scan 1 11 100 ff:ff:ff:ff:ff:ff both active
    sleep 2
    wlanctl $E netlist
    wlanctl $E bsscreate  6 300 0 WLAN_AVS

    # start up the network (this is normally
    ifconfig $E $IP broadcast $BC netmask $NM 
    # on kernel 2.2 don't need to route, ifconfig does it, on 2.0 we do need it
    #route add -net $NW  netmask $NM $E


- You can find some of this setup in the attached file rc.wlan. You can
  tailor your file and put it in /etc/rc.d, and for example let /etc/rc.local
  execute this file at boot time.

  One extra thing you probably want to do it set routing from eth1 (the wlan
  in my case) through the eth1/eth0 gateway to the internet, assuming that
  that gateway had its routing setup properly. This way you can directly
  acccess the internet from any wlan machine. To visualize, my home setup
  is as follows:

           (ISP)
            ppp0
               \
                +------------+-----------+-----     
192.168.1.x    28           31          13              local ether-net
                             |
                             |
                             |
192.168.2.x                 31                5         2.4GHz wlan-net
                        ~~~~~+~~~~~~~~~~~~~~~~+~~~~~~~~


    E.g. on 192.168.2.5 you need to setup another routing entry to get to
    192.168.1.28 network, e.g. on 192.168.2.5
	route -add net 192.168.1.0 gw 192.168.2.31
    Equally so, you must tell the other machines how to get back to close
    the loop, e.g. on 192.168.1.28;
	route -add net 192.168.2.0 gw 192.168.1.31
	
    In redhat you would just add a static route, which "ifup" would 
    automatically pick up. In slackware you will have to add some
    manual routing to /etc/rc.d/rc.inet1

    See network.ps for a graphics layout of my home network.


- Known problems - anecdotal.

  * SuSe 6.1 gave me serious problems, code compiles but coredumps
    Suse 6.2 code compiles fine, but pnpdump crashed machine
  * rmmod may crash your machine -- probably solved ?? --
  * ftp large files can hang the device, and some problems have been
    seen on PC-card transfers also.
  * 

- 
  

Please feel free to send me email with questions (or patches):

Peter Teuben
teuben@astro.umd.edu


Young Design, Inc.* 308 Hillwood Avenue * Falls Church, VA 22046
Tel: 703-237-9090 * Fax: 703-237-9092
If you have comments or questions about this page, e-mail: marketing@ydi.com