Set Power command

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
wiredcharlie
DD-WRT Novice


Joined: 17 Aug 2013
Posts: 15

PostPosted: Sat Dec 02, 2017 11:15    Post subject: Set Power command Reply with quote
I want to be able to reduce the Tx power using cron in order to inconvenience my teenage son at bedtime.

Atheros router so no wl command.

So far my best try is:
Code:
iw phy0 set txpower fixed 20
command failed: Operation not supported (-122)


Any ideas please.

Tony
Sponsor
numerci
DD-WRT User


Joined: 02 May 2012
Posts: 134

PostPosted: Sat Dec 02, 2017 12:08    Post subject: Reply with quote
I had the same problem as you... as it seem that command is deprecated. Try with something like this: iwconfig ath0 txpower 20
wiredcharlie
DD-WRT Novice


Joined: 17 Aug 2013
Posts: 15

PostPosted: Sat Dec 02, 2017 15:00    Post subject: Reply with quote
Thanks, but no iwconfig!

root@TV:~# cd /usr/sbin
root@TV:/usr/sbin# ls
bcrelay dropbearconvert nvram svqos2
bird dropbearkey olsrd swconfig
bpalogin dropbearmulti pppd tc
brctl dumpleases pptp telnetd
chilli ebtables pptpctrl udhcpc
chilli_multicall fischecksum pptpd udhcpd
chilli_opt hostapd radius-client upnp
chilli_query httpd radiusallow wdctl
chilli_radconfig igmprt radiusdisallow wifidog
chilli_response inadyn relayd wiviz
cron ip sendmail wl_atheros
dhcp_lease_time iptables snmpd wol
dhcp_release iptables-restore speedicmp wpa_supplicant
dhcpfwd iw speedsrv wpad
dnsmasq notifier speedtest wrt-radauth
dropbear ntpclient svqos xl2tpd
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2319
Location: Canada

PostPosted: Sat Dec 02, 2017 16:13    Post subject: GUI Reply with quote
The Tx power is changeable in the GUI. Wireless tab - Basic Settings, then check the advanced tickbox. Atheros uses Tx power in dBm, where 30 dBm is 1 watt.

See this link for more info: https://www.dd-wrt.com/wiki/index.php/Atheros/ath_wireless_settings#TX_Power

_________________
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
wiredcharlie
DD-WRT Novice


Joined: 17 Aug 2013
Posts: 15

PostPosted: Sun Dec 03, 2017 9:16    Post subject: Reply with quote
Thank you, but I can't see how it helps.

Quote:
I want to be able to reduce the Tx power using cron in order to inconvenience my teenage son at bedtime.
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7568
Location: YWG, Canada

PostPosted: Sun Dec 03, 2017 11:28    Post subject: Reply with quote
clearly u didnt read. if thats not good enough, then just scrap that, and use access restrictions.

OR. if that still doesnt work, consider scrapping the idea period. hes ur son, hes a teenager, not a young child... (u know where im going with this but i wont say it)

_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r55797 std
[QUALCOMM] DIR-862L --------------------------------> r55797 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

wiredcharlie
DD-WRT Novice


Joined: 17 Aug 2013
Posts: 15

PostPosted: Sun Dec 03, 2017 13:14    Post subject: Reply with quote
Need command to work with cron not GUI
numerci
DD-WRT User


Joined: 02 May 2012
Posts: 134

PostPosted: Sun Dec 03, 2017 16:43    Post subject: Reply with quote
For Cron try like this:

00 22 * * * root iw dev ath0 set txpower fixed 500
00 06 * * * root iw dev ath0 set txpower fixed 2000

More info here: https://www.dd-wrt.com/forum/viewtopic.php?p=1094565&sid=1aabc9731d2a9cd0e064b01f53e82f14
wiredcharlie
DD-WRT Novice


Joined: 17 Aug 2013
Posts: 15

PostPosted: Sun Dec 03, 2017 21:26    Post subject: Reply with quote
Brilliant! Thank you, numerci.

The crucial detail is
Quote:
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>
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6447
Location: UK, London, just across the river..

PostPosted: Sun Dec 03, 2017 23:58    Post subject: Reply with quote
numerci wrote:
For Cron try like this:

00 22 * * * root iw dev ath0 set txpower fixed 500
00 06 * * * root iw dev ath0 set txpower fixed 2000

More info here: https://www.dd-wrt.com/forum/viewtopic.php?p=1094565&sid=1aabc9731d2a9cd0e064b01f53e82f14


if those ones are not working you can try:
00 22 * * * root ifconfig ath0 down; iwconfig ath0 txpower 0
00 06 * * *root ifconfig ath0 up; iwconfig ath0 txpower 25; stopservice lan; startservice lan

as ath0 is part of the LAN to get it up and running you need start /stop lan command

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Display posts from previous:    Page 1 of 1
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