Setting a static IP
Posted: Wed Sep 09, 2015 11:44 pm
I managed to set a static IP in the following and thought I should share.
Edit the wpa_actions.sh file
Comment following line:
Then add these lines:
Further I commented this line in:
This prevents falling back to ap_mode. Since the /tmp/isalive is never created
Edit the wpa_actions.sh file
Code: Select all
nano /root/wifi/wpa_action.sh
Comment following line:
Code: Select all
# udhcpc -i $IFACE -t 15 -b &
Then add these lines:
Code: Select all
ifconfig $IFACE 192.168.2.121 netmask 255.255.255.0
route add default gw 192.168.2.1
echo "nameserver 192.168.2.1 # wlan0" > /tmp/resolv.conf
Further I commented this line in:
Code: Select all
nano /etc/init.d/S41wireless
#/root/wifi/check_wifi.sh &
This prevents falling back to ap_mode. Since the /tmp/isalive is never created