Hi all,
I'm tring to make my router an AP with a vodafone UMTS modem (Huawei E220)
I've sucessefuly configured the modem however I would like to know how could I use the buttuns to disable and enabling the connection. I've found this:
******************************************************************************
http://wiki.openwrt.org/MobileAPHowTo2
6. Misc
How about a little script to monitor the SES button and connect?
root@OpenWrt:~# vi /usr/sbin/dialmon
#!/bin/sh
junk=0
until [ $junk -eq 1 ]
do
sleep 1
read junk </proc/sys/button
done
# turn on white LED in SES button
echo 32 > /proc/sys/diag
/usr/sbin/pppd call cingular
root@OpenWrt:~# chmod +x /usr/sbin/dialmon
Let's use SES amber to show connect status. Add echo to these files:
root@OpenWrt:~# cd /etc/ppp
root@OpenWrt:~# rm ip-up ip-down
root@OpenWrt:~# cp /rom/etc/ppp/ip-up .
root@OpenWrt:~# cp /rom/etc/ppp/ip-down .
root@OpenWrt:~# vi ip-up
#!/bin/sh
[ -z "$6" ] || env -i ACTION="ifup" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface"
echo 33 > /proc/sys/diag
root@OpenWrt:~# vi ip-down
#!/bin/sh
[ -z "$6" ] || env -i ACTION="ifdown" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface"
echo 0 >/proc/sys/diag
Now just run "dialmon &", and push the button!
******************************************************************************
However this doesn't work on asus.
Al the Information I've found was this:
The reset button does not work (due largely to mis-mapped /proc/sys/reset)
gpio 0 = RESTORE button (reset) (00 = unpressed, 01 = pressed)
gpio 1 = Power LED (enable = off, disable = on)
gpio 4 = EZ SETUP button (similar to linksys "button"?) (00 = unpressed, 01 = pressed)
Can anyone help me making a script using the buttons?