I am using OpenWRT on a TP-Link TL-WDR4300 v1 (and shortly also a Ubiquiti UniFi UAP AC Lite).
Is it possible to create a macro and use cron to schedule it, so that the wifi broadcast strength is reduced at night?
Many thanks in advance for any help received.
@jdkp, welcome to the community.
Yes, it's possible. Just cron the commands/script that edits that and commits.
uci set wireless.radio0.txpower='13' uci commit
Thank @aboaboit, I edit the files...so thanks for the command UCI pseudocode example!
@jdkp, be sure to look at the Wiki and your own device to ensure it's: named radio0, correct maximum power, etc.
I also edit the files normally but I got curious to try this way since my first idea was a direct call to "iw"
Thanks for the welcome and not least the help.
Good to know its possible but now I need to read the wiki through to see how to do it in practice with an ssh connection
Through SSH, you edit
/etc/crontabs/root to add to the cron.
Great! Many thanks. I’ll give it a go tomorrow
Hello, good idea. I tried to add it to cron, but no change. On cli command is working fine.
I created wifidown.sh chmoded -X and added to cron but still not working. Can you help me?
wifidown.sh #/bin/sh /sbin/uci set wireless.radio0.txpower='5' /sbin/uci commit /sbin/wifi reload wifiup.sh #/bin/sh /sbin/uci set wireless.radio0.txpower='20' /sbin/uci commit /sbin/wifi reload
53 13 * * * /bin/sh /skripty/wifidown.sh
time is because of testing
I tried running script manually via cli and change was applied.
edit2 solved by enabling and starting cron. (I thinkd, it is enabled
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.