1
1
/
1
5
MY-WF003U
USB Wi-Fi Module
4.5.2 using the command line configuration
Boot wpa_supplicant:
# wpa_supplicant -i wlan0 -c/etc/wpa_supplicant.conf -Dwext -B
If the prompt does not support
“-Dwext”, delete it.
Scan wireless network:
# wpa_cli -p/var/run/wpa_supplicant scan
Indicate the found wireless network:
# wpa_cli -p/var/run/wpa_supplicant scan_results
Add to one network and please note the returned network ID which will be used for ssid and psk
settings. Here the returned value is
“20”:
# wpa_cli -p/var/run/wpa_supplicant add_network
Selected interface 'wlan0'
20
Set the ssid of the network, here we use
“MYIR”:
# wpa_cli -p/var/run/wpa_supplicant set_network 20 ssid ‘‚MYIR‛’
Set the psk of the network, here we use
“123456”:
# wpa_cli -p/var/run/wpa_supplicant set_network 20 psk ‘‚123456‛’
Select network:
# wpa_cli -p/var/run/wpa_supplicant select_network 20
If not got IP address of wlan0, use below command to get IP address:
# udhcpc -i wlan0
After above steps,
get online through WiFi.
# ping www.baidu.com
PING www.baidu.com (115.239.210.26): 56 data bytes
64 bytes from 115.239.210.26: seq=0 ttl=54 time=107.556 ms
64 bytes from 115.239.210.26: seq=1 ttl=54 time=217.601 ms
64 bytes from 115.239.210.26: seq=2 ttl=54 time=131.467 ms
64 bytes from 115.239.210.26: seq=3 ttl=54 time=150.235 ms
64 bytes from 115.239.210.26: seq=4 ttl=54 time=154.285 ms
4.6 Wireless Network Connected Automatically
It is always needed that network can be connected automatically when power on. Here use below to
implement this function through using the MY-WF003U USB WiFi module.
⑴
Copy the former compiled driver file 8192cu.ko to the development board driver automatically