Wifi connect under command

来源:互联网 发布:银龙裁决淘宝 编辑:程序博客网 时间:2024/05/22 10:49


1. Install wifi driver module   

insmod xxx.ko

2. Turn up the wifi

ip link set wlan0 up
3. Use iwlist to scan

iwlist scanning
4. Push wpa_supplicant.conf to /data

network={ssid="TestName"psk="12345678"key_mgmt=WPA-PSKpriority=1}
5. Connect the Ap

wpa_supplicant -Dwext -iwlan0 -c/data/wpa_supplicant.conf
6. Obtain ip

dhcpd wlan0

Other: https://wiki.archlinux.org/index.php/WPA_Supplicant