Changed some of the .opts variables and fixed the APSSID name in wlan-ng.
This commit is contained in:
parent
788ec21b1c
commit
9e9b022acd
|
@ -6,7 +6,7 @@
|
|||
|
||||
. ./shared
|
||||
|
||||
# set -x
|
||||
set -x
|
||||
|
||||
# Get device attributes
|
||||
get_info $DEVICE
|
||||
|
@ -16,6 +16,9 @@ HWADDR=`/sbin/ifconfig $DEVICE | sed -n -e 's/.*addr \(.*\)/\1/p'`
|
|||
ADDRESS="$SCHEME,$SOCKET,$INSTANCE,$HWADDR"
|
||||
. $0.opts
|
||||
|
||||
WLANCTL=/sbin/wlanctl-ng
|
||||
DOWNLOAD=/sbin/prism2dl
|
||||
|
||||
case "$ACTION" in
|
||||
|
||||
'start')
|
||||
|
@ -24,19 +27,19 @@ case "$ACTION" in
|
|||
fi
|
||||
|
||||
if is_true $IS_AP; then
|
||||
if ! prism2dl -r $AP_FWIMAGE $DEVICE then ; then
|
||||
if ! $DOWNLOAD -r $AP_FWIMAGE $DEVICE then ; then
|
||||
echo AP firmware download failed
|
||||
exit 1
|
||||
fi
|
||||
startcmd="wlanctl-ng $DEVICE dot11req_start "
|
||||
startcmd="$startcmd ssid=$CREATE_SSID"
|
||||
startcmd="$WLANCTL $DEVICE dot11req_start "
|
||||
startcmd="$startcmd ssid=$APSSID"
|
||||
startcmd="$startcmd bsstype=infrastructure"
|
||||
startcmd="$startcmd beaconperiod=$APBCNINT"
|
||||
startcmd="$startcmd dtimperiod=$APDTIMINT"
|
||||
startcmd="$startcmd cfpollable=$APCFPOLLABLE"
|
||||
startcmd="$startcmd cfpollreq=$APCFPOLLREQ"
|
||||
startcmd="$startcmd probedelay=$APPROBEDELAY"
|
||||
startcmd="$startcmd dschannel=$CREATE_CHANNEL"
|
||||
startcmd="$startcmd dschannel=$APCHANNEL"
|
||||
j=1
|
||||
for i in $APBASICRATES ; do
|
||||
startcmd="$startcmd basicrate$j=$i"
|
||||
|
@ -47,12 +50,12 @@ case "$ACTION" in
|
|||
startcmd="$startcmd operationalrate$j=$i"
|
||||
j=$[j + 1]
|
||||
done
|
||||
echo $startcmd
|
||||
results=`$startcmd`
|
||||
|
||||
results=`$startcmd` # Here's where it runs
|
||||
if [ $? = 0 ]; then
|
||||
eval $results
|
||||
if [ $resultcode != "success" ] ; then
|
||||
echo "AP failed to start, resultcode=$resultcode"
|
||||
echo "AP not started, resultcode=$resultcode"
|
||||
exit 1
|
||||
else
|
||||
echo "WLAN AP mode started"
|
||||
|
@ -63,8 +66,8 @@ echo $startcmd
|
|||
fi
|
||||
else
|
||||
|
||||
/sbin/wlanctl-ng $DEVICE dot11req_mibset "mibattribute=dot11DesiredSSID=$DESIRED_SSID"
|
||||
/sbin/wlanctl-ng $DEVICE dot11req_associate listeninterval=0
|
||||
$WLANCTL $DEVICE dot11req_mibset \
|
||||
"mibattribute=dot11DesiredSSID=$DESIRED_SSID"
|
||||
fi
|
||||
|
||||
# Now initialize the network interface in the normal way
|
||||
|
|
|
@ -12,10 +12,11 @@ case "$ADDRESS" in
|
|||
# to load the flash.
|
||||
WLAN_ENABLE=y
|
||||
|
||||
# Do we want to be an AP?
|
||||
# Do we want to be an AP? If not, set IS_AP to 'n' and the AP
|
||||
# variables can be left blank
|
||||
IS_AP=y
|
||||
AP_FWIMAGE=/etc/wlan/t10001c0.hex
|
||||
BRIDGEDEVICE=eth0
|
||||
APBRIDGEDEVICE=eth0
|
||||
APSSID="WLAN_PRISM2"
|
||||
APBCNINT=100
|
||||
APDTIMINT=3
|
||||
|
@ -26,11 +27,8 @@ case "$ADDRESS" in
|
|||
APBASICRATES="2 4"
|
||||
APOPRATES="2 4"
|
||||
|
||||
# Scan for which SSID?
|
||||
# Station Settings (SSID is all we have for now)
|
||||
DESIRED_SSID="Set your own here"
|
||||
|
||||
# Create SSID
|
||||
CREATE_SSID="WLAN_PRISM2"
|
||||
CREATE_CHANNEL=6
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue