|
tools.collegeterrace.net
openap-ct
This page contains information on openap-ct, which is software for
OpenAP-type
access point systems.
The best place to discuss this is on the
OpenAP
list.
Current Release - openap-ct-2003-06-08
Source:
openap-ct-2003-06-08.tar.gz
Binaries using default channel 1 and SSID "Collegeterrace_net":
README:
openap-ct release 2003-06-08
http://tools.collegeterrace.net
Contents:
This is a tiny linux distribution for 802.11 access points for
various hardware platforms including
the Eumitcom WL11000 802.11b consumer access points,
Soekris boards, and general laptop/PC hardware.
It is one of a few projects whose roots
are in the original OpenAP project,
http://opensource.instant802.com
Specifically, openap-ct is based on Pavel Roskin's openap-ng project,
http://www.red-bean.com/~proski,
which attempts to track the most recent
sources. openap-ct adds features considered useful for the specific
application for the collegeterrace.net project, which currently includes
bridging ("meshing") like the original OpenAP distribution.
Related projects include
http://savannah.nongnu.org/projects/openap and http://openap.ksmith.com
Please direct all discussion of this software to the openap-dev list:
http://lists.instant802.com/mailman/listinfo/openap-dev/
Most folks will just want to use the built sources as included in this
distribution. If for some reason you need to rebuild the binaries from
sources, first follow the instructions "How to rebuild binaries" below,
then follow the instructions in this list:
-
If desired change the SSID and channel ("DSCHAN")
in /files/etc/sysconfig/wlan0.
-
If you plan to operate more than 2 openap-ct units (or any devices that
will participate in the 802.1d bridge) on the same network,
you probably want to configure one of the units to be intentionally selected as
the root bridge (see the note about this below).
Do this by setting the value of BR_BRIDGEPRIO in files/etc/sysconfig/br0
lower only for the root-bridge unit.
-
Eumitcom only:
In case you have a revision of the hardware (like Rev 3A) that needs
the CPU speed slowed down from 33MHz to 16MHz in order
to function properly, apply the
appropriate patch from the top-level directory by typing
"patch -p2 < patches/alios-16MHz-patch".
To learn more about this see
http://lists.instant802.com/pipermail/openap-dev/2002-September/001272.html
and http://www.fe2o3.org/openap
-
From the top-level directory, type "make". It should only take a few seconds.
- When running, note that a failure to connect to other openap-ct
units (or other HostAP-based systems) might be due to a bad version of firmware
on your wireless card. See
http://lists.shmoo.com/pipermail/hostap/2003-May/002969.html
The HostAP driver shows the firmware version on the console during bootup.
If you verify that you have version 1.4.9 firmware and want to
permanently upgrade your card, for your convenience openap-ct includes
HostAP's prism2_srec utility to do this, but please be sure you know what
you are doing since you can make your card unusable if this upgrade fails.
How to rebuild binaries (optional)
Do these things before the preceding list
of steps:
Edit the build script. You'll at least need
to make sure that the VERSION parameters and the DIST_BASE parameter are set
as desired. It's recommended that you run it as "build --clean", as this is
the only tested option. Note that this script will automatically
download/checkout sources as part of the process, however the tarball
distributions (i.e. kernel and pcmcia sources) will not be redownloaded if
present even with the --clean flag.
If you wish to package the new binaries into a distribution like this
one, copy all the files under the "kernel" and "files-*" directories on top
of a pristine distribution directory and re-tar.
How to install or update on the Eumitcom hardware
Once you've generated the flash and SRAM images you are ready to do the
flashing using one of two methods.
The method for initial flashing of an unaltered AP via an SRAM card
is described at
http://opensource.instant802.com/getting_started_flash.php
The method for reflashing an already-modified AP is essentially:
- Set up a webserver to serve the "flash" and "flash.md5" files.
- Connect to the serial console of the OpenAP.
- Ensure that the OpenAP has internet connectivity to the webserver. If
it was expecting a DHCP server to assign an IP address but none exists,
you'll need to manually
assign one instead to the "br0" interface using "ifconfig br0 1.2.3.4".
- Execute the command "reflash http://myserver/mypath/flash" where the
URLs http://myserver/mypath/flash and http://myserver/mypath/flash.md5
serve the two files. If the version of OpenAP you're overwriting has
problems running from the reflash script,
see its release notes for hints on how to successfully reflash.
- Note that during reflashing messages like this:
Last[2] is d7, datum is 6c
mtd lowlevel write error: 5 retries left: retrying
and this:
Error -3 while decompressing!
c01e63ec(2899)->c042d000(4096)
are usually harmless.
After reflashing is finished the units will sometimes reboot OK, or will
sometimes hang or drop back to a shell prompt
- the unit should be power-cycled manually in that case.
How to install on soekris
The Soekris uses Compact Flash (CF) boot media. Here is one method for
installing only openap-ct on a CF card using syslinux, done from a
Linux PC with a USB CF reader.
You may want to check the soekris-tech mailing list archives at
http://www.soekris.com/
for recommendations on what type of CF cards to use, bearing in mind that
openap-ct is currently under 1MB.
To get started format the CF card and create a bootable FAT16 partition with
DOS filesystem (FAT16 and DOS are appropriate for syslinux).
Step by step:
- Determine the Cylinders/Heads/Sectors (C/H/S) numbers that
the soekris thinks the CF card should have. Do this by inserting the CF
in the soekris, booting to the BIOS, and observing on the serial console:
comBIOS ver. 1.15 20021013 Copyright (C) 2000-2002 Soekris Engineering.
net45xx
0032 Mbyte Memory CPU 80486 100 Mhz
Pri Mas LEXAR ATA FLASH LBA 502-2-32 16 Mbyte
So in this example, the CF card has C/H/S = 502/2/32.
BEWARE: two cards that may look identical on the outside may actually have
different C/H/S. Check each one individually.
- Put the CF card in your CF reader. In this example the CF shows up
as device /dev/sda - BE SURE to change this as appropriate for your system
or you may wipe out whatever device is there (are you about to erase your SCSI
disk?).
- At this point you can customize and run Paul Smith's script config-cf.sh
which will automate all of the following steps, then you are done.
Alternatively you can complete the following steps manually.
- Run "fdisk /dev/sda" and do the following:
- Go to the "expert" menu ("x" command)
- Set the number of cylinders to the value you determined above ("c" command)
- Set the number of heads to the value you determined above ("h" command)
- Set the number of sectors to the value you determined above ("s" command)
- Return to the main menu ("r" command)
- Print the partition table ("p" command)
- If there are any partitions delete them all with the "d" command as many
times as needed
- Create a new partition of size 8MB: "n" command, choose primary parition
number 1, starting at cylinder 1 and of size "+8M".
- Set primary partition 1 to type 6 (FAT16) ("t" command)
- Set primary partition 1 as bootable ("a" command)
- Save changes and quit ("w" command)
Note that you must create a partition before quitting or else none of the
changes made in fdisk will be saved.
- Make a DOS file system on primary partition 1 with "mkdosfs /dev/sda1".
Obtain syslinux (http://syslinux.zytor.com/) and untar.
Set the master boot record to the one from syslinux with
"cat mbr.bin > /dev/sda" and install syslinux on
primary partition 1 with "syslinux -s /dev/sda1".
Now you may mount the partition, e.g. "mount -t vfat /dev/sda1 /mnt/cf"
(where /mnt/cf is a directory that has been previously created).
Copy these three files from your openap-ct directory to /mnt/cf:
- boot-config/syslinux.cfg
- kernel/bzImage-soekris (rename to "linux")
- soekris-ramdisk (rename to "ramdisk")
Unmount the CF card from the reader ("umount /mnt/cf"). Insert in the
soekris and boot.
How to make a bootable floppy for laptop/PC using Syslinux
You can turn a laptop into an openap-ct system easily with a bootable
floppy.
Quick outline of how to make:
- mkdosfs /dev/fd0
- syslinux -s /dev/fd0
- mount /mnt/floppy
- cp boot-config/syslinux.cfg-vtconsole /mnt/floppy/syslinux.cfg
- cp kernel/bzImage-soekris /mnt/floppy/linux
- cp soekris-ramdisk /mnt/floppy/ramdisk
- umount /mnt/floppy
Of course you can save an image of this floppy with
dd if=/dev/fd0 of=openap-ct-boot.img bs=1440k
then you can write the image back to a floppy with
dd if=openap-ct-boot.img of=/dev/fd0 bs=1440k
or on DOS/Windows you can write to a floppy with the rawrite utility
http://uranus.it.swin.edu.au/~jn/linux/rawwrite.htm
How to install on a laptop/PC drive
This is one method to install openap-ct as the only running system, using the
GRUB bootloader.
Of course you could also set up openap-ct as one of multiple boot choices on a
hard drive that already has other OSes installed.
It is worth noting that two no-moving-parts "hard drive" alternatives to a
real hard drive
are a Disk-On-Module (DOM), and a compact flash card plugged into a
CF-to-IDE adaptor.
The following setup steps need to be done from a booted system running on
hardware connected to the drive. One way to accomplish this on
hardware with a CD drive is to boot into Knoppix
(http://www.knopper.net/knoppix/)
which may require a boot floppy on older hardware.
To get started, we'll assume that the hard drive has already been formatted
(or at least had its C/H/S set correctly).
In this example we'll assume that the hard drive device is at
/dev/hda but of course if this is not correct for your system you'll need
to change the example commands or risk erasing the wrong drive.
Create a bootable FAT16 partition with DOS filesystem
(The kernel currently doesn't support mounting ext2 partitions, and
we want to be able to access the partition directly from within openap-ct).
Step by step:
- Run "fdisk /dev/hda" and do the following:
- Print the partition table ("p" command)
- If there are any partitions delete them all with the "d" command as many
times as needed
- Create a new partition of size 8MB: "n" command, choose primary parition
number 1, starting at cylinder 1 and of size "+8M".
- Set primary partition 1 to type 6 (FAT16) ("t" command)
- Set primary partition 1 as bootable ("a" command)
- Save changes and quit ("w" command)
Note that you must create a partition before quitting or else none of the
changes made in fdisk will be saved.
- Make a DOS file system on primary partition 1 with "mkdosfs /dev/hda1".
Now you may mount the partition, e.g. "mount -t vfat /dev/hda1 /mnt/hda1".
Copy these three files from your openap-ct directory to /mnt/hda1:
- boot-config/menu.lst (place in boot/grub --- you'll have to make the dirs)
- kernel/bzImage-soekris (rename to "linux")
- soekris-ramdisk (rename to "ramdisk")
Install GRUB with "grub-install --root-directory=/mnt/hda1 /dev/hda".
Shutdown and boot from the hard drive. You should see GRUB start and
show you that it is booting openap-ct.
Bear in mind that the first COM serial port may be the console depending on
boot paramters.
How to update openap-ct from within openap-ct on soekris/laptop/PC
- Set up a webserver to serve the new "linux" and "ramdisk" files.
- Connect to the serial console of the unit if appropriate.
- Ensure that the unit has internet connectivity to the webserver. If
it was expecting a DHCP server to assign an IP address but none exists,
you'll need to manually
assign one instead to the "br0" interface using "ifconfig br0 1.2.3.4".
- Mount the partition holding the linux and ramdisk files so that you have
read/write access with "mkdir /tmp/hda1"
and "mount -t vfat /dev/ide/host0/bus0/target0/lun0/part1 /tmp/hda1/", and
"cd /tmp/hda1".
(This example assumes you have installed openap-ct on partition 1 of the
first hard drive, or of the CF card on the soekris).
- Retrieve the new "linux" and "ramdisk" files with wget:
"wget http://myserver/mypath/linux" and "wget http://myserver/mypath/ramdisk".
- Unmount with "umount /mnt/hda1" and reboot with "reboot".
- The only Soekris system tested is the 4511. Please post to the list
if you use another model.
- The only laptops tested so far are Toshiba Satellite Pro 420CDT and
Fujitsu Lifebook 535T.
This still needs testing/fixing on many more models.
- Hints on kernel configuration for the Soekris were derived from
Keith Smith's LinuxAP distribution. Thanks Keith!
- For now, the same kernel is being used for Soekris and laptop/PC.
This may change in future releases.
- If you are using more than two units together, be aware that
the root of the spanning tree will be chosen more or less randomly if all
units have the same "bridgeprio" value.
This will degrade performance
if for example one unit is attached to a network
with a gateway to The Internet through which nearly all traffic flows, and
that unit doesn't happen to be the root bridge.
One solution to this is to make that unit have a lower "bridgeprio" value
than all the other units (see BR_BRIDGEPRIO in files/etc/sysconfig/br0)
so that it will always be root bridge.
Another solution is to have the gateway machine itself run bridging
(on its interface connected to the OpenAP unit) but with a lower
"bridgeprio" value that all the OpenAP units, so that it will always
be root bridge.
- Every release: update binaries with more recent sources.
- External sources (bridge-utils, wireless_tools, etc) should not
be distributed here. Instead, "build --clean" should download them and apply
local patches as needed as we already do with kernel etc.
- With the update in HostAP drivers there is always hope that bugs will
be fixed, but need to investigate whether timeout and lockup bugs are fixed.
- Complete work on routing stuff (scripting), clean up messages about
missing net modules.
- Cipe to gateway for secure remote access, as option
- Routing instead of bridging, as option, yeah that would be nice.
- Add tftp, maybe.
- 2003-06-08
- Update hostap to 0.0.3 (CVS tag hostap_0_0_3)
- Update uClibc to 0.9.19 (CVS tag uClibc_0_9_19) and update its .config
correspondingly
- Update busybox to "unstable" CVS 2003-06-08 and update its .config
correspondingly.
Note patch
http://busybox.net/lists/busybox/2003-June/013740.html applied
until busybox build problem fixed.
- New kernel and additional files tree for soekris/general PC.
- Lowered bridging message frequency from old value of 2 seconds.
Probably makes a huge difference in network performance, since
you could see terrible ping times correspond exactly with bridging messages ---
perhaps a sign of the cpu being overwhelmed.
- Set txpower explicitly. Not sure that this makes any difference other
than iwconfig querying hostap and getting the "correct" value.
- 2003-01-12
- Update kernel to 2.4.20
- Update uClibc to CVS 2003-01-03 and update its .config correspondingly
- Update busybox to CVS 2003-01-03 and update its .config correspondingly
- Update hostap to CVS 2003-01-03
- By popular demand, lowered serial port speed to 4800bps in alios (ksmith's patch to
alios.S UART registers) and linux (tools/scripts/mkflash)
- Added optional 16MHz patch for slower hardware (e.g. Rev 3A). ElanSC400 technical
reference is here:
http://www.amd.com/epd/processors/4.32bitcont/13.lan4xxfam/22.lansc400/index.html
- Removed pcmcia from kernel and added it as modules. (Thanks to Robert Botha for
the suggestion.) Although we can still get "Tx timed out!" messages, now following
nearly all of them the hostap driver can successfully reset the card. See this thread
on the hostap list:
http://lists.shmoo.com/pipermail/hostap/2003-January/thread.html#932
- Since card reset (which can happen normally) will revert a volatile firmware
update, by default do not include the firmware update files or prism2_srec utility,
and use wds_type=2. The wireless script will just skip the firmware update attempt
if the files are missing. Should someone wish to re-enable this they only need to
add those filenames back in lists/files. However there is no need to compress the
files or include gunzip in busybox since cramfs compresses anyway (thanks Eerin
Rosenstrom).
Or one could just try a permanent firmware update in order to allow wds_type=4; see
http://lists.shmoo.com/pipermail/hostap/2002-November/000295.html
- In rare instances the hostap driver/card do not recover after an automatic reset,
see
http://lists.shmoo.com/pipermail/hostap/2003-January/000989.html
To increase reliability, there is now bin/iw_watchdog,
a script which runs in the background and reboots the system when wlan0 appears
to have died. It is controlled by the startup script
/etc/init.d/iw_watch
- Rename patches/linux.diff to patches/linux-wl11000.diff for clarity
- Include portion of elan-patch from Pengutronix relevant to kernel 2.4.20, named
patches/linux-elan-patch-2.4.20.diff (thanks Richard Heurtley for pointing this out).
- Add Glenn Engel's mkflash patch for recent perl (binmode(output_fh);)
- Cleaned with "make clean" (mistakenly included unneeded .o files previously)
- Fix reflash script - after flash image occupies space in /tmp, it would fail to
stop services due to lack of memory, crashing shell and aborting script.
- Cleaned up worthless "NUM_WDS_IFACES_PLUS_ONE" hack in wireless script
- Verified: 3 kernel bridging patches currently listed as "submitted" on
http://bridge.sourceforge.net/patchtracker.html
appear to have been accepted into
kernel 2.4.20; that page is out of date. So no extra bridging patches for this
release.
- 2003-11-25
- First version with locally-built binaries.
- Changed build script to download source. CVS can be done by tag/date/etc.
- Use standard WDS (wds_type=4). Make this always work by
doing volatile firmware update on the card at startup time.
- Probably other small things as well.
- 2002-11-22
- Based on openap-ng-2002-11-07.
- files/etc/init.d/ initialization scripts and lists/files and lists/links, which set up the rc.* links that are built to these scripts. The scripts are based on the equivalent scripts in the savannah.nongnu.org distribution of openap.
- support for more cards, including the cards found in the SMC hardware, was added by copying the relevant sections from hostap's complete hostap.conf file into files/etc/pcmcia/hostap.conf
|
Older Releases
openap-ct-2003-01-12
Source:
openap-ct-2003-01-12.tar.gz
Binaries using default channel 1 and SSID "Collegeterrace_net":
For more information, see the README file in the tarball.
openap-ct-2002-11-25
Source:
openap-ct-2002-11-25.tar.gz
Binaries using default channel 1 and SSID "Collegeterrace_net":
For more information, see the README file in the tarball.
openap-ct-2002-11-22
So far this is just an attempt to write initialization scripts to work
with
Pavel Roskin's openap-ng
distribtion.
The desired features are 802.1d STP bridging with AP-to-AP links to
provide "meshing" functionality. This is equivalent to the
functionality of the original openap-0.1.1 distribution, but with far more
up to date (and hopefully less buggy) software under the hood.
How to build:
- Get the source:
- You probably want to edit files/etc/sysconfig/wlan0 to set the desired
channel and SSID. By default they are channel 1 and SSID "Instant802_debug".
- "make". Kudos to Pavel for making this so easy.
If you want to use channel 1 and SSID "Instant802_debug" you could use
these binaries:
Notes:
The only release so far is openap-ct-2002-11-22, which is based on
openap-ng-2002-11-07, which is no longer the latest release of openap-ng.
The changes are only in the files/etc/init.d/ initialization scripts and
lists/files and lists/links, which set up the
rc.* links that are built to these scripts. The scripts are
based on the equivalent scripts in the
savannah.nongnu.org distribution of openap. Also support for more cards,
including the cards found in the SMC hardware, was added by
copying the relevant sections from
hostap's complete hostap.conf file
into files/etc/pcmcia/hostap.conf.
The scripts need to be cleaned up a bit.
There are some things that really should
be moved into sysconfig/ files, e.g. the parameters for the prism2_param
lines and the number of wds links. There is some less-than-ideal
hardcoding that
had to be done because the current openap-ng busybox is built without
"sed", "grep", or "cut" on which the original scripts depended.
This software has not been tested adequately. In particular there appear to be
problems with the "WDS" AP-to-AP links that the hostap driver provides.
This is currently under investigation.
You might wish to change the wds_type param to experiment with that.
It's currently set to 7 using the line "iwpriv wlan0 prism2_param 27 7" in
files/etc/init.d/wireless. Search
hostap's documentation
for the string "wds_type" for more information.
|