Added some script elements to initialize an AP.

This commit is contained in:
mark 2000-02-03 18:28:22 +00:00
parent f580566f15
commit 122f0a24c1
2 changed files with 26 additions and 2 deletions

View File

@ -19,9 +19,27 @@ ADDRESS="$SCHEME,$SOCKET,$INSTANCE,$HWADDR"
case "$ACTION" in
'start')
if is_true $IS_AP; then
prism2dl -r $AP_FWIMAGE
wlanctl-ng $DEVICE start \
ssid="$CREATE_SSID" \
bsstype=infrastrucure \
beaconperiod=100 \
dtimperiod=3 \
cfpollable=false \
cfreq=false \
dschannel=$CREATE_CHANNEL \
basicrate1=2 \
basicrate2=4 \
operationalrate1=2 \
operationalrate2=4 \
operationalrate3=11 \
operationalrate4=22
else
/sbin/wlanctl-ng $DEVICE dot11req_mibset "mibattribute=dot11DesiredSSID=$DESIRED_SSID"
/sbin/wlanctl-ng $DEVICE dot11req_associate listeninterval=0
/sbin/wlanctl-ng $DEVICE dot11req_mibset "mibattribute=dot11DesiredSSID=$DESIRED_SSID"
/sbin/wlanctl-ng $DEVICE dot11req_associate listeninterval=0
fi
# Now initialize the network interface in the normal way
./network $1 $2

View File

@ -8,9 +8,15 @@
case "$ADDRESS" in
*,*,*,*)
# Do we want to be an AP?
IS_AP=n
AP_FWIMAGE=/etc/wlan/t10001c0.hex
# Scan for which SSID?
DESIRED_SSID="Set your own here"
# Create SSID
CREATE_SSID="SSID to create"
CREATE_CHANNEL=6
;;
esac