|
折腾了一晚上k3.早晨发一下心得,刷了一下tb梅林。信号比官方固件稍弱,但也没弱多少没什么大感觉。但是tb工具箱是联网的。所以万一哪天服务器挂了这个脚本估计也就GG了。自己又懒得去翻脚本备份。于是刷回了官改。但是刷过官改的朋友可能知道。官改的自动重启和关闭wifi不能用。只能在高级设置改。研究了一下。现发一下简易教程(炒冷饭2333).大佬请无视。。。ssh连路由器(怎么连接就不说了,大佬教程都有)
crontab -e 可以看到当前的定时任务
下面列出一个模板
- 0 0 * * * wifi 2 down && wl -i eth2 pwr_percent 8 #2.4G关闭,5G变成百分之8
- 0 2 * * * wifi 5 down #5G关闭
- 30 5 * * * wifi up #开启wifi
- 31 5 * * * reboot #重启
- 35 5 * * * wl -i eth2 pwr_percent 40 && wl -i eth1 pwr_percent 40 #2.4G和5G信号调节百分之40
复制代码
时间自己改。另附大佬推荐的验证网站:http://www.atool.org/crontab.php
提示一下:
wifiup执行后,功率会变回去
reboot执行后,功率会变回去
重启后要设置新命令要间隔2min+
摘抄的一些对我而言比较有用的东西:
或者参考官方命令(V21.6.8.46、V21.6.11.58 以上版本才支持) 数字 100 穿墙、75 正常、50 节能,可以自己修改相应数字大小来调节
2.4G
wl -i eth1 pwr_percent 75
5G
wl -i eth2 pwr_percent 100
无线设置??
# wl status
# Print information about current network association
# 查看2.4G 状态
wl -i eth1 status
# 查看5G 状态
wl -i eth2 status
# wl curpower
# Return current tx power settings
# 查看2.4G当前功率
wl -i eth1 curpower
# 查看5G当前功率
wl -i eth2 curpower
# wl txpwr_target_max
# Return current max tx target power settings.
# 查看2.4G当前最大功率
wl -i eth1 txpwr_target_max
# 查看5G当前最大功率
wl -i eth2 txpwr_target_max
# wl txpwr1
# Set tx power in in various units. Choose one of (default: dBm):
# -d dBm units (range: -32 - 31)
# -q quarter dBm units (range: -128 - 127)
# -m milliwatt units
# Can be combined with:
# -o turn on override to disable regulatory and other limitations
# 临时设置,重启恢复(胡乱设置可能损坏硬件)
# 临时设置2.4G功率 为20dBm
wl -i eth1 txpwr1 -o -d 20
# 临时设置2.4G功率 为20dBm
wl -i eth2 txpwr1 -o -d 20
计划任务
时间+命令的格式 添加到/etc/crontabs/admin里面,可以到http://www.atool.org/crontab.php网站学习验证测试
通过cru、crontab命令也可以,实质都是编辑的这个文件。
# 4点30定时重启废弃,官方已经集成
30 4 * * * /sbin/reboot # auto_reboot
# wifi控制
# 文件/opt/bin/wifi,可以完全关闭,K3功耗实测:熄屏、无USB、待机状态功耗10.8w,关闭wifi功耗6.4w
# 安装
wget -qO- http://oofxy4e74.bkt.clouddn.com/wifi|sh
# 手动控制 (单个关闭会禁用双频合一)
# 全部开启
wifi up
# 开启 2.4G
wifi 2 up
# 开启 5G
wifi 5 up
# 全部关闭
wifi down
# 关闭 2.4G(访客网络依赖2.4G)
wifi 2 down
# 关闭 5G
wifi 5 down
# 定时控制,使用/opt/bin/wifi绝对路径,添加到/etc/crontabs/admin
# 23点关闭wifi
0 23 * * * /opt/bin/wifi down
# 6点开启5G
0 6 * * * /opt/bin/wifi 5 up
A大固件帖子:
https://www.right.com.cn/forum/thread-259012-1-1.html
大部分内容摘抄自:
1.https://www.right.com.cn/forum/thread-212725-1-1.html
2.https://tbvv.net/posts/0101-k3.h ... F%E7%8E%87%EF%BC%9F
感谢大佬的无私奉献!
|
|