Difference between revisions of "USB to WiFi adapter"

From ArmadeusWiki
Jump to: navigation, search
(Tested hardware)
Line 145: Line 145:
 
</pre>
 
</pre>
  
===Realtek rtl8187===
+
==Realtek rtl8187==
 
[http://www.linuxwireless.org/en/users/Drivers/rtl8187 Compatibility list] <br>
 
[http://www.linuxwireless.org/en/users/Drivers/rtl8187 Compatibility list] <br>
 
Tested devices:
 
Tested devices:
 
* Netgear WG111v3
 
* Netgear WG111v3
  
====Configure Linux====
+
===Configure Linux===
 
<pre class="host">
 
<pre class="host">
 
  $ make linux26-menuconfig
 
  $ make linux26-menuconfig
Line 168: Line 168:
 
</pre>
 
</pre>
  
====Launch driver====
+
===Launch driver===
 
<pre class=apf>
 
<pre class=apf>
 
# modprobe rtl8187
 
# modprobe rtl8187
Line 179: Line 179:
 
ADDRCONF(NETDEV_UP): wlan0: link is not ready
 
ADDRCONF(NETDEV_UP): wlan0: link is not ready
 
</pre>
 
</pre>
 +
 +
== Chipset RTL8188CUS ==
 +
 +
Thanks to Sly for this contribution.
 +
 +
Here are the details for the RTL8188CUS driver for the APF28.
 +
 +
===Build procedure===
 +
Build the driver for chip RTL8188CUS from source rtl8188C_8192C_usb_linux_v3.4.3_4369.20120622 .
 +
You can get the driver here (chose RTL8188CUS) :
 +
[http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true]
 +
 +
Add those option in the makefile :
 +
<pre class="host">
 +
- change line 39 :
 +
CONFIG_PLATFORM_I386_PC = n
 +
- add line 40 :
 +
CONFIG_PLATFORM_ARM_ARMADEUS = y
 +
 +
- Near line 261 add:
 +
ifeq ($(CONFIG_PLATFORM_ARM_ARMADEUS), y)
 +
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WEXT_PRIV
 +
ARCH := arm
 +
CROSS_COMPILE := /path-to-your/armadeus/buildroot/output/host/usr/bin/arm-linux-
 +
KVER  := 2.6.35.3
 +
KSRC ?= /path-to-your/armadeus/buildroot/output/build/linux-2.6.35.3
 +
endif
 +
</pre>
 +
 +
finally copy the driver to the target directory :
 +
<pre class="host">
 +
cp 8192cu.ko /path-to-your/armadeus/buildroot/output/target/lib/modules/2.6.35.3\+/kernel/drivers/net/wireless/
 +
</pre>
 +
 +
Rebuild your armadeus roots and reprogram your board:
 +
<pre class="host">
 +
cd /path-to-your-armadeus-directory
 +
make
 +
cp build root/output/images/* /tftpboot
 +
</pre>
 +
 +
 +
===Launch driver===
 +
  
 
==To go further==
 
==To go further==

Revision as of 14:03, 15 October 2012

How-to use USB to Wi-Fi adapters on your APF boards.

Prerequesities

Note Note: You have to be sure that Wireless Tools are installed on your rootfs before going further.


Tested hardware

Constructor Model Status Chipset
APF9328 APF27 APF51 APF28
D-Link DWL-G122 (not rev E1 !) OK OK NT NT Ralink RT2571WF
WPA-110 OK OK NT NT
DWA-140 NT NT NT KO Ralink RT2870
SMC WUSB-G NT OK NT NT ZyDas zd1212
Realtek RTL8188CUS NT NT NT OK RTL8188CUS see discussion

Ralink RT2571WF

The RT2571WF Wi-Fi chipset can be found in the following devices:

Drivers are included in Linux kernel > 2.6.29, but firmware must be downloaded from serialmonkey website at this address.

Kernel configuration

  • If not already done, Wireless network must be configured by selecting these options in make linux-menuconfig:
 [*] Networking support  --->
    Wireless  --->
        <*> Generic IEEE 802.11 Networking Stack (mac80211)
  • then, select the chipset :
 Device Drivers  --->
    [*] Network device support  --->
        Wireless LAN  --->
            [*] Wireless LAN (IEEE 802.11)
            <M> Ralink driver support
            <M> Ralink rt2501/rt73 (USB) support

Wi-Fi configuration

First mount the module:

# modprobe rt73usb

Then copy the firmware named rt73.bin (found in Module directory of rt73-cvs archive) in apf /lib/firmware directory. If /lib/firmware doesn't exist create it.

 mkdir -p /lib/firmware
 tftp -g -r rt73.bin <yourIP>
 mv rt73.bin /lib/firmware

Your Wi-Fi module driver is ready, you can now connect the dongle and after go further with the Wi-Fi configuration.

Ralink RT2870

  • Activate the driver in Linux configuration (if not already done):
$ make linux-menuconfig
  • Load driver
# modprobe rt2800_usb
  • Be sure to have rt2870.bin in /lib/firmware

ZyDas zd1212 chipset

Configure Linux

 $ make linux26-menuconfig
 [*] Networking support  --->
    Wireless  --->
        <*> Generic IEEE 802.11 Networking Stack (mac80211)

 Device Drivers  --->
     [*] Network device support  --->
         Wireless LAN  --->
             [*] Wireless LAN (IEEE 802.11)
             ...
             <M> ZyDAS ZD1211/ZD1211B USB-wireless support
             [*]   ZyDAS ZD1211 debugging
 $ make linux26 && make

Reinstall your system.

Get firmware

Install firmware on your APF

 # mkdir -p /lib/firmware/
 # cd /lib/firmware/
 # tftp -g -r zd1211-firmware-1.4.tar.bz2 192.168.0.17
 # bunzip2 zd1211-firmware-1.4.tar.bz2
 # tar xf zd1211-firmware-1.4.tar
 # mv zd1211-firmware zd1211

Connect your USB adapter

usb 1-1: new high speed USB device using mxc-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: New USB device found, idVendor=083a, idProduct=4505
usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=0
usb 1-1: Product: USB2.0 WLAN
usb 1-1: Manufacturer: SMC

Launch driver

 # modprobe zd1211rw
 usb 1-1: reset high speed USB device using mxc-ehci and address 2
 zd1211rw 1-1:1.0: phy0
 usbcore: registered new interface driver zd1211rw
 
 # ifconfig wlan0 up
 firmware: requesting zd1211/zd1211b_ub
 firmware: requesting zd1211/zd1211b_uphr

Realtek rtl8187

Compatibility list
Tested devices:

  • Netgear WG111v3

Configure Linux

 $ make linux26-menuconfig
 Device Drivers  --->
     [*] Network device support  --->
         Wireless LAN  --->
             [*] Wireless LAN (IEEE 802.11)
             ...
             <M>   Realtek 8187 and 8187B USB support
 $ make linux26 && make

Launch driver

# modprobe rtl8187
cfg80211: Calling CRDA to update world regulatory domain
ieee80211 phy0: hwaddr 00:22:3f:df:2c:04, RTL8187BvE V0 + rtl8225z2, rfkill mask 2
rtl8187: wireless switch is on
usbcore: registered new interface driver rtl8187

# ifconfig wlan0 up
ADDRCONF(NETDEV_UP): wlan0: link is not ready

Chipset RTL8188CUS

Thanks to Sly for this contribution.

Here are the details for the RTL8188CUS driver for the APF28.

Build procedure

Build the driver for chip RTL8188CUS from source rtl8188C_8192C_usb_linux_v3.4.3_4369.20120622 . You can get the driver here (chose RTL8188CUS) : [1]

Add those option in the makefile :

- change line 39 :
CONFIG_PLATFORM_I386_PC = n
- add line 40 :
CONFIG_PLATFORM_ARM_ARMADEUS = y

- Near line 261 add:
ifeq ($(CONFIG_PLATFORM_ARM_ARMADEUS), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WEXT_PRIV
ARCH := arm
CROSS_COMPILE := /path-to-your/armadeus/buildroot/output/host/usr/bin/arm-linux-
KVER  := 2.6.35.3
KSRC ?= /path-to-your/armadeus/buildroot/output/build/linux-2.6.35.3
endif

finally copy the driver to the target directory :

cp 8192cu.ko /path-to-your/armadeus/buildroot/output/target/lib/modules/2.6.35.3\+/kernel/drivers/net/wireless/

Rebuild your armadeus roots and reprogram your board:

cd /path-to-your-armadeus-directory
make
cp build root/output/images/* /tftpboot


Launch driver

To go further

Links