Author
Message
Shocker580 DD-WRT User Joined: 04 Jan 2013 Posts: 131
Posted: Sun Sep 01, 2013 20:24 Post subject:
Perfectly working!
Thank you
Back to top
Sponsor
alexcand DD-WRT Novice Joined: 01 Sep 2013 Posts: 6
Posted: Mon Sep 02, 2013 11:44 Post subject:
You're welcome!
Back to top
kuruczfarm DD-WRT Novice Joined: 17 Jun 2010 Posts: 31
Posted: Fri Sep 06, 2013 11:08 Post subject:
Hi,
I got problem with iwlist command, I tried to query txpower info, but I got no asnwer, only the prompt.
root@DD-WRT:~# iwlist ath0 txpower
root@DD-WRT:~#
Running iwconfig does not show up ath0 interface:
root@DD-WRT:~# iwconfig
vlan1 no wireless extensions.
lo no wireless extensions.
br0 no wireless extensions.
tun2 no wireless extensions.
eth0 no wireless extensions.
vlan2 no wireless extensions.
However,ifconfig shows ath0 interface:
ath0 Link encap:Ethernet HWaddr B0:48:7A:B0:17:62
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:663381 errors:0 dropped:0 overruns:0 frame:0
TX packets:672564 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:612973861 (584.5 MiB) TX bytes:656995130 (626.5 MiB)
What can be the problem?
TL-WR1043ND b22118
Back to top
DaBear78 DD-WRT Novice Joined: 13 Oct 2013 Posts: 3
Posted: Sun Oct 13, 2013 8:06 Post subject:
I tried these commands (TL-WR1043ND):
Code: 00 8 * * * root ifconfig ath0 up; iwconfig ath0 txpower 20; startservice lan
00 22 * * * root ifconfig ath0 down; iwconfig ath0 txpower 0
And there seems to be some kind of problem. When I execute the commands directly via the interface everything works as expected, but when I try to run them as a cronjob the 'down' section does not work (if I manually power the wlan off the 'up' part works as intended). The router is doing something (high cpu load, lag for a few seconds) but after that the wlan is still up... Any ideas?
Back to top
Shocker580 DD-WRT User Joined: 04 Jan 2013 Posts: 131
Posted: Sun Oct 13, 2013 9:20 Post subject:
This is my configuration
Code: 30 08 * * * root ifconfig ath0 up; iwconfig ath0 txpower 15; startservice lan
30 00 * * * root ifconfig ath0 down; iwconfig ath0 txpower 0
and works.
I've 21676. I read somewhere that some versions of dd-wrt have a bug on cron. Check
Back to top
DaBear78 DD-WRT Novice Joined: 13 Oct 2013 Posts: 3
Posted: Sun Oct 13, 2013 11:14 Post subject:
Shocker580 wrote: This is my configuration
Code: 30 08 * * * root ifconfig ath0 up; iwconfig ath0 txpower 15; startservice lan
30 00 * * * root ifconfig ath0 down; iwconfig ath0 txpower 0
and works.
I've 21676. I read somewhere that some versions of dd-wrt have a bug on cron. Check
I have 22118 (BrainSlayer build). Where can I see if it has the cron bug? And why is the 'up' part working, but not the 'down' part?
Back to top
Shocker580 DD-WRT User Joined: 04 Jan 2013 Posts: 131
Posted: Sun Oct 13, 2013 11:30 Post subject:
DaBear78 wrote: Shocker580 wrote: This is my configuration
Code: 30 08 * * * root ifconfig ath0 up; iwconfig ath0 txpower 15; startservice lan
30 00 * * * root ifconfig ath0 down; iwconfig ath0 txpower 0
and works.
I've 21676. I read somewhere that some versions of dd-wrt have a bug on cron. Check
I have 22118 (BrainSlayer build). Where can I see if it has the cron bug? And why is the 'up' part working, but not the 'down' part?
If in part, cron works I don't think you are affected by this bug. Try to copy and paste my configuration and try again.. It's strange that not work.
Back to top
DaBear78 DD-WRT Novice Joined: 13 Oct 2013 Posts: 3
Posted: Sun Oct 13, 2013 12:18 Post subject:
I copied it and it doesn't work...
I installed the firmware again and resetted the settings, now it works... Thx for the help
Back to top
Harm DD-WRT Novice Joined: 16 Jan 2015 Posts: 8
Posted: Sat Jan 17, 2015 19:08 Post subject:
For r21061 the above solution works great, for r25934 I had to put in an aditionally stopservice lan. Don't forget to startservice lan again (otherwise you won't be able to access the router using ip until next reboot).
15 1 * * * ifconfig ath0 down; iwconfig ath0 txpower 0;
45 6 * * * stopservice lan; ifconfig ath0 up; iwconfig ath0 txpower 12; startservice lan;
Back to top
plazma DD-WRT User Joined: 22 Feb 2012 Posts: 68
Posted: Wed Jun 22, 2016 12:32 Post subject:
I found this thread why looking for a solution to schedule the wifi on atheros units.
However it didnt work for me, ath0 didnt want to come back up.
Ive posted a working solution to the problem here for anyone that stumbles onto this thread.
Back to top