I am unable to run some scripts or to use the reset button to turn on and off the wifi, maybe more. I think I may have disabled something, but unclear what.
I have be testing out some different scripts for addressing the issues with an unavailable WWAN hanging up the WLAN.
I loaded this piece of code which deletes the STAtion from the wireless (STAtion reset). OpenWrt Forum Archive It works great. I have tested it as part of rc.local (startup) and as a function tied to the reset button. I preferred it the later way, as if I have a working STAtion I do not need to reconfigure things on every boot. I changed the times so as not to accidentally reset the device to factory.
I then tested this piece of code called autowan.sh. OpenWrt Forum Archive Could not get it to work. It uses a cron job.
Finally, I tested this piece of code, (wifimgr) OpenWrt Forum Archive and it’s where I think my problem began. It uses a list of defined SSIDs and keys to populate the STAtions. Great idea. Unfortunately I think it is missing some logic to actually check that the entry it’s changing is a STAtion. It just changes the first wifi-iface, which after using the first tool is the LAN not the WAN.
OK, so to configure this one places some code in the user/bin, etc/init.d and a new folder etc/wifimgr (list of stations). I set some permissions and start the tool
chmod 777 /usr/bin/wifiMgr.sh
chmod 777 /etc/init.d/wifiMgr
chmod 777 /etc/wifiMgr
chmod 777 /etc/wifiMgr/config
/etc/init.d/wifiMgr enable
/etc/init.d/wifiMgr start
So long story short, I could not stop it with /etc/init.d/wifimgr stop or disable (don’t have the error messages). I ended up having to go in through WinSCP and just renaming the files and reboot to make it quit. I think it mostly works, but not fully works, but that’s another post.
I tried to run the “STAtion reset” from the button yesterday, and it would not work. I have removed all the other code. The router seems to generally work, but I am not able to get either of the first 2 reset actions to work (see reset_modified_wcode). Have not tried the third, as I do not wish to reset the entire device. I tried having this to call a function in user/bin with no luck (also worked in the past). I have also copied the code into the Startup section below the GLI code (see startup). This worked fine before, but is not executed on reboot now. The wireless off/on function on the button does not appear to work either, which is why I am inclined to think it’s something other than these scripts. Not sure how to test or validate the other GLI startup scripts are working. I do not know if anything else is NOT working.
Any help is appreciated. I can run CLI commands, just not a clue as to what???
These scripts relate to these other posts on the forum, but once I get things sorted I will post another thread on what ever above works.
http://www.gl-inet.com/forums/topic/potential-rc-button-script-improvement/