Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This application note shows how to implement a USB WiFi secure client with the i.MX RT1050 RT10XX running Linux. The functionality described below is available from the rootfs.uImage project provided by Emcraft for NXP i.MX RT1050 EVK /RT1060 EVKB board.

Emcraft tested the functionality documented below using the ComFast CF-WU815N adapter (based on the RT5370 chipset). If you are using some different USB WiFi dongle, then it may require enabling/porting/implementing the appropriate device drivers in the Linux kernel.

...

Plug-in the USB WiFi device to the USB OTG port (USB1 J9 or USB2 J10 interface connector on the NXP i.MX RT1050 EVK board or USB1 J47 interface connector on the NXP i.MX RT1050 RT1060 EVK board). The system will print the following to the console:

Code Block
usb 1ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 2
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usb 2-1: new high-speed USB device number 42 using ci_hdrc
usb 12-1: reset high-speed USB device number 42 using ci_hdrc
ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected

...

The access point parameters are specified in the /etc/wpa_supplicant.conf file. In this case the connection will be established automatically, and the procedure will look like this:

Code Block
usb 1-1: new high-speed USB device number 5 using ci_hdrc
usb 1-1: reset high-speed USB device number 5 using ci_hdrc
ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 0005 detected
ieee80211 phy2...
/ # ifconfig eth0 down
/ # vi /etc/wpa_supplicant.conf
/ # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file  'rt2870.bin'
ieee80211 phy2phy0: rt2x00lib_request_firmware: Info - Firmware detected - 
version: 0.29
/ # wlan0: authenticate with 3c:98:72:3f:ea:e2
wlan0: send auth to 3c:98:72:3f:ea:e2 (try 1/3)
wlan0: authenticated
wlan0: associate with 3c:98:72:3f:ea:e2 (try 1/3)
wlan0: RX AssocResp from 3c:98:72:3f:ea:e2 (capab=0x110x411 status=0 aid=65)
wlan0: associated
/ # ifconfig eth0 down
/ # vi /etc/wpa_supplicant.conf
/ # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
wlan0: deauthenticating from 3c:98:72:3f:ea:e2 by local choice (Reason: 
3=DEAUTH_LEAVING)
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

/ # udhcpc -i wlan0
/ # ping google.com -c 3
PING google.com (74.125.205.101): 56 data bytes
64 bytes from 74.125.205.101: seq=0 ttl=102 time=23.576 ms
64 bytes from 74.125.205.101: seq=1 ttl=102 time=22.367 ms
64 bytes from 74.125.205.101: seq=2 ttl=102 time=22.607 ms

--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 22.367/22.850/23.576 ms

...