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