Turn On-Off Wifi with Atheros and Cron (archer C5/C7)

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3, 4, 5
Author Message
bluecatus
DD-WRT Novice


Joined: 22 May 2017
Posts: 5

PostPosted: Sat Aug 12, 2017 10:45    Post subject: Reply with quote
Thanks for reply,

But the script only turn off ath0 (2.4GHz), not ath1 (5Hz). I used this on buffalo WZR-600DHP with factory ddwrt firmware (red ddwrt). I don't know why.

As screenshot:

[img]https://my.pcloud.com/publink/show?code=XZJL7oZHsXBMzAd2OJXpYGhmMGRYQ9dGNRV[/img]

[img]https://my.pcloud.com/publink/show?code=XZQL7oZNCEY7Jx2FYYb22En0aJ0sV7H7VB7[/img]

Thanks again.

P/S: Plazma please help.
Sponsor
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Sat Aug 12, 2017 12:32    Post subject: Radio Scheduling Reply with quote
Radio Scheduling, exactly what the script is trying to do was added recently. I know for sure it is in build 33006 and above. Update to a newer build and stop using the script.
_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings


Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.

Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS

Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
bluecatus
DD-WRT Novice


Joined: 22 May 2017
Posts: 5

PostPosted: Sat Aug 12, 2017 15:06    Post subject: Re: Radio Scheduling Reply with quote
ian5142 wrote:
Radio Scheduling, exactly what the script is trying to do was added recently. I know for sure it is in build 33006 and above. Update to a newer build and stop using the script.


1. Please send me the link to download the latest firmware (pro version).
2. Could I upgrade buffalo firmware (wzr-600dhp) to ddwrt community firmware? and can I back to buffalo firmware?

Thanks.
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Sat Aug 12, 2017 19:39    Post subject: No PRO version Reply with quote
I have never seen a pro version of dd-wrt. It is mostly opensource (except GUI) software. All beta builds are here: ftp://ftp.dd-wrt.com/betas/

That Buffalo router is actually already running a rebranded version of dd-wrt. So, yes, all you are really doing is upgraded to a much newer version.

_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings


Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.

Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS

Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
bluecatus
DD-WRT Novice


Joined: 22 May 2017
Posts: 5

PostPosted: Sat Aug 12, 2017 23:05    Post subject: Re: No PRO version Reply with quote
ian5142 wrote:
I have never seen a pro version of dd-wrt. It is mostly opensource (except GUI) software. All beta builds are here: ftp://ftp.dd-wrt.com/betas/

That Buffalo router is actually already running a rebranded version of dd-wrt. So, yes, all you are really doing is upgraded to a much newer version.


Thanks for your help.
bluecatus
DD-WRT Novice


Joined: 22 May 2017
Posts: 5

PostPosted: Sun Aug 13, 2017 1:45    Post subject: Re: No PRO version Reply with quote
ian5142 wrote:
I have never seen a pro version of dd-wrt. It is mostly opensource (except GUI) software. All beta builds are here: ftp://ftp.dd-wrt.com/betas/

That Buffalo router is actually already running a rebranded version of dd-wrt. So, yes, all you are really doing is upgraded to a much newer version.


Hi bro,

I followed this instruction: (http://www.dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-AG300H#WZR-600DHP)
to upgrade firmware with this one(ftp://ftp.dd-wrt.com/betas/2017/08-03-2017-r33006/buffalo_wzr-600dhp/buffalo_to_ddwrt_webflash-MULTI.bin)
but updrage fail.

I'm using this firmware: https://my.pcloud.com/publink/show?code=XZWdkoZPV6zxRFn4Y78tNT7GGi8wSdpTh97

If you have any help, please tell me.
Thanks.
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Sun Aug 13, 2017 12:34    Post subject: TFTP Reply with quote
You can try TFTP as per that wiki page: http://www.dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-AG300H#WZR-600DHP

I do not own this router, so I am only guessing.

You are using the correct file, reset to defaults first, then try and upload it through the GUI. If that does not work use TFTP, with a switch, or another router set up as a switch, in between the computer and the Buffalo router.

_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings


Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.

Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS

Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
Lennard
DD-WRT Novice


Joined: 19 Jul 2017
Posts: 18
Location: NL

PostPosted: Sun Aug 13, 2017 14:39    Post subject: Radio status not accurate Reply with quote
For the last week i've been trying to implement the script Plazma wrote, but without success. It wasn't working for me Sad
Maybe it was because I was using an old build. So I was going to try a new build and, like ian5142 pointed out, it has built in support now for wifi scheduling (maybe the script can still be used for more accurate scheduling).
So first I want to say thank you to the DD-WRT devs and the contributors to this thread.

I tested the new build with wifi schedule and it works great, but i found that the status of the wifi radio is not updated according to the schedule. Note that wifi radio is turned on and off correctly according to the schedule, but not the status in the Status->Wireless screen. After reboot the status is shown correctly.

I downloaded from betas->2017->08-03-2017-r33006, but in status->router it says I'm using build r32597 on a TP-Link WR1043ND v.1
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Sun Aug 13, 2017 15:59    Post subject: Ticket on SVN Reply with quote
Create a ticket on the SVN timeline about the status of the wireless radio when using scheduling. Put as much info as you can into it, what build, linux kernel, what routers it affects, screenshots, etc.

http://svn.dd-wrt.com/timeline

Don't expect it to be fixed quickly.

_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings


Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.

Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS

Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
LeeBee
DD-WRT Novice


Joined: 16 Apr 2018
Posts: 7

PostPosted: Tue May 22, 2018 20:27    Post subject: Reply with quote
Thanks to jean019 for the script and manual!

I tried to apply all this to the Atheros based TP-Link TL-WA854RE Rev. V1 (--> DD-WRT forum thread) running the latest firmware which was verified working with this model, DD-WRT 2018-03-05 r35244. That fw is missing Administration/ Management, it only has Administration/ Commands.

Does anybody know if the new firmware 2018-05-13 r35927 for the TL-WA901NDv3 and TL-WA854REv1 has added the Management tab under Administration, or if it can be added to the fw? (I am very hesitant to be the 1st to install this most recent untested fw to the repeater)
Eber
DD-WRT Novice


Joined: 19 Mar 2020
Posts: 12

PostPosted: Fri Mar 20, 2020 11:48    Post subject: Re: Turn On-Off Wifi with Atheros and Cron (archer C5/C7) Reply with quote
jean019 wrote:
I just worked today on an archer C5/C7.
My aim was to turn the wifi off at night during the week end.
Turning on/off the wifi with Atheros hardware is a mess (no "wl" command, only a useless "wl_atheros" command).
"ifconfig ath0 down" alone doesn't cut wifi transmission ("TX power" still indicates a fixed "17 Dbm", not "Radio Off").
I'm not a linux specialist, I searched in the forum. This is a mix of what I found.

I only use ath0 2,4Ghz wifi interface. Process is the same with 5Ghz ath1 . The following command seems to work :

First, create a custom script (put in Admnistration \ Command \ Custom script ) :

Code:

#!/bin/sh
case "$1" in
  wifioff)
    stopservice wland
    nvram set ath0_net_mode=disabled
    ifconfig ath0 down
    killall hostapd
    ;;

  wifion)
    stopservice lan
    nvram set ath0_net_mode=ng-only
    startservice lan
    iwconfig ath0 txpower 12
    ;;

  *)
    echo "$0 {wifioff | wifion}"
esac



Not sure if the last "iwconfig ath0 txpower" is really necessary but I prefer (12dbm for me).
You can replace "ng-only" with the mode you want (choose the value in the GUI, then telnet "nvram show | grep ath0_net_mode" to check the value.

Then add a Cron job in Administration \ Management :
Code:

30 0 * * 0,6 root /tmp/custom.sh wifioff
30 9 * * 0,6 root /tmp/custom.sh wifion


to turn wifi off at 0:30 and on at 9:30 (only during the week end, 0 is sunday, 6 is saturday).
And it works for me.
I'm not sure everything is useful but it works.

Please note : to turn on wifi, you can try "stop/startservice wland", instead of lan.
On the archer C5/C7, it's very slow with wland, 1min30 to turn the wifi on, against 10sec for stop/startservice lan". I don't know why.
Smile


A comparison between some Broadcom and Atheros commands :
Code:

Broadcom         | Atheros
wl assoclist      | wl_atheros assoclist (wlanconfig ath0 list sta)
wl radio up    | ifconfig ath0 up
wl radio down   | ifconfig ath0 down
wl txpwr1 -d n   | iwconfig ath0 txpower n


I took the script from there :
http://superuser.com/questions/380468/is-there-a-persistant-storage-in-router-with-dd-wrt


Hi All
This is my second try at the forum. My apologies as I am a true newb. I have been looking for a simple solution .
This script still works in an archer c7 v4, right? Is it saved startup?
I wish to use it and turn ath0 off at 11:15 am Saturday and back on at 1:15 saturday. I am not a coder at all whatsoever,
but i have been looking at a lot of cron info for this.
Thanks
Eber
DD-WRT Novice


Joined: 19 Mar 2020
Posts: 12

PostPosted: Sat Mar 21, 2020 10:52    Post subject: Reply with quote
tried it anyway, it did not work
Goto page Previous  1, 2, 3, 4, 5 Display posts from previous:    Page 5 of 5
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum