IPWireless PCMCIA modem Linux Driver - Installation instructions

by Stephen Blackheath <stephen@blacksapphire.com>, and
   Ben Martel <benm@symmetric.co.nz>


REQUIREMENTS

* Linux kernel 2.4.x or 2.6.x, and the corresponding kernel headers.

* pcmcia-cs (PCMCIA card services package)

* pppd (PPP daemon)


BUILDING

1. Set the KERNELDIR environment variable to point to the directory that
   contains the 'include' directory for kernel headers corresponding to your
   currently running kernel, e.g.

     export KERNELDIR=/usr/src/linux

2. Ensure that the version of gcc you are using matches the one with which
   your kernel was built.

     gcc --version
     cat /proc/version

   If they don't match, then point the CC environment variable at the
   correct version of gcc, e.g.

     export CC=gcc-2.95

3. Use 'make' to build it

     make


INSTALLING THE DRIVER

1. Install the kernel module and related files:

     su
     make install


CHECKING THAT THE DRIVER IS INSTALLED CORRECTLY

1. Watch the system messages while you plug the card in

     tail -f /var/log/messages

2. You should see something like this:

     Feb 11 15:45:54 kotuku kernel: ipwireless_cs: 1.0.4 by Stephen Blackheath and Ben Martel
     Feb 11 15:45:54 kotuku kernel: ipwireless_cs: PCMCIA event - card insertion
     Feb 11 15:45:54 kotuku kernel: ipwireless_cs: I/O ports 0x0100-0x010f irq 9
     Feb 11 15:45:54 kotuku kernel: ipwireless_cs: waiting for card to start up...
     Feb 11 15:45:59 kotuku kernel: ipwireless_cs: card is ready.

3. Some devices called ttyIPWp* should have been created in the /dev
   directory when the card was plugged in.  Check that they are there:

     ls -l /dev/ttyIPWp*

   This should have happened automatically - see /etc/pcmcia/serial.opts



CONFIGURING PPPD

  When the modem is plugged in, it will appear on /dev/ttyIPWp0 to
  /dev/ttyIPWp31.  These devices work like serial ports, and the device itself
  behaves like a Hayes-compatible modem.

  If your system uses devfs, then the device names will be /dev/ttyIPWp/0 to
  /dev/ttyIPWp/31.

  Configure pppd to connect using a chat script with these commands:

    AT+CGDCONT=1,"PPP","<network_name>","<user_id>,<password>",0,0
    ATD*99#

  You may also need to use configure it to authenticate to the service provider
  using chap authentication.


STARTING THE NETWORK AUTOMATICALLY WHEN YOU PLUG THE CARD IN

If you want it to start pppd automatically when you plug the card in, you can
do this by editing /etc/pcmcia/serial.opts.  If you have pppd configured so
that 'pon' establishes a connection, then you can just add 'pon' to the
start_fn() in the "# IPWireless PCMCIA modem start" section, and create
a new stop_fn(), adding 'poff' to it, e.g.

# IPWireless PCMCIA modem start

DEVROOT=${DEVICE%[0-9]}
DEVROOT=${DEVROOT%[0-9]}
case "$ADDRESS" in
*,*,0)
  if test "$DEVROOT" = "ttyIPWp" -o "$DEVROOT" = "tts/ttyIPWp" ; then
      start_fn () {
        /usr/local/share/ipwireless_cs/create-ttyIPWp.sh
        pon
      }
      stop_fn() {
        poff
      }
  fi
  ;;
esac
# IPWireless PCMCIA modem end

