Posted: Sun Mar 25, 2012 9:28 Post subject: Startup script for wireless schedule
Hi,
Is it possible to make an script that when the router is rebooted (on startup) it will check if wireless interface should be up in a specified time interval (when the router is rebooted wireless by default will be up) and if that's the case it will turn off the wireless until crond will turn it on.
It would be very nice if a graphical menu will be included in future builds because from my point of view this is very important (security and health)
After many trials and errors I have found the combination of commands that work very well with cron in r18777:
Hi bohea
thank you very much for posting this.
I have tried serveal hours without succuss, until I found your advice to put the second command /usr/sbin/iwconfig ath0 txpower 0 seperated with ";" after the first command "ifconfig ath0". I eperimented with both. So now I am lucky on my device TL-WR1043ND. Now I can turn off my device during the night.
Best regards and thanks
Ralf
+1 Please give us some more details where you place these commands.
I have tried to set these in the Administration>Commands and save to Startup but nothing happens. Also tried to add the commends to Administration>Management>Cron but still nothing.
these should even stop wired connection. If there are changes applied to the config at this time, they automatically apply.
For example I am providing internet access to a public cafe bar. But they want to have password so that nobody from the same building connects for free. I have arranged it so that the wpa password changes every night like so: 'cafebarXX' where XX is the day of month. For example on the 15th each month the password is cafebar15, on the 16th it would be cafebar16 etc.
These commands are part of the first post and will make the wireless network not connectable but will still broadcast signal. This is what I want to achieve.
None of the commands on this thread has stopped the broadcast. These only made to network connection impossible.
ON WRT160NL works fine be adding something like this in CRON:
30 08 * * 1 root /sbin/ifconfig ath0 down; iwconfig ath0 txpower off
00 18 * * 1 root /sbin/ifconfig ath0 up
Don't forget to restart the router after adding them.
However on WR740N it doesn't work. My guess is that because this is used as a Client Bridge. Found a very old post stating that is not supposed to work in Client Bridge mode. I would have liked to shot down the bridge when is not in use...