Can this help? I'm in uncharted territory, I know a handfull of UNIX
commands, but I m not familiar with the inner workings of networking
interfaces.

----------------

# /etc/init.d/wlan start
root: wlan: starting
Setting eth1 macaddr: 00:04:20:2C:20:C3
insmod: can't insert '/lib/atheros/ar6000.ko': File exists
bmiloader: eth1: No such device
export EEPROM='/lib/atheros/calData_ar6102_15dBm.bin'
export HOME='/root'
export IMAGEPATH='/lib/atheros'
export LOGNAME='root'
export OLDPWD='/etc/init.d'
export PWD='/etc'
export SHELL='/bin/sh'
export TERM='xterm'
export USER='root'
export WORKAREA='/lib/atheros'
Failed to get TARGET TYPE
/lib/atheros/loadAR6000l.sh: exit: line 1: Illegal number: -1
root: wlan: failed
/etc/init.d/wlan: exit: line 72: Illegal number: -1

--------------


# cat /etc/init.d/wlan
#!/bin/sh

case "$1" in
start)
/usr/bin/logger -s "wlan: starting"

# Load wlan drivers
export WORKAREA=/lib/atheros
export EEPROM=${WORKAREA}/calData_ar6102_15dBm.bin

# Set MAC address to the same as Ethernet
macaddr=`/sbin/ifconfig eth0 | sed -ne
's/.*\(..:..:..:..:..:..\).*/\1/p'`
if [ "x${macaddr}" != "x" ]
then
echo "Setting eth1 macaddr: ${macaddr}"
SETMAC="--setmac $macaddr"
fi

/lib/atheros/loadAR6000l.sh $SETMAC
if [ $? -ne 0 ]; then
/usr/bin/logger -s "wlan: failed"
exit -1
fi

/lib/atheros/wmiconfig -eth1 --filter=all

# Temporary possible work-a-round to fix wireless connectivity
issues
# Disable power save mode
/lib/atheros/wmiconfig -eth1 --power maxperf

# todo region codes?

# Start wpa_supplicant
/usr/bin/logger "Starting wpa_supplicant"
/usr/sbin/wpa_supplicant -B -Dwext -ieth1
-c/etc/wpa_supplicant.conf
/usr/sbin/wpa_cli -B -a/etc/network/wpa_action
/usr/bin/logger "Started wpa_supplicant"

/usr/bin/logger -s "wlan started"
;;

stop)
/usr/bin/logger -s "wlan: stopping"

# Stop wpa supplicant
killall wpa_cli
killall wpa_supplicant

# todo Make sure udhcpc is killed
if [ -r /var/run/udhcpc.eth1.pid ]
then
PID=`cat /var/run/udhcpc.eth1.pid`
kill -TERM $PID

# Wait until udhcpc is dead
kill -0 $PID >/dev/null 2>&1
while [ $? == 0 ]; do
sleep 1
kill -0 $PID >/dev/null 2>&1
done
fi

# remove wlan driver
/lib/atheros/loadAR6000l.sh unloadall

/usr/bin/logger -s "wlan stopped"
;;

*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0
#


------------------------------------------------------------------------
mcoste's Profile: http://forums.slimdevices.com/member.php?userid=12820
View this thread: http://forums.slimdevices.com/showthread.php?t=103446

_______________________________________________
Radio mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/radio

Reply via email to