[] Openwrt wifi modify configuration information

wifi openwrt system configuration information stored in the directory / etc / config / wireless

root@LEDE:/# cat /etc/config/wireless

config wifi-device 'mt7628'
    option type 'mt7628'
    option vendor 'ralink'
    option band '2.4G'
    option channel '0'
    option auotch '2'

config wifi-iface
    option device 'mt7628'
    option ifname 'ra0'
    option network 'lan'
    option mode 'ap'
    option encryption 'psk2'
    option key '12345678'
    option ssid 'TEST_WIFI'

Method a: wireless information can be edited directly, and then restart wifi

root@LEDE:/# vim wireless

Modify the content needs to be modified

root@LEDE:/# wifi restart

 

Method Two: Modify command WiFi information UCI

Modify the main parameters are listed below

root@LEDE:/# uci set wireless.@wifi-iface[0].ssid=testwifi
root@LEDE:/# uci set wireless.@wifi-iface[0].key=12345678
root@LEDE:/# uci set wireless.@wifi-iface[0].encryption=psk-mixed+ccmp
root@LEDE:/# uci commit wireless && wifi &

 

Guess you like

Origin www.cnblogs.com/yeanz/p/11088389.html