Notes on the new config scripts; get rid of the explicit "desiredssid"

in the config file.
This commit is contained in:
solomon 2002-10-30 20:56:25 +00:00
parent 21ba9f8606
commit d308895267
4 changed files with 71 additions and 42 deletions

79
README
View file

@ -208,11 +208,6 @@ Building linux-wlan-ng:
_tools_ that are built to run on the build host during the
linux-wlan-ng build process.
- Compiling with a cross compiler? (y/n) [n]:
If you are cross compiling, we need to enable the building of
the linux-wlan-ng build-time tools using the local host compiler
rather than the cross-compiler.
- Build for debugging (see doc/config.debug) (y/n) [y]:
This option enables the inclusion of debug output generating
statements in the driver code. Note that enabling those statements
@ -232,28 +227,56 @@ NOTE: linux-wlan-ng does not fully implement the wireless extensions
interface. This means that you can't use iwconfig and its kin to
set things up. Instead, read on!
As of linux-wlan-ng 0.1.16-pre5, the configuration and launch scripts have
been largely re-written. pcmcia/rc/hotplug now all use a common library
of routines and use the same set of configuration files.
Now, everything relevant exists in /etc/wlan/*
/etc/wlan/wlan.conf:
This file maps between wlan devices and network IDs, and contains
the names of all devices that should be initialized by the hotplug
and rc scripts.
/etc/wlan/wlancfg-*
These files are per-network configurations. This makes it easy to
switch between different SSIDs and the various settings they may
require, like WEP keys and whatnot.
The bare minimum you need to do to configure your system after a fresh driver
install:
0) Nothing whatsoever. out-of-the-box, the driver will attempt to associate
with any access point within range.
However, we highly recommend setting up a configuration specifically for
your network, using the following method:
0) This example assumes your network name/SSID is "MyHomeNetwork"
1) cp /etc/wlan/wlancfg-DEFAULT /etc/wlan/wlancfg-MyHomeNetwork
2) edit /etc/wlan/wlan.conf and change the SSID_wlan0 line to:
SSID_wlan0="MyHomeNetwork"
3) edit /etc/wlan/wlancfg-MyHomeNetwork, and make any necessary changes
necessary to support your network, such as WEP and whatnot.
------------------------------
FOR PCMCIA USERS:
A) Edit the /etc/pcmcia/wlan-ng.opts file to configure. These options are
set every time you insert a card. If you want to change an option
after the initial configuration, a) pop your card out, b) alter the
file, c) insert your card. For more information see the file(s)
linux-wlan-ng*/doc/config.*
B) Edit your network.opts file to set up your IP settings. Note: for a
station, the SSID you're connecting to will be appended to the
A) Edit /etc/pcmcia/network.opts file to set up your IP settings.
Note: for a station, the SSID you're connecting to will be appended to the
current pcmcia scheme name. You can use this to have different
IP setups for different wireless LANs you connect to (e.g. home vs. work).
C) Restart pcmcia-cs with the command:
B) Restart pcmcia-cs with the command:
/etc/rc.d/init.d/pcmcia restart
D) Insert the card. For most cards, a solid LED indicates that the
C) Insert the card. For most cards, a solid LED indicates that the
SSID you specified was found, a bss was joined, and the firmware
completed the authenticate and associate processes.
E) Run ifconfig and route to determine if your IP and route settings are
D) Run ifconfig and route to determine if your IP and route settings are
listed as you wanted them. It's also a good idea to look at the file
/etc/resolv.conf to see if your nameserver address has been set up
correctly.
@ -272,18 +295,14 @@ A) You must make sure that the drivers get loaded at boot time and that the
Also, don't forget to set up your resolv.conf to point at your DNS server.
B) Alternatively you can try out the rc.wlan and wlan.conf scripts.
They do work, and they are installed into your */init.d directory
and /etc directory. We don't currently create the soft-link from
the runlevel directory to the wlan startup script because the
distributions vary too much in this respect. You'll need to create
the soft-link yourself. Just make sure it is early in the process,
namely, before the the network interfaces are brought up. The
actual setup of the SSID and such is in the file /etc/wlan.conf.
Note that you'll also need to add an modules.conf alias statement
for the driver that you wish to load (pci or plx), we don't
explicitly load a module in init.d/wlan because we don't know which
one you want. ;-)
B) Alternatively, you can use the rc.wlan script, which ties into the
/etc/wlan/* configuration files mentioned above.
We currently don't create the softlink from the runlevel directories to
the wlan startup script due to differences in distributions, but the
scripts are redhat-aware, and can be extended to hook into other tools
easily. (patches welcome!) Just make sure it is brought up early in
the process, namely, before the the network interfaces are brought up.
------------------------------
FOR USB USERS:
@ -297,8 +316,8 @@ E) Run 'wlanctl-ng wlan0 lnxreq_autojoin ssid=<your ssid> authtype=opensystem'
to enable the MAC in Infrastructure Station mode.
F) Run 'ifconfig wlan0 <your IP address>'
NOTE: USB devices currently integrated into the hotplug subsystem, and
use the /etc/wlan.conf configuration file.
Or, you can use the provided hotplug scripts, if your distribution has
hotplug support. :)
IMPORTANT: Due to an issue with some versions of the Prism USB firmware,
the driver usually needs to perform a port reset.

View file

@ -96,9 +96,12 @@ wlan_source_config ()
# $1 == wlandev $2 == ssid $3 == bssid
eval 'GOSSID=$SSID'_$1
if [ $GOSSID = "" ] ; then
echo "SSID_$1 not set in /etc/wlan/wlan.conf. Using default."
if [ X"$GOSSID" = X"" ] ; then
echo "SSID_$1 not specified in /etc/wlan/wlan.conf. Using default."
GOSSID=DEFAULT
DesiredSSID=""
else
DesiredSSID=$GOSSID
fi
if [ -f "/etc/wlan/wlancfg-$GOSSID" ] ; then
@ -107,6 +110,7 @@ wlan_source_config ()
echo "Failed to open network config file /etc/wlan/wlancfg-$GOSSID, using default."
. "/etc/wlan/wlancfg-DEFAULT"
fi
}
wlan_disable ()

View file

@ -44,18 +44,28 @@
# Intersil Corporation as part of PRISM(R) chipset product development.
#
# --------------------------------------------------------------------
# This file is sourced by the init.d/wlan script.
# This file is sourced by all configuration scripts.
#
# The WLAN_DEVICES variable identifies the device names of each WLAN device.
# If you have more than one, make sure each one is identified in a whitespace
# separated list that's assigned to WLAN_DEVICES.
#
# For each device named in WLAN_DEVICES, the function wlandevice_config will
# be called with $1 set to the name of the device. To specify the
# setup for each device, just add an appropriate case section.
WLAN_DEVICES="wlan0"
SSID_wlan0="linux-wlan"
##########
# Note: To bind to a specific network, change the SSID to something different
# and create the file /etc/wlan/wlancfg-<SSID> with your network-
# specific settings. If this file is not present, the settings in
# /etc/wlancfg/wlancfg-DEFAULT are used.
#
# for example:
# SSID_wlan0="linux-wlan"
# This expects a file called "/etc/wlan/wlancfg-linux-wlan" to be present.
#
# Use a SSID of "" to associate with any network in range.
#########
SSID_wlan0=""
#SSID_wlan1=""
#SSID_wlan2=""

View file

@ -35,10 +35,6 @@ dot11WEPDefaultKey3= # 01:02:03:04:05:06:07:08:09:0a:0b:0c:0d
#=======SELECT STATION MODE===================
IS_ADHOC=n # y|n, y - adhoc, n - infrastructure
#============ BOTH ADHOC AND INFRASTRUCTURE ===========
# Use DesiredSSID="" to associate with any AP in range
DesiredSSID="linux-wlan"
#======= INFRASTRUCTURE STATION ===================
# What kind of authentication?
AuthType="opensystem" # opensystem | sharedkey (requires WEP)