MYiR MY-WF003U User manual

MY-WF003U
USB Wi-Fi Module
MY-WF003U USB WiFi Module
User Manual
V1.2
2015/4/1

MY-WF003U
USB Wi-Fi Module
Version Record
Version
Description
Release Time
V1.0
Initial version
2013/11/20
V1.1
Add AM335x, AM437x, Z-turn eval board support
2015/3/18
V1.2
Firmware copy
2015/4/1

3/15
MY-WF003U
USB Wi-Fi Module
Table of Contents
Chapter 1 Overview.................................................................................................................................. 4
1.1 Product Introduction............................................................................................................................. 4
1.2 Product Images .................................................................................................................................... 4
Chapter 2 Features................................................................................................................................... 5
2.1 Hardware and Software Features...................................................................................................... 5
2.2 Products Supporting List..................................................................................................................... 6
Chapter 3 Interface Definition................................................................................................................. 8
Chapter 4 Testing USB WiFi in Linux..................................................................................................... 9
4.1 Cross-compiler Installation ................................................................................................................. 9
4.2 Kernel Configuration............................................................................................................................ 9
4.3 Compile USB WIFI Driver................................................................................................................... 9
4.3.1 Atmel SAM9x5 series................................................................................................................... 9
4.3.2 Atmel SAMA5 series................................................................................................................... 10
4.3.3 TI AM335x series........................................................................................................................ 10
4.3.4 TI AM437x series........................................................................................................................ 10
4.3.5 Z-turn ............................................................................................................................................ 11
4.4 Compile WPA Tool............................................................................................................................. 11
4.5 Configure WLAN through WAP Tool............................................................................................... 12
4.5.1 Using configuration file............................................................................................................... 12
4.5.2 using the command line configuration..................................................................................... 13
4.6 Wireless Network Connected Automatically.................................................................................. 13
Warranty & Technical Support Services.............................................................................................. 15

4/15
MY-WF003U
USB Wi-Fi Module
Chapter 1 Overview
1.1 Product Introduction
MY-WF003U is a USB WiFi Module released by MYIR especially for working on MYIR's
MYD-SAMA5D3X, MYD-SAM9X5andMYD-SAM9X5-V2 series ARM development boards. It is relying on the
WiFi IEEE 802.11b/g/n standards and its network speed can achieve 150Mbps when using the IEEE
802.11n standard.It is connected with other terminals through a USB2.0 Host port to build a wireless
network.
1.2 Product Images
Figure 1-1 MY-WF003U USB WiFi Module

5/15
MY-WF003U
USB Wi-Fi Module
Chapter 2 Features
2.1 Hardware and Software Features
The MY-WF003U USB WiFi Module is using USB 2.0 interface for connections, it is small in size
with high performance and low power consumption and can be connected to Routers or many kinds of
mobile terminals for extensive communications.
The hardware and software features of this module are introduced as in below table 2-1:
Software Features
Wireless Standard
IEEE 802.11n, IEEE 802.11g, IEEE.11b
Network Speed
11n: up to 150Mbps
11g: up to 54Mbps
11b: up to 11Mbps
Frequency Band
2.4 - 2.4835GHz
Transmission power
20dBm(MAX EIRP)
Modulation type
OFDM/CCK/16-QAM/64-QAM
Work patterns
Ad-Hoc Infrastructure
Wireless Security
16/128/152 bits WEP
WPA/WPA2, WPA-PSK/WPA2-PS
OS support
Linux
Hardware Features
Interface
Usb2.0 Hi-Speed connector
Working Temp.
-10 ~ +60°C (14°F ~ 140°F)
Relative Humidity
10% ~ 95%, non condensation
Table 2-1 Hardware and Software Features
2.2 Products Supporting List
http://www.myirtech.com/download/datasheet/MYIR_Modules_SupportingList.pdf

6/15
MY-WF003U
USB Wi-Fi Module
Chapter 3 Interface Definition
The USB2.0 interface definition is as below in table 3-1:
Table 3-1 Signal Definition of USB 2.0 Interface of MY-WF003U
Pin Signal Definition Image
1 VBUS
2 DN
3 DP
4 GND

7/15
MY-WF003U
USB Wi-Fi Module
Chapter 4 Testing USB WiFi in Linux
4.1 Cross-compiler Installation
For different platforms, please use different toolchains. Take arm-2010q1 as an example.
⑴Decompress the cross-compiler tool arm-2010q1-202-arm-none-linux- under the “Cross_Tools”
folder in DVD. For decompressing to /usr/local/arm/ as an example:
$ sudo tar xvjf arm-2010q1-202-arm-none-linux-gnueabi.tar.bz2 -C /uar/local/arm
⑵Configure PATH and CROSS_COMPILE:
$ export PATH=$PATH:/usr/local/arm/arm-2010q1/bin
$ export CROSS_COMPILE=/usr/local/arm/arm-2010q1/bin/arm-none-linux-gnueabi-
4.2 Kernel Configuration
⑴Execute below command under the root directory of the kernel source code to open kernel
configuration menu:
$ make ARCH=arm menuconfig
⑵Make configurations according to below menu
[*] Networking support --->
-*- Wireless --->
[*] cfg80211 wireless extensions compatibility
<*> Generic IEEE 802.11 Networking Stack (mac80211)
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<*> IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)
4.3 Compile USB WIFI Driver
4.3.1 Atmel SAM9x5 series
Atmel SAM9X5 series development board, such as MYD-SAM9X35, MYD-SAM9G15, use Linux
2.6.39. Here take use rtl8192cu as example Please follow below steps to compile the 8192 driver:
⑴Create a work folder under the current user Home directory and get into this folder:
$ mkdir ~/work
$ cd ~/work
⑵Copy the driver source code under the disk directory “Linux/Driver”to the work folder and

8/15
MY-WF003U
USB Wi-Fi Module
decompress it:
$ cp \
/media/cdrom/MY-WF003\ USB\ WIFI\ Module\Linux\Driver/\
rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz ./
$ tar xvzf rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz
$ cd rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911
⑶Compile driver
$ export CROSS_COMPILE=/usr/local/arm/arm-2010q1/bin/arm-none-linux-gnueabi-
$ make ARCH=arm KSRC=/media/data/myir/myd-sam9x5/Linux/linux-2.6.39
CROSS_COMPILE indicates the corresponding folder and prefix of the cross-compile tool. KSRC
means the Linux kernel source code location of the target board. These two variables are assigned
according to actual conditions. Here we use Linux2.6.39 kernel as an example. After compiling, the
created 8192cu.ko file is driver file.
⑷Load the driver
# insmod 8192cu.ko
4.3.2 Atmel SAMA5 series
Atmel SAMA5 series development board, such as MYD-SAMA5D3X, MYD-SAMA5D3X-C, use
Linux 3.6.9. Please refer to 4.3.1 Atmel SAM9X5 series Note modify cross-compiler configuration
parameters and modify KSRC path corresponding to root of kernel
4.3.3 TI AM335x series
TI AM335x series development board, such as MYD-AM335X,MYD-AM335X-J and so on, use
Linux 3.2.0. Please refer to 4.3.1 Atmel SAM9X5 series Note modify cross-compiler configuration
parameters and modify KSRC path corresponding to root of kernel
4.3.4 TI AM437x series
TI AM437x series development board, such as Rico Board, use Linux 3.12.10. Here take use
rtl8192cu as example Please follow below steps to compile the 8192 driver. Please refer to
corresponding user manual to configure cross-compiler environment.
⑴Execute following command in the root directory of the kernel to open kernel configuration menu:
$ make ARCH=arm menuconfig
⑵Configure rtl8192cu driver according to the following menu :

9/15
MY-WF003U
USB Wi-Fi Module
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<*> Realtek rtlwifi family of devices --->
<M> Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
Here configured as a module mode. Also can use spacebar "<M>" to switched to " < * > ", rtl8192cu
driver s compiled into kernel image.
⑶Execute following command to compile driver module.
$ make ARCH=arm modules
Generated following driver modules after compiled
drivers/net/wireless/rtlwifi/rtl8192c/rtl8192c-common.ko
drivers/net/wireless/rtlwifi/rtl8192cu/rtl8192cu.ko
drivers/net/wireless/rtlwifi/rtl_usb.ko
drivers/net/wireless/rtlwifi/rtlwifi.ko
⑷Copy the firmware to Board.
Copy the firmware to /lib/firmware/rtlwifi/rtl8192cufw_TMSC.bin of Board, you can find it in the CD
ROM ‚MY-WF003U USB WIFI Module/Linux/Tools/firmware/rtl8192cufw_TMSC.bin”.
⑸Load driver module on development board
Copy rtl8192c-common.ko、rtlwifi.ko、rtl_usb.ko、rtl8192cu.ko to development board,And execute
following command to insmod driver on development board:
# insmod rtl8192c-common.ko
# insmod rtlwifi.ko
# insmod rtl_usb.ko
# insmod rtl8192cu.ko
4.3.5 Z-turn
Z-turn development board, MYD-SAM9G15, use Linux 3.15.0. Please refer to 4.3.4 TI AM437x
series.Note modify cross-compiler configuration parameters and modify KSRC path corresponding to
root of kernel
4.4 Compile WPA Tool
Here use WPA tool to configure WiFi. Please follow below steps to compile WPA tool.
⑴Get into work folder:
$ cd ~/work

10/15
MY-WF003U
USB Wi-Fi Module
⑵Copy wpa tool source code under the disk Linux/Tools directory to work folder and decompress it:
$ cp \
/media/cdrom/MY-WF003\ USB\ WIFI\ Module/Linux/Tools/\
wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz ./
$ tar xvzf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz
$ cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812
⑶Compile driver
$ make CC=/usr/local/arm/arm-2010q1/bin/arm-none-linux-gnueabi-gcc
CC is the cross-compiler used for compiling. After that, the created three executable files wpa_cli,
wpa_passphrase and wpa_supplicant are needed wpa tools. In this user manual, only used wpa_cli and
wpa_supplicant two tools needed; how to use these two tools in following chapters.
4.5 Configure WLAN through WAP Tool
Insert the MY-WF003U USB WiFi Module and then use WAP to configure wlan. How to use wap tool
and steps to configure wlan is as follow.
4.5.1 Using configuration file
Use wpa_passphase to generate configuration files,How to use wpa_passphase:
# wpa_passphase ssid ssid_code > /etc/wpa_supplicant.conf
If my WIFI SSID is my_wifi, password is: 12345678.
# wpa_passphase my_wifi 12345678 > /etc/wpa_supplicant.conf
“wpa_supplicant.conf”will be generated in directory /etc/, use this configuration to connect to wifi:
# wpa_supplicant -i wlan0 -c/etc/wpa_supplicant.conf -Dwext -B
After connecting wifi, use following command to obtain 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

11/15
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

12/15
MY-WF003U
USB Wi-Fi Module
loading folder and rename it to rtl8192cu.ko:
# cp 8192cu.ko \
/lib/modules/2.6.39/kernel/drivers/net/wireless/rtlwifi/rtl8192cu/rtl8192cu.ko
⑵Modify the network configuration file
Modify the file “/etc/network/interfaces” and add below contents to enable wlan0 in order to
connecting to the network and acquiring the IP (DHCP) automatically. Here connecting with MYIR, as an
example. The network configuration is as below:
-ESSID: MYIR
-Password: 123456
-Encryption type: WPA-PSK
iface wlan0 inet dhcp
wpa-essid '"MYIR"'
wpa-psk '"123456 "'
wpa-conf /etc/wpa_supplicant.conf
⑶Modify the file wpa_supplicant.conf
Modify the file “/etc/wpa_supplicant.conf”, we can use below contents to replace the original
contents and add the network parameters which you are going to connect with. Here connecting with
MYIR, as an example:
network={
ssid=‛MYIR‛
psk=‛123456‛
key_mgmt=WPA-PSK
}
1) Save the modifications
# sync
After finish above steps, insert the MY-WF003U module and power on development board again, it
will connect with MYIR’s wireless network.

13/15
MY-WF003U
USB Wi-Fi Module
Warranty & Technical Support Services
MYIR Tech Limited is a global provider of ARM hardware and software tools, design solutions for
embedded applications. We support our customers in a wide range of services to accelerate your time to
market.
MYIR is an ARM Connected Community Member and work closely with ARM and many semiconductor
vendors. We sell products ranging from board level products such as development boards, single board
computers and CPU modules to help with your evaluation, prototype, and system integration or creating
your own applications. Our products are used widely in industrial control, medical devices, consumer
electronic, telecommunication systems, Human Machine Interface (HMI) and more other embedded
applications. MYIR has an experienced team and provides custom design services based on ARM
processors to help customers make your idea a reality.
The contents below introduce to customers the warranty and technical support services provided by
MYIR as well as the matters needing attention in using MYIR’s products.
Service Guarantee
MYIR regards the product quality as the life of an enterprise. We strictly check and control the core
board design, the procurement of components, production control, product testing, packaging, shipping
and other aspects and strive to provide products with best quality to customers. We believe that only
quality products and excellent services can ensure the long-term cooperation and mutual benefit.
Price
MYIR insists on providing customers with the most valuable products. We do not pursue excess profits
which we think only for short-time cooperation. Instead, we hope to establish long-term cooperation and
win-win business with customers. So we will offer reasonable prices in the hope of making the business
greater with the customers together hand in hand.
Delivery Time
MYIR will always keep a certain stock for its regular products. If your order quantity is less than the
amount of inventory, the delivery time would be within three days; if your order quantity is greater than
the number of inventory, the delivery time would be always four to six weeks. If for any urgent delivery,
we can negotiate with customer and try to supply the goods in advance.
Technical Support
MYIR has a professional technical support team. Customer can contact us by email
(support@myirtech.com), we will try to reply you within 48 hours. For mass production and customized
products, we will specify person to follow the case and ensure the smooth production.
After-sale Service

14/15
MY-WF003U
USB Wi-Fi Module
MYIR offers one year free technical support and after-sales maintenance service from the purchase date.
The service covers:
1. Technical support service
a) MYIR offers technical support for the hardware and software materials which have provided to
customers;
b) To help customers compile and run the source code we offer;
c) To help customers solve problems occurred during operations if users follow the user manual
documents;
d) To judge whether the failure exists;
e) To provide free software upgrading service.
However, the following situations are not included in the scope of our free technical support service:
a) Hardware or software problems occurred during customers’ own development;
b) Problems occurred when customers compile or run the OS which is tailored by themselves;
c) Problems occurred during customers’ own applications development;
d) Problems occurred during the modification of MYIR’s software source code.
2. After-sales maintenance service
The products except LCD, which are not used properly, will take the twelve months free maintenance
service since the purchase date. But following situations are not included in the scope of our free
maintenance service:
a) The warranty period is expired;
b) The customer cannot provide proof-of-purchase or the product has no serial number;
c) The customer has not followed the instruction of the manual which has caused the damage the
product;
d) Due to the natural disasters (unexpected matters), or natural attrition of the components, or
unexpected matters leads the defects of appearance/function;
e) Due to the power supply, bump, leaking of the roof, pets, moist, impurities into the boards, all those
reasons which have caused the damage of the products or defects of appearance;
f) Due to unauthorized weld or dismantle parts or repair the products which has caused the damage of
the products or defects of appearance;
g) Due to unauthorized installation of the software, system or incorrect configuration or computer virus
which has caused the damage of products.
Warm tips:
1) MYIR does not supply maintenance service to LCD. We suggest the customer first check the LCD
when receiving the goods. In case the LCD cannot run or no display, customer should contact MYIR
within 7 business days from the moment get the goods.
2) Please do not use finger nails or hard sharp object to touch the surface of the LCD.
3) MYIR suggests user purchasing a piece of special wiper to wipe the LCD after long time use, please
avoid clean the surface with fingers or hands to leave fingerprint.
4) Do not clean the surface of the screen with chemicals.
5) Please read through the product user manual before you using MYIR’s products.
6) For any maintenance service, customers should communicate with MYIR to confirm the issue first.

15/15
MY-WF003U
USB Wi-Fi Module
MYIR’s support team will judge the failure to see if the goods need to be returned for repair service,
we will issue you RMA number for return maintenance service after confirmation.
3. Maintenance period and charges
a) MYIR will test the products within three days after receipt of the returned goods and inform customer
the testing result. Then we will arrange shipment within one week for the repaired goods to the customer.
For any special failure, we will negotiate with customers to confirm the maintenance period.
b) For products within warranty period and caused by quality problem, MYIR offers free maintenance
service; for products within warranty period but out of free maintenance service scope, MYIR provides
maintenance service but shall charge some basic material cost; for products out of warranty period,
MYIR provides maintenance service but shall charge some basic material cost and handling fee.
4. Shipping cost
During the warranty period, the shipping cost which delivered to MYIR should be responsible by user;
MYIR will pay for the return shipping cost to users when the product is repaired. If the warranty period is
expired, all the shipping cost will be responsible by users.
5. Products Life Cycle
MYIR will always select mainstream chips for our design, thus to ensure at least ten years continuous
supply; if meeting some main chip stopping production, we will inform customers in time and assist
customers with products updating and upgrading.
Value-added Services
1. MYIR provides services of driver development base on MYIR’s products, like serial port, USB,
Ethernet, LCD, etc.
2. MYIR provides the services of OS porting, BSP drivers’ development, API software development,
etc.
3. MYIR provides other products supporting services like power adapter, LCD panel, etc.
4. ODM/OEM services.
MYIR Tech Limited
Room 04, 6th Floor, Building No.2, Fada Road, Yunli Smart
Park, Bantian, Longgang District, Shenzhen, China 518129
Support Email: support@myirtech.com
Sales Email: sales@myirtech.com
Phone: +86-755-22984836
Fax: +86-755-25532724
Website: www.myirtech.com
Table of contents