This has used to work fine till the 33xxx versions. Also still works well on Archer C7 on builds 33xxx, but not with 841N.
I do not think that the cron jobs are at fault but the commands are not accepted anymore. If I try to run them from the run command the following error is displayed:
Command: iwconfig ath0 txpower 5
Error: sh: eval: line 1: iwconfig: not found
Any hints how to get around this error?
Last edited by numerci on Thu Sep 14, 2017 17:16; edited 2 times in total
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
Posted: Wed Sep 13, 2017 14:27 Post subject: Re: Cron scripts not running as before
numerci wrote:
...
00 22 * * * root iwconfig ath0 txpower 5
00 07 * * * root iwconfig ath0 txpower 20
....
I do not think that the cron jobs are at fault but the commands are not accepted anymore. If I try to run them from the run command the following error is displayed:
Command: iwconfig ath0 txpower 5
Error: sh: eval: line 1: iwconfig: not found
Any hints how to get around this error?
Try specifying full path to iwconfig, for example,
Ok, it seem that iwconfig command is deprecated and was replaced by iw. On this command the router seem to respond but I need to see how it can be correctly used.
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
Posted: Wed Sep 13, 2017 16:21 Post subject:
numerci wrote:
Ok, it seem that iwconfig command is deprecated and was replaced by iw. On this command the router seem to respond but I need to see how it can be correctly used.
Glad to know it helps.
BTW, some Linux distributions might put iwconifg in directories other than /sbin. So don't just assume the locations of certain commands. Search for it using find or ls. _________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
You can set the txpower by using either the device interface name of the respective phy.
iw dev <devname> set txpower <auto|fixed|limit> [<tx power in mBm>]
iw phy <phyname> set txpower <auto|fixed|limit> [<tx power in mBm>]
(Note that the value this commands takes is in millibel-milliwatts (mBm) instead of the commonly used decibel-milliwatts (dBm). <power in mBm> = 100 * <power in dBm>)
The command was accepted but has not changed anythig.
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
Posted: Wed Sep 13, 2017 19:48 Post subject:
numerci wrote:
For iw these would be the options:
Setting TX power
You can set the txpower by using either the device interface name of the respective phy.
iw dev <devname> set txpower <auto|fixed|limit> [<tx power in mBm>]
iw phy <phyname> set txpower <auto|fixed|limit> [<tx power in mBm>]
(Note that the value this commands takes is in millibel-milliwatts (mBm) instead of the commonly used decibel-milliwatts (dBm). <power in mBm> = 100 * <power in dBm>)
The command was accepted but has not changed anythig.
iw dev ath0 set txpower fixed [500]
Maybe I have misunderstood the 500 value.
Or maybe DD-WRT doesn't understand iw but iwconfig? Need expert opinions!
BTW, you might wanna update the subject of your post. It's no longer about cron but iwconfig! _________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
It used to work fine with iwconfig on TP_link 841N v9 and it still works fine on Archer C7 v2. Is not a big issue but would be nice to have this working again.
Problem is that I do not understand what is wrong.
Old entry that was needed on the Cron jobs that is not working anymore:
00 22 * * * root iwconfig ath0 txpower 5
00 07 * * * root iwconfig ath0 txpower 20
Needs to be replaced with:
00 22 * * * root iw dev ath0 set txpower fixed 500
00 07 * * * root iw dev ath0 set txpower fixed 2000