--- elwix/config/etc/uboot/rc.d/011.ap_wep.stop 2014/01/23 09:34:54 1.1 +++ elwix/config/etc/uboot/rc.d/011.ap_wep.stop 2014/09/15 19:06:52 1.2 @@ -0,0 +1,43 @@ +#!/bin/sh + +IFACE="wlan0" +WIFIDEV="ath0" + +REGDOMAIN="" +COUNTRY="" + +DEFTXKEY="1" +KEY_1="public_key" +KEY_2="" +KEY_3="" +KEY_4="" + +SSID="wep-ap" +CHAN="36:a" +BINT="100" +WIFIOPTS="-bgscan authmode shared" + +OPT="" +IP="172.31.1.1/30" + +[ -r /etc/rc.wifi ] && . /etc/rc.wifi + +echo "Config wireless AP (WEP) interface $IFACE ..." + +ifconfig $IFACE create wlandev $WIFIDEV wlanmode hostap +#ifconfig $IFACE regdomain $REGDOMAIN +#ifconfig $IFACE country $COUNTRY +ifconfig $IFACE $WIFIOPTS +ifconfig $IFACE bintval $BINT +ifconfig $IFACE channel $CHAN + +setWEP $IFACE $DEFTXKEY $KEY_1 $KEY_2 $KEY_3 $KEY_4 + +ifconfig $IFACE ssid $SSID +ifconfig $IFACE inet ${IP} ${OPT} up + +[ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE + +[ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 & + +#wlandebug -i $IFACE state+scan+assoc+crypto+11n