//验证
/etc/initscripts # iwconfig
sit0 no wireless extensions.
lo no wireless extensions.
dummy0 no wireless extensions.
wlan0 Qcom:802.11n ESSID:"F-TEST1" Nickname:""
Mode:Managed Frequency:5.18 GHz Access Point: CC:81:DA:29:89:80
Bit Rate=360 Mb/s Tx-Power=13 dBm
RTS thr=1048576 B Fragment thr=8000 B
Encryption key:AF40-A1A2-1A24-8149-1D27-4D8A-7B12-883C-2779-B808-6EB7-13E9-96D5-D87A-269F-482E [2] Security
p2p0 Qcom:802.11n ESSID:off/any Nickname:""
Mode:Managed Channel:0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power=0 dBm
RTS thr=1048576 B Fragment thr=8000 B
Encryption key:off
bond0 no wireless extensions.
/etc/initscripts # ping www.baidu.com
PING www.a.shifen.com (183.232.231.173) 56(84) bytes of data.
64 bytes from 183.232.231.173: icmp_req=1 ttl=54 time=10.3 ms
64 bytes from 183.232.231.173: icmp_req=2 ttl=54 time=7.90 ms
64 bytes from 183.232.231.173: icmp_req=3 ttl=54 time=10.3 ms
64 bytes from 183.232.231.173: icmp_req=4 ttl=54 time=8.66 ms
64 bytes from 183.232.231.173: icmp_req=5 ttl=54 time=10.4 ms
//修改
/etc/initscripts/wlan文件
中修改为 mode="start_sta"
修改/data/misc/wifi/wpa_supplicant.conf文件中需要连接的wifi essid以及key
network={
#Open
# ssid="example open network"
# key_mgmt=NONE
#WPA-PSK
ssid="F-TEST1"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=TKIP CCMP
group=TKIP CCMP
psk="12345678"
重启wlan /etc/initscripts/wlan restart