wifi 驱动配置 wpa_supplicant的方法

mkdir -p /data/run
echo 'ctrl_interface=/data/run/wpa_supplicant' > /etc/wpa_supplicant.conf
echo 'ctrl_interface=/data/run/wpa_supplicant' > /data/wpa_supplicant.conf
/vendor/bin/hw/wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B
/vendor/bin/hw/wpa_supplicant -D nl80211 -i wlan0 -c /data/wpa_supplicant.conf -B
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 scan
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 scan_result
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 add_network
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 set_network 0 ssid '"HUAWEI-K95AYA"'
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 set_network 0 psk '"12345678"'
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 set_network 0 priority 2
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 set_network 0 scan_ssid 1
/vendor/bin/wpa_cli -p /data/run/wpa_supplicant -i wlan0 enable_network 0

udhcpc -i wlan0 或 ifconfig wlan0 192.168.3.111
ping -I wlan0 192.168.3.24

posted @ 2024-04-28 09:43  微信公众号--共鸣圈  阅读(35)  评论(0编辑  收藏  举报