Postby qwiksilver96 » Fri Feb 05, 2016 8:16 pm
The changes listed above did not work on my rooted hub. I made some slight tweaks shown below and now I have a working static IP. FYI, I am on firmware 2.49 (just released today on 2/5/2016).
NOTE!: Make a backup of your wpa_action.sh file by using this command (prior to changing your file):
cp /root/wifi/wpa_action.sh /root/wifi/wpa_action.sh_bak
After the file is saved, you can test the script by running the following:
sh /root/wifi/wpa_action.sh wlan0 CONNECTED
ifconfig
#!/bin/bash
IFACE=$1
EVENT=$2
case $EVENT in
CONNECTED) logger -p notice -s "Received event: $EVENT"
set_rgb 127 83 0 0 0 0 flash 500000
echo "ATTEMPTING_TO_GET_IP" > /tmp/connection_status
# udhcpc -i $IFACE --retries 15 --timeout 3 --syslog --tryagain 10 -R
ifconfig $IFACE 192.168.0.97 netmask 255.255.255.0
route add default gw 192.168.0.1
echo "nameserver 192.168.0.50 # wlan0" > /tmp/resolv.conf
echo "1" > /tmp/isalive #THIS IS REQUIRED TO KEEP THE HUB FROM ENTERING AP MODE (WIFI CONFIGURATION MODE)
;;
DISCONNECTED) logger -p notice -s "Received event: $EVENT"
source /usr/sbin/terminate_verify
# Kill udhcpc gently so it releases our IP (the -R option must be specified at startup)
terminate_verify udhcpc
set_rgb 127 127 0 0 0 0 flash 250000
echo "DISCONNECTED" > /tmp/connection_status
;;
*) logger -p error -s "Strange event: $EVENT"
;;
esac
exit $?