admin管理员组

文章数量:1661317

路由器 tp-link ac 1750

已经烧录openwrt 组件
博主使用的 路由器 型号 且已经烧录好了 openwrt 组件 以及 Luci 插件

页面配置展示

手动修改 wifi 环境

Network -> Wireless

博主的路由器配置

以修改2.4G为例


接下里展示命令行切换

登录

  • ssh 方式
coco@cocodeMBP ~ % ssh root@192.168.1.1
root@192.168.1.1's password: 
# 输入烧录openwrt是的 登录密码

修改配置

将wifi环境修改至如下配置
热点名字 coco is handhome 2G
密码 12345678
加密方式 WPA2-PSK

uci set wireless.@wifi-iface[1].ssid='coco is handsome 2G'
uci set wireless.@wifi-iface[1].key='12345678'	
uci set wireless.@wifi-iface[1].encryption=psk2

# 提交配置
uci commit
/etc/init.d/network restart

参数获取

uci set wireless.@wifi-iface[1].encryption=psk2 中的参数 psk2 可从页面源码中获取

其他命令

查看配置信息

uci show
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
...

查看节点信息

uci get wireless.wifinet2.ssid
coco is handsome 2G

本文标签: 可编程路由命令行环境OpenWRT