openwrt uci常用命令

1.修改 br-lan 的默认IP,网关,dns:

uci set network.lan.ipaddr=192.168.2.1      
uci set network.lan.gateway=192.168.1.1     
uci set network.lan.dns=8.8.8.8 
uci commit network
wifi down
wifi

2.作为sta模式连接到路由器

开启WIFI功能,MR10U刷OpenWrt默认没启用WIFI
uci set wireless.@wifi-device[0].disabled=0
uci commit wireless
wifi

创建wwan接口
uci set network.wwan=interface
uci set network.wwan.proto=dhcp
uci commit network

连接上级路由,
uci set wireless.radio0.channel=11  #与上级路由使用同样的通道
uci set wireless.@wifi-iface[0].network=wwan
uci set wireless.@wifi-iface[0].mode=sta
uci set wireless.@wifi-iface[0].ssid=ssid
uci set wireless.@wifi-iface[0].encryption=psk2 
uci set wireless.@wifi-iface[0].key=passwd  
uci commit wireless
wifi down
wifi
阅读更多
文章标签: openwrt uci
个人分类: Openwrt
上一篇linux c编程中调用 shell 命令
下一篇openwrt 编译时,指定root密码
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭