AP模式:
DNS 服务:
dnsmasq -C /data/bin/dnsmasq.conf --interface=wlan0
配置文件(dnsmasq.conf)
user=root
listen-address=192.168.50.1
dhcp-range=192.168.50.2,192.168.50.51
#server=/google/8.8.8.8
启动热点:
hostapd /data/bin/hostapd.conf -t -B
配置文件(hostapd.conf):
interface=wlan0
ctrl_interface=/var/run/hostapd
driver=nl80211
ssid=Rockchip-SoftAp
channel=44
hw_mode=a
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
ignore_broadcast_ssid=0
STA模式
启动命令
wpa_supplicant -B -i wlan0 -c /data/cfg/wpa_supplicant.conf
配置内容(wpa_supplicant.conf):
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid="SSID"
psk="PASSWORD"
key_mgmt=WPA-PSK
}