I wrote this script for the purpose. Note that:
0) Just a quick hack but works quite well
1) You have to keep the button pressed for at least 1s
2) The Ready LED keeps blinking when wlan is on
3) If you don't have the bash, !#/bin/sh works as well
Code:
#!/opt/bin/bash
on=1
if wl radio | grep 1 &> /dev/null
then
radio=off
else
radio=on
fi
while true
do
if [ $radio = "on" ]
then
echo "direction=out" > /proc/miscio/gpio_1_config
echo $on > /proc/miscio/gpio_1
if [ $on = 1 ]
then
on=0
else
on=1
fi
fi
if grep 1 /proc/miscio/gpio_6 &> /dev/null
then
if wl radio | grep 1 &> /dev/null
then
wl radio on
radio=on
else
wl radio off
echo "direction=out" > /proc/miscio/gpio_1_config
echo "0" > /proc/miscio/gpio_1
radio=off
fi
fi
sleep 1
done
--milky