mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-06-26 07:58:37 +02:00
Add a new script to toggle ap tx speed
This commit is contained in:
parent
2ede2d4b5e
commit
271f20c6a4
1 changed files with 17 additions and 0 deletions
17
scripts/toggle-tx-speed.rsc
Normal file
17
scripts/toggle-tx-speed.rsc
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Script to toggle wlan speeds.
|
||||||
|
|
||||||
|
:log info "Toggle TX Limits script is executed."
|
||||||
|
|
||||||
|
:local txLimit
|
||||||
|
|
||||||
|
:set txLimit [/interface/wireless/get [find] default-ap-tx-limit]
|
||||||
|
|
||||||
|
:tonum $txLimit
|
||||||
|
|
||||||
|
:if ( $txLimit = 0 ) do={
|
||||||
|
/interface/wireless/set [find] default-ap-tx-limit=2M
|
||||||
|
:log info "Wlan speed is restricted to 2Mbps."
|
||||||
|
} else={
|
||||||
|
/interface/wireless/set wlan1 default-ap-tx-limit=0
|
||||||
|
:log info "Wlan doesn't have speed limits now."
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue