The failsafe revert AP+STA problem to AP, so you can always login via wifi.
I have also done similar configures for TP 703N which have only 1 physical ethernet, where the ethernet becomes either WAN or LAN.
Flash with openwrt-clean-gl-ar150-1.0.bin
Copy all 4 .ipk files to /tmp
Copy the gl.tar files to /etc/config
Then run the following commands: -
opkg install /tmp/ip_4.0.0-1_ar71xx.ipk
opkg install /tmp/iwinfo_2015-06-01-ade8b1b299cbd5748db1acf80dd3e9f567938371_ar71xx.ipk
opkg install /tmp/kmod-macvlan_3.18.23-1_ar71xx.ipk
opkg install /tmp/wireless-tools_29-5_ar71xx.ipk
tar xvf gl.tar
chmod u+x *.sh
ln –s /tmp/wireless wireless
vi /etc/rc.local so it looks like this: -
Put your custom commands here that should be executed once
the system init finished. By default this file does nothing.
[ -x /etc/config/wifi.sh ] && /etc/config/wifi.sh
[ -x /etc/config/routes.sh ] && /etc/config/routes.sh
[ -x /etc/config/cleanupWifi.sh ] && ((/etc/config/cleanupWifi.sh)&)&
Then disable the firewall/luci: -
/etc/config/wirelessAP to change your AP wireless name/password
Run /etc/config/confWifi.sh to setup your wireless connections to your home network or hotspot
The symbolic link /etc/config/wireless to /tmp/wireless saves the wear on the flash as /tmp is ramdisk/swap
wifi.sh - this scans the airwave and connects to your profiles in /etc/config/wireless<number>.* if it’s is found. If none are found/cannot connect, your wifi becomes an AP. This is called in /etc/rc.local. You do not need to run this manually
On boot, it will wait for 10 seconds on WAN (ethernet/eth0) for a connecting. If this is successful local lan (ethernet/eth1) and wifi becomes access point.
If the WAN ethernet/eth0 connection is unsuccessful, it will scan the airwave and try to match a list of wifi connection profiles you have setup.When one is matched, it will try and connect. Should the connection failed or no matching profile is found, it will default to failsafe mode by becoming an Access Point (AP+STA problem). The local lan (ethernet/eth1) also serves local connections.
confWifi.sh – this scans the airwave and allows you to setup wireless profiles to connect to. The last option is for manual setup.
chgNetwork.sh – this changes your network so it does not clash on 192.168.6.x to 192.168.7.x. It will switch between 192.168.x.x. to 10.10.x.x. Will need a reboot after this
routes.sh – this defines the ipfilter rules for NAT and blocking rules. This is call in /etc/rc.local. There are 3 modes
routes.sh 0 – stricter using drop rules - default
routes.sh 1 – relax rules using accept.
routes.sh 2 – accept rules, no natting
regenMac.sh – regenerates random mac for wifi (mac spoofing). Use this if the cafe hotspot limits you to 30mins a day. There are 3 modes
regenMac.sh – kill off loop process
regenMac.sh 0 – regen once
regenMac.sh <number> - regen every X minutes
cleanupWifi.sh - cleanup wifi profile specify in days during confWifi.sh. This is call in /etc/rc.local
I have use android apps
Juicessh (xterm) and ssh hot button to config these on the go
Let me know if you have any questions