-
Notifications
You must be signed in to change notification settings - Fork 45
NETWORK
alan-wt edited this page Apr 28, 2021
·
5 revisions
将wifi作为AP模式供其他wifi设备连接
uci set wireless.wlan0.ssid='WT-AP'
uci set wireless.wlan0.encryption='none'
uci set wireless.wlan0.disabled=0
uci set wireless.wisp0.disabled=1
uci commit wireless
uci set wireless.wlan0.ssid='WT-AP'
uci set wireless.wlan0.encryption='mixed-psk'
uci set wireless.wlan0.key='12345678'
uci set wireless.wlan0.disabled=0
uci set wireless.wisp0.disabled=1
uci commit wireless
wifi
将wifi作为sta模式连接其他AP
uci set wireless.wisp0.ssid='WT-AP'
uci set wireless.wisp0.encryption='none'
uci set wireless.wisp0.disabled=0
uci set wireless.wlan0.disabled=1
uci set wireless.wlan0.disabled=1
uci set network.wisp0.disabled=0
uci commit wireless
uci commit network
uci set wireless.wisp0.ssid='WT-AP'
uci set wireless.wisp0.encryption='mixed-psk'
uci set wireless.wisp0.key='12345678'
uci set wireless.wisp0.disabled=0
uci set wireless.wlan0.disabled=1
uci set wireless.wlan0.disabled=1
uci set network.wisp0.disabled=0
uci commit wireless
uci commit network
wifi
ifup -w wisp0
名字 | 描述 |
---|---|
ssid | 无线名称 |
encryption | 加密方式 |
key | 密钥 |
disabled | 1为关闭,0位开启 |
参考https://openwrt.org/docs/guide-user/network/wifi/wireless-tool/wireless.utilities
iwinfo wlan0 info
iwinfo wlan0 scan
iwinfo wlan0 assoclist
默认有线作为LAN口使用
uci set network.lan.proto=dhcp
uci commit network
/etc/init.d/network restart
当插拔网线时,会有一个hotplug事件产生,将自动执行/etc/hotplug.d/phy/目录下的脚本。
参数:
ACTION:linkdown/linkup,linkdown表示网线断了,linkup表示网线插上
IFNAME:eth0/eth1,当网口板子只有eth0设备
默认USB连接到4G模组AIR724
由于默认USB连接到4G模组AIR724,可以通过如下方法将USB当做外置接口使用,关闭4G。
uci set network.lte.usbmode=usb
uci set network.lte.disabled=1
uci commit network
/etc/init.d/lte restart
uci set network.lte.usbmode=lte
uci set network.lte.disabled=0
uci commit network
/etc/init.d/lte restart