Difference between revisions of "USB to WiFi adapter"

From ArmadeusWiki
Jump to: navigation, search
(ZyDas zd1212 chipset)
(Links)
 
(51 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Tested hardware ==
+
How-to use USB to Wi-Fi adapters on your APF boards.
=== Ralink RT2571WF ===
+
The WiFi chipset RT2571WF can be found under '''the D-Link WiFi key
+
[http://www.ldlc.com/fiche/PB00023863.html DWL-G122]'''. All drivers are
+
included in Linux kernel 2.6.27. But firmware must be downloaded from
+
serialmonkey website at [http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz this address].
+
  
To use it with [[APF9328]], you need an [[APF9328DevFull]] development board (with USB Host).
+
==Prerequesities==
 +
{{Note| You have to be sure that [[Wireless Tools]] are installed on your rootfs before going further.}}
  
==== Kernel configuration ====
+
* To use USB dongles with [[APF9328]], you'll need an [[APF9328DevFull]] development board, with USB Host configured. See [[ISP1761_Linux_driver|this page]] to know how to do that.
  
* First, to use a USB dongle, USB Host must be configured. See [[ISP1761_Linux_driver|this page]] to know how to do with the [[APF9328DevFull]].
+
==Tested hardware==
* Then, Wireless network must be configured selecting these options in ''make linux-menuconfig'':
+
{| border="1" cellpadding="5" cellspacing="0" summary="microSDs"
<source lang="bash">
+
|- style="background:#efefef;"
 +
! rowspan="2" | '''Constructor''' || rowspan="2" | '''Model''' || colspan="4" | '''Status''' || rowspan="2" | '''Chipset'''
 +
|----- style="background:#efefef;"
 +
| '''APF9328''' || '''APF27''' || '''APF51''' || '''APF28'''
 +
|----------------
 +
| rowspan="4" | '''D-Link''' || [http://www.ldlc.com/fiche/PB00023863.html DWL-G122] '''(not rev E1 !)''' || style="background:#00ff00;" | OK || style="background:#00ff00;" | OK || NT || NT  || rowspan="2" | Ralink RT2571WF
 +
|----------------
 +
| WPA-110 || style="background:#00ff00;" | OK || style="background:#00ff00;" | OK || NT || NT
 +
|----------------
 +
| DWA-131 ('''rev. A1''')|| NT || style="background:#00ff00;" | ~OK (3.7 kernel) || NT || style="background:#00ff00;" | ~OK (3.7 kernel) || [[USB_to_WiFi_adapter#RTL8712U|Realtek RTL8192U]]
 +
|----------------
 +
| DWA-140 || NT || NT || NT || style="background:#ff0000;" | KO || Ralink RT2870
 +
|----------------
 +
| '''SMC''' || WUSB-G || NT || style="background:#00ff00;" | OK || NT || NT || ZyDas zd1212
 +
|----------------
 +
| '''Realtek''' || [[USB_to_WiFi_adapter#Chipset_RTL8188CUS|RTL8188CUS]] || NT || NT || NT || style="background:#00ff00;" | OK || RTL8188CUS [[Talk:USB_to_WiFi_adapter#Chipset_RTL8188CUS |see discussion]]
 +
|----------------
 +
| '''Netgear''' ||  N150 WNA1100  || NT || NT || NT || style="background:#00ff00;" | OK || Atheros AR9271 [[Talk:USB_to_WiFi_adapter#Chipset_Atheros_AR9271 |see discussion]]
 +
|----------------
 +
| '''Linksys''' || AE1000 || NT || NT || NT || style="background:#00ff00;" | ~OK (3.7 kernel)|| Ralink RT3572
 +
|----------------
 +
| '''TP-LINK''' || TL-WN823N || NT || style="background:#00ff00;" | ~OK ? (3.7+ kernel) || NT || NT || [[USB_to_WiFi_adapter#RTL8192CU|Realtek 8192CU]]
 +
|}
 +
 
 +
==Ralink RT2571WF==
 +
The RT2571WF Wi-Fi chipset can be found in the following devices:
 +
* [http://www.ldlc.com/fiche/PB00023863.html D-Link DWL-G122] '''(not rev E1 !)'''
 +
* D-Link WPA-110
 +
 
 +
Drivers are included in Linux kernel > 2.6.29, but firmware must be downloaded from serialmonkey website at [http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz this address].
 +
 
 +
===Kernel configuration===
 +
 
 +
* If not already done, Wireless network must be configured by selecting these options in ''make linux-menuconfig'':
 +
<pre class="config">
 
  [*] Networking support  --->
 
  [*] Networking support  --->
 
     Wireless  --->
 
     Wireless  --->
 
         <*> Generic IEEE 802.11 Networking Stack (mac80211)
 
         <*> Generic IEEE 802.11 Networking Stack (mac80211)
</source>
+
</pre>
  
* Finally, select the chipset :
+
* then, select the chipset :
<source lang="bash">
+
<pre class="config">
 
  Device Drivers  --->
 
  Device Drivers  --->
 
     [*] Network device support  --->
 
     [*] Network device support  --->
Line 26: Line 56:
 
             <M> Ralink driver support
 
             <M> Ralink driver support
 
             <M> Ralink rt2501/rt73 (USB) support
 
             <M> Ralink rt2501/rt73 (USB) support
</source>
+
</pre>
 
+
==== Packages needed ====
+
  
To play with WiFi, select these packages in ''make menuconfig'':
+
===Wi-Fi configuration===
* To configure Wlan:
+
<source lang="bash">
+
Package Selection for the target  --->
+
    [*] Networking  --->
+
        [*]  wireless tools
+
</source>
+
* To surf on the net:
+
<source lang="bash">
+
Package Selection for the target  --->
+
    [*] Networking  --->
+
        [*]  links
+
</source>
+
 
+
After flashing your rootfs and kernel, you can boot the card and configure WiFi.
+
 
+
==== WiFi configuration ====
+
  
 
First mount the module:
 
First mount the module:
Line 62: Line 74:
 
</pre>
 
</pre>
  
Your WiFi-module driver is ready, you can now connect the dongle. To see your wireless configuration use ''iwconfig'' command.
+
Your Wi-Fi module driver is ready, you can now connect the dongle and after go further with the [[WiFi|Wi-Fi configuration]].
  
 +
==Ralink RT2870==
 +
* Activate the driver in Linux configuration (if not already done):
 +
<pre class=host>
 +
$ make linux-menuconfig
 +
</pre>
 +
* Load driver
 
<pre class=apf>
 
<pre class=apf>
# iwconfig
+
# modprobe rt2800_usb
lo        no wireless extensions.
+
+
eth0      no wireless extensions.
+
+
sit0      no wireless extensions.
+
+
wmaster0  no wireless extensions.
+
+
wlan0    IEEE 802.11bg  ESSID:"" 
+
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated 
+
          Tx-Power=0 dBm 
+
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
+
          Encryption key:off
+
          Power Management:off
+
          Link Quality:0/100  Signal level:112/146  Noise level:0/0
+
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
+
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0
+
 
</pre>
 
</pre>
 +
* Be sure to have rt2870.bin in /lib/firmware
  
To configure WiFi cryptography, only WEP can be set as is. If you want to
+
==ZyDas zd1212 chipset==
configure dongle for WPA, install [http://hostap.epitest.fi/wpa_supplicant/
+
* Tested with SMC WUSB-G (which is in [http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices the compatibility list]).
wpa_supplicant].
+
**[http://www.ldlc.com/fiche/PB00067971.html Go here to buy this device in France (LDLC)]
 +
** Other ways to get it ?
  
===== WEP configuration =====
+
====Configure Linux====
 
+
<pre class="host">
Note : to see all access point available for your apf, use ''iwlist'' command :
+
  $ make linux-menuconfig
<pre class=apf>
+
  # iwlist scanning
+
 
</pre>
 
</pre>
  
This example is given for a WiFi Access Point named armadeus, but the key is
+
<pre class="config">
false of course ;) :
+
[*] Networking support  --->
 +
    Wireless  --->
 +
        <*> Generic IEEE 802.11 Networking Stack (mac80211)
  
<pre class=apf>
+
  Device Drivers --->
  # iwconfig wlan0 essid armadeus
+
    [*] Network device support --->
  # iwconfig wlan0 key 12345678901234567890
+
        Wireless LAN --->
  # ifconfig wlan0 up
+
            [*] Wireless LAN (IEEE 802.11)
  firmware: requesting rt73.bin
+
            ...
ADDRCONF(NETDEV_UP): wlan0: link is not ready
+
            <M> ZyDAS ZD1211/ZD1211B USB-wireless support
# ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
+
            [*]  ZyDAS ZD1211 debugging
 
</pre>
 
</pre>
  
Now, the WiFi adapter is ready and attached :
+
<pre class="host">
<pre class=apf>
+
  $ make linux && make
# iwconfig
+
lo        no wireless extensions.
+
+
eth0      no wireless extensions.
+
+
sit0      no wireless extensions.
+
+
wmaster0  no wireless extensions.
+
+
wlan0    IEEE 802.11bg  ESSID:"armadeus"
+
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1B:2F:E7:E4:08 
+
          Bit Rate=2 Mb/s  Tx-Power=7 dBm 
+
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
+
          Encryption key:XXXXXXXXXXXXXXXXXXXXXXXXXX  Security mode:restricted
+
          Power Management:off
+
          Link Quality:0/100  Signal level:73/146  Noise level:0/0
+
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
+
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0
+
   
+
 
</pre>
 
</pre>
  
We can configure the network to access internet via the WiFi interface instead of the Ethernet one :
+
Reinstall your system.
  
 +
====Get firmware====
 +
* http://zd1211.ath.cx/get-firmware
 +
* copy the archive to your TFTP export directory
 +
 +
====Install firmware on your APF====
 
<pre class=apf>
 
<pre class=apf>
  # ifconfig eth0 down
+
  # mkdir -p /lib/firmware/
  # ifconfig wlan0 192.168.0.212
+
  # cd /lib/firmware/
  # route add default gw 192.168.0.1 dev wlan0
+
# 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
 
</pre>
 
</pre>
  
And configure the nameserver in /etc/resolv.conf
+
====Connect your USB adapter====
 
<pre class=apf>
 
<pre class=apf>
domain dev.null
+
usb 1-1: new high speed USB device using mxc-ehci and address 2
nameserver 192.168.0.207
+
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
 
</pre>
 
</pre>
  
We can now ping the best website in the world :
+
====Launch driver====
 
<pre class=apf>
 
<pre class=apf>
  # ping www.armadeus.org
+
  # modprobe zd1211rw
  PING www.armadeus.org (213.186.33.5): 56 data bytes
+
  usb 1-1: reset high speed USB device using mxc-ehci and address 2
  64 bytes from 213.186.33.5: seq=0 ttl=122 time=66.735 ms
+
  zd1211rw 1-1:1.0: phy0
  64 bytes from 213.186.33.5: seq=1 ttl=122 time=50.392 ms
+
  usbcore: registered new interface driver zd1211rw
  ^C
+
   
  --- www.armadeus.org ping statistics ---
+
  # ifconfig wlan0 up
  2 packets transmitted, 2 packets received, 0% packet loss
+
  firmware: requesting zd1211/zd1211b_ub
  round-trip min/avg/max = 50.392/58.563/66.735 ms
+
  firmware: requesting zd1211/zd1211b_uphr
 
</pre>
 
</pre>
  
===== Surf on the net =====
+
==Realtek rtl8187==
 +
[http://www.linuxwireless.org/en/users/Drivers/rtl8187 Compatibility list] <br>
 +
Tested devices:
 +
* Netgear WG111v3
  
To surf on the web, you can use ''links'' software :
+
===Configure Linux===
<pre class=apf>
+
<pre class="host">
  # links www.armadeus.org
+
  $ make linux-menuconfig
 
</pre>
 
</pre>
  
It's an ASCII internet browser.
+
<pre class="config">
 
+
=== ZyDas zd1212 chipset ===
+
* Tested with SMC WUSB-G (which is in [http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices the compatibility list])
+
[http://www.ldlc.com/fiche/PB00067971.html To buy this device in France]
+
 
+
====Configure Linux====
+
$ make linux26-menuconfig
+
Same as Ralink +
+
+
 
  Device Drivers  --->
 
  Device Drivers  --->
 
     [*] Network device support  --->
 
     [*] Network device support  --->
 
         Wireless LAN  --->
 
         Wireless LAN  --->
             <M> ZyDAS ZD1211/ZD1211B USB-wireless support
+
            [*] Wireless LAN (IEEE 802.11)
            [*]  ZyDAS ZD1211 debugging
+
            ...
 +
             <M>   Realtek 8187 and 8187B USB support
 +
</pre>
  
====Get firmware====
+
<pre class="host">
* http://zd1211.ath.cx/get-firmware
+
$ make linux && make
* copy the archive to your TFTP export directory
+
</pre>
  
====Install firmware====
+
===Launch driver===
 
<pre class=apf>
 
<pre class=apf>
# mkdir -p /lib/firmware/zd1211
+
# modprobe rtl8187
# cd /lib/firmware/
+
cfg80211: Calling CRDA to update world regulatory domain
# tftp -g -r zd1211-firmware-1.4.tar.bz2 192.168.0.17
+
ieee80211 phy0: hwaddr 00:22:3f:df:2c:04, RTL8187BvE V0 + rtl8225z2, rfkill mask 2
# bunzip2 zd1211-firmware-1.4.tar.bz2
+
rtl8187: wireless switch is on
# tar xf zd1211-firmware-1.4.tar
+
usbcore: registered new interface driver rtl8187
# mv zd1211-firmware zd1211
+
 
 +
# ifconfig wlan0 up
 +
ADDRCONF(NETDEV_UP): wlan0: link is not ready
 
</pre>
 
</pre>
  
====Launch driver====
+
== 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===
 
<pre class=apf>
 
<pre class=apf>
# modprobe zd1211rw
+
# insmod /lib/modules/2.6.35.3\+/kernel/drivers/net/wireless/8192cu.ko
  zd1211rw 1-1.1:1.0: phy0
+
rtw driver version=v3.4.3_4369.20120622
  # ifconfig wlan0 up
+
Build at: Oct 15 2012 14:47:14
  firmware: requesting zd1211/zd1211b_ub
+
register rtw_netdev_ops to netdev_ops
  firmware: requesting zd1211/zd1211b_uphr
+
CHIP TYPE: RTL8188C_8192C
 +
...
 +
 
 +
# ifconfig wlan0 up
 +
+871x_drv - drv_open, bup=0
 +
  ===> FirmwareDownload91C() fw:Rtl819XFwImageArray_TSMC
 +
FirmwareDownload92C accquire FW from embedded image
 +
...
 +
MAC Address = 78:44:76:95:96:76
 +
-871x_drv - drv_open, bup=1
 +
ADDRCONF(NETDEV_UP): wlan0: link is not ready
 +
</pre>
 +
 
 +
==RTL8712U==
 +
* [http://wiki.debian.org/rtl819x#r8712u Compatibility List]
 +
* Tested devices:
 +
** D-LINK DWA-131
 +
 
 +
===Configure Linux===
 +
* If not already done:
 +
 
 +
<pre class="host">
 +
$ make linux-menuconfig
 +
</pre>
 +
 
 +
<pre class="config">
 +
    Device Drivers  --->
 +
        [*] Staging drivers  --->
 +
            <M>  RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver
 +
</pre>
 +
* rebuild and reflash Linux image
 +
 
 +
===Configure Buildroot===
 +
* Only on recent Buildroot, otherwise get the firmware manually from linux-firmware git repository.
 +
 
 +
<pre class="host">
 +
$ make menuconfig
 +
</pre>
 +
 
 +
<pre class="config">
 +
Package Selection for the target  --->
 +
    Hardware handling  --->
 +
        Misc devices firmwares  --->
 +
            [*] linux-firmware
 +
                WiFi firmwares  --->
 +
                    ...
 +
                    [*] Realtek 8712
 +
</pre>
 +
 
 +
* rebuild and reflash rootfs image
 +
 
 +
<pre class="apf">
 +
# modprobe r8712u
 +
[  22.563440] r8712u: module is from the staging directory, the quality is unknown, you have been warned.
 +
[  22.583039] r8712u: Staging version
 +
[  22.586760] r8712u: register rtl8712_netdev_ops to netdev_ops
 +
[  22.603628] r8712u: USB_SPEED_HIGH with 4 endpoints
 +
[  22.611685] r8712u: Boot from EFUSE: Autoload OK
 +
[  23.714020] r8712u: CustomerID = 0x0000
 +
[  23.717967] r8712u: MAC Address from efuse = cc:b2:55:c6:67:1d
 +
[  23.725866] r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
 +
[  23.739712] usbcore: registered new interface driver r8712u
 +
 
 +
# ifconfig wlan0 up
 +
[  62.320936] r8712u: 1 RCR=0x153f00e
 +
[  62.325542] r8712u: 2 RCR=0x553f00e
 +
[  62.440908] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
 +
 
 +
# iwlist wlan0 scan
 +
wlan0    Scan completed :
 +
          Cell 01 - Address: 00:17:33:1C:91:E6
 +
                    ESSID:"SFR WiFi Public"
 +
                    Protocol:IEEE 802.11bg
 +
                    Mode:Master
 +
                    Frequency:2.462 GHz (Channel 11)
 +
                    Encryption key:off
 +
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
 +
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
 +
                              12 Mb/s; 48 Mb/s
 +
                    Signal level=82/100 
 +
.....
 +
</pre>
 +
 
 +
==RTL8192CU==
 +
* [http://wiki.debian.org/rtl819x#r8192cu Compatibility List]
 +
* Tested devices:
 +
** TP-Link TL-WN823N
 +
 
 +
===Configure Linux===
 +
* If not already done:
 +
 
 +
<pre class="host">
 +
$ make linux-menuconfig
 +
</pre>
 +
 
 +
<pre class="config">
 +
    Device Drivers  --->
 +
        [*] Network device support  --->
 +
            [*]  Wireless LAN  --->
 +
            <M>  Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
 +
</pre>
 +
* rebuild and reflash Linux image
 +
 
 +
===Configure Buildroot===
 +
* Only on recent Buildroot, otherwise get the firmware manually from linux-firmware git repository.
 +
 
 +
<pre class="host">
 +
$ make menuconfig
 +
</pre>
 +
 
 +
<pre class="config">
 +
Package Selection for the target  --->
 +
    Hardware handling  --->
 +
        Misc devices firmwares  --->
 +
            [*] linux-firmware
 +
                WiFi firmwares  --->
 +
                    ...
 +
                    [*] Realtek 8192
 +
</pre>
 +
 
 +
* rebuild and reflash rootfs image
 +
 
 +
* then plug the USB dongle and load the corresponding driver:
 +
<pre class="apf">
 +
# modprobe rtl8192cu
 +
[  180.151881] cfg80211: Calling CRDA to update world regulatory domain
 +
[  180.462064] rtl8192cu: Chip version 0x11
 +
[  180.642278] rtl8192cu: MAC address: 64:70:02:17:84:9a
 +
[  180.647469] rtl8192cu: Board Type 0
 +
[  180.653125] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
 +
[ 180.659369] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
 +
[  180.673783] usbcore: registered new interface driver rtl8192cu
 +
[  180.833248] rtlwifi: wireless switch is on
 +
 
 +
# ifconfig wlan0 up
 +
[ 257.824955] rtl8192cu: MAC auto ON okay!
 +
[ 257.896107] rtl8192cu: Tx queue select: 0x05
 +
[  258.348956] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
 +
 
 +
# iw dev wlan0 scan
 +
BSS f4:ca:e5:c4:bc:35(on wlan0)
 +
        TSF: 2389267669750 usec (27d, 15:41:07)
 +
        freq: 2417
 +
        beacon interval: 96 TUs
 +
        capability: ESS ShortSlotTime (0x0401)
 +
        signal: -35.00 dBm
 +
        last seen: 650 ms ago
 +
        Information elements from Probe Response frame:
 +
        SSID: FreeWifi
 +
        Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
 +
        DS Parameter set: channel 2
 +
        ERP: Barker_Preamble_Mode
 +
        Extended supported rates: 24.0 36.0 48.0 54.0
 +
.....
 
</pre>
 
</pre>
  
== ==
+
==To go further==
tshado> polo35: tu es la ?
+
* [[WiFi| Configure your Wi-Fi network interface]]
<bruno> oui
+
* [[Links | Browse the net (in text mode) from your terminal]]
<tshado> polo35: le zd1211 (zydas) c'est le chipset pour une clé WIFI ?
+
...
+
<polo35> j'ai un soucis au moment où le driver cherche à charger le firmware, qui se trouve pourtant au bon endroit :(
+
<tshado> polo35: quel modele de clé wifi as tu ? et comment s tu fait pour le driver linux ?
+
<polo35> j'ai une smc wusb-g
+
<bruno> jorasse merci pour l'aide je m'absente un moment, je reviendrais
+
<polo35> ya pas de probleme avec ce driver normalement, il correspond bien à ma clé (d'ailleurs essayé sur mon pc portable et aucun soucis)
+
<polo35> et pour le driver j'ai juste activé l'option correspondante au driver dans le linux-menuconfig
+
<tshado> polo35: le driver linux etait fournit avec ta clé usb ?
+
<polo35> non pas besoin
+
<jorasse> bruno: je doit m absente aussi
+
<polo35> les sources ont été libre un moment, résultat tu peux tres bien recompiler le driver si tu veux (d'ailleurs une communauté le tient à jour)
+
<tshado> polo35: tu veux dire y a ce qu il faut pour linux2.6.27 ?
+
<polo35> oui
+
<polo35> c'est simplement un probleme propre au module, ou au kernell qui bloque le fait que celui ci veuille charger le firmware
+
<Artemys> polo35: comment tu sais que ça merde au chargement du firmware ?
+
<polo35> parcque je récupere le message suivant :
+
<polo35> usb 1-1.2: Could not load firmware file zd1211/zd1211b_ub. Error number -2
+
<polo35> zd1211rw 1-1.2:1.0: couldn't load firmware. Error number -2
+
<tshado> polo35: ca m interesse car je voudrais aussi mettre une clé usb wifi
+
<polo35> en fait, normalement ca se fait en 3 tours de main.. ya juste ce probleme qui est bloquant et j'arrive pas à le résoudre
+
<Artemys> effectivement C flagrant
+
<polo35> on m'a parlé d'une option au moment de compiler le noyau, je suis en train de regarder
+
<Artemys> polo35: vi /etc/hotplug
+
<Artemys> et tu mets ça dedans:
+
<Artemys> #!/bin/sh
+
if [ "$FIRMWARE" != "" ]; then
+
HOTPLUG_FW_DIR=/lib/firmware/
+
echo 1 > /sys/$DEVPATH/loading
+
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
+
echo 0 > /sys/$DEVPATH/loading
+
fi
+
<tshado> polo35: question ce firmware zd1211rw 1-1.2:1.0 il se trouve ou ?
+
<Artemys> et ton firmware tu le mets dans /lib/firmware sur la carte
+
<polo35> ahh
+
<polo35> merci je vais voir ca
+
<Artemys> polo35: tu nous fileras la ref de ta clef qu'on la teste et la mette sur le wiki stp ?
+
|<-- jorasse_ has left irc.rezosup.org (Quit: bye!)
+
<polo35> ouais bien sur ;)
+
<polo35> quand ca marche je vous fournirai toutes les infos
+
<polo35> (je vous met un copier coller des options à activer lors de la compil)
+
<tshado> polo35: oui ça interessera du monde
+
<polo35> make menuconfig Networking ----> then set <M> Generic IEEE802.11 Networking Stack <M> Software MAC add-on to the IEEE 802.11 netowrking  tack all other module capable IEEE 80211 items will have automatically set themselves to <M> Also check that: Device Drivers ----> Network device support ----> Wireless LAN (non-hamradio) ----> <M> ZyDAS ZD1211/ZD1211B USB-wireless support is also set to <M> Exit out and save the config
+
<polo35> oups c'est pas tres propre désolé
+
<tshado> polo35 mais tu as pas répondu à ma question .....ce firmware zd1211rw 1-1.2:1.0 il se trouve ou
+
<tshado> tu pourrais me dire ?
+
<tshado> polo35: ah j'ai pigé c 'est que dans les options du menuconfig c ça ?
+
<polo35> le firmware on le trouve sur internet ;)
+
<polo35> sinon au moment de la compilation du noyau il faut activer les options suivantes :
+
<tshado> Artemys: polo35 lien interessant pour savoir si on a le chipset zd1211 http://doc.ubuntu-fr.org/wifi_chipset_zd1211
+
<polo35> Networking ---->
+
<polo35> <M> Generic IEEE802.11 Networking Stack
+
<polo35> <M> Software MAC add-on to the IEEE 802.11 netowrking stack
+
<polo35> Device Drivers ----> Network device support ---->
+
<polo35> <M> ZyDAS ZD1211/ZD1211B
+
<polo35> ok merci :)
+
<Artemys> I'll be back....
+
[INFO] You are now marked as away (User is away.). Click the nickname button or use the |/back| command to return from being away.
+
<tshado> polo35: ok merci j'ai compris ...c simple ...juste menuconfig options
+
<tshado> polo35: mise a part ton pb
+
<polo35> voila
+
<tshado> Artemys: polo35 encore mieux http://www.linuxwireless.org/en/users/Drivers/zd1211rw/devices#Hardwaresupported
+
<polo35> oué j'ai fait le tour de ces pages un peu :)
+
<polo35> il y a pas mal de dongle qui sont compatibles avec le driver
+
<jorasse> bonne soiree a tous...
+
<--| jorasse has left #armadeus
+
<tshado> je reviens dans un moment
+
<tshado> a+
+
<Artemys> alors polo35 ça marche mieux ?
+
<polo35> non :(
+
<polo35> j'ai essayé de flasher avec l'option CONFIG_FW_LOADER à off
+
<polo35> hm pardon c CONFIG_STANDALONE
+
<Artemys> tu passes dans /sbin/hotlug quand même ?
+
<polo35> dans /etc/hotplug ? avec le code que tu m'as donné ?
+
=== sbin/hotplug Unknown command
+
<Artemys> /sbin/hotplug oui
+
<Artemys> si tu met un echo "COUCOU" > /tmp/tmp.txt
+
<polo35> oui je l'ai bien mis dans /sbin
+
<Artemys> il est éxécutable ?
+
<polo35> j'ai fait chmod +x /sbin/hotplug
+
<polo35> donc j'aurai tendance à dire que oui :)
+
<polo35> et quand je débranche/rebranche le dongle c'est censé executé ce bash c'est bien ca ?
+
<Artemys> quand tu charge le driver je dirais
+
<polo35> ok
+
<polo35> bon j'ai des nouveaux trucs c'est bon signe ^
+
<polo35> modprobe zd1211rw
+
<polo35> usb 1-1.2: reset high speed USB device using isp1761 and address 8
+
<polo35> zd1211rw 1-1.2:1.0: eth1
+
<polo35> usbcore: registered new interface driver zd1211rw
+
<polo35> # ifconfig eth1 up
+
<polo35> intr period 1 uframes,
+
<polo35> ifconfig: SIOCSIFFLAGS: Connection timed out
+
<polo35> et à partir de ce moment le voyant du dongle s'éteint
+
-->| bruno (bsuarez@RZ-9d8b50f2.adsl.proxad.net) has joined #armadeus
+
<bruno> re bonjour,
+
<Artemys> polo35: C mieux ;-)
+
<bruno> les fichiers image en téléchargement sur armadeus.com sont ils compatibles aec la carte apf avec 8 M de flash
+
<Artemys> bruno: oui toujours
+
<polo35> maintenant j'ai USB control request for firmware upload failed. Error number -110
+
  
 
==Links==
 
==Links==
* [http://www.linuxwireless.org/en/users/Drivers/zd1211rw zd1211 driver on linuxwireless.org]
+
* https://wireless.wiki.kernel.org/
 +
* [https://wireless.wiki.kernel.org/en/users/drivers/zd1211rw zd1211 driver on linuxwireless.org]
  
 
[[Category:Network]]
 
[[Category:Network]]
 
[[Category:WiFi]]
 
[[Category:WiFi]]
 
[[Category:USB]]
 
[[Category:USB]]

Latest revision as of 18:05, 26 February 2018

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-131 (rev. A1) NT ~OK (3.7 kernel) NT ~OK (3.7 kernel) Realtek RTL8192U
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
Netgear N150 WNA1100 NT NT NT OK Atheros AR9271 see discussion
Linksys AE1000 NT NT NT ~OK (3.7 kernel) Ralink RT3572
TP-LINK TL-WN823N NT ~OK ? (3.7+ kernel) NT NT Realtek 8192CU

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

# insmod /lib/modules/2.6.35.3\+/kernel/drivers/net/wireless/8192cu.ko
rtw driver version=v3.4.3_4369.20120622 
Build at: Oct 15 2012 14:47:14
register rtw_netdev_ops to netdev_ops
CHIP TYPE: RTL8188C_8192C
...

# ifconfig wlan0 up
+871x_drv - drv_open, bup=0
 ===> FirmwareDownload91C() fw:Rtl819XFwImageArray_TSMC
FirmwareDownload92C accquire FW from embedded image
...
MAC Address = 78:44:76:95:96:76
-871x_drv - drv_open, bup=1
ADDRCONF(NETDEV_UP): wlan0: link is not ready

RTL8712U

Configure Linux

  • If not already done:
$ make linux-menuconfig
    Device Drivers  --->
        [*] Staging drivers  --->
            <M>   RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver
  • rebuild and reflash Linux image

Configure Buildroot

  • Only on recent Buildroot, otherwise get the firmware manually from linux-firmware git repository.
$ make menuconfig
Package Selection for the target  --->
    Hardware handling  --->
        Misc devices firmwares  ---> 
            [*] linux-firmware
                WiFi firmwares  --->
                    ...
                    [*] Realtek 8712
  • rebuild and reflash rootfs image
# modprobe r8712u
[   22.563440] r8712u: module is from the staging directory, the quality is unknown, you have been warned.
[   22.583039] r8712u: Staging version
[   22.586760] r8712u: register rtl8712_netdev_ops to netdev_ops
[   22.603628] r8712u: USB_SPEED_HIGH with 4 endpoints
[   22.611685] r8712u: Boot from EFUSE: Autoload OK
[   23.714020] r8712u: CustomerID = 0x0000
[   23.717967] r8712u: MAC Address from efuse = cc:b2:55:c6:67:1d
[   23.725866] r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
[   23.739712] usbcore: registered new interface driver r8712u

# ifconfig wlan0 up
[   62.320936] r8712u: 1 RCR=0x153f00e
[   62.325542] r8712u: 2 RCR=0x553f00e
[   62.440908] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 00:17:33:1C:91:E6
                    ESSID:"SFR WiFi Public"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:off
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
                              12 Mb/s; 48 Mb/s
                    Signal level=82/100  
.....

RTL8192CU

Configure Linux

  • If not already done:
$ make linux-menuconfig
    Device Drivers  --->
        [*] Network device support  --->
            [*]   Wireless LAN  --->
            <M>   Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
  • rebuild and reflash Linux image

Configure Buildroot

  • Only on recent Buildroot, otherwise get the firmware manually from linux-firmware git repository.
$ make menuconfig
Package Selection for the target  --->
    Hardware handling  --->
        Misc devices firmwares  ---> 
            [*] linux-firmware
                WiFi firmwares  --->
                    ...
                    [*] Realtek 8192
  • rebuild and reflash rootfs image
  • then plug the USB dongle and load the corresponding driver:
# modprobe rtl8192cu
[  180.151881] cfg80211: Calling CRDA to update world regulatory domain
[  180.462064] rtl8192cu: Chip version 0x11
[  180.642278] rtl8192cu: MAC address: 64:70:02:17:84:9a
[  180.647469] rtl8192cu: Board Type 0
[  180.653125] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[  180.659369] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
[  180.673783] usbcore: registered new interface driver rtl8192cu
[  180.833248] rtlwifi: wireless switch is on

# ifconfig wlan0 up
[  257.824955] rtl8192cu: MAC auto ON okay!
[  257.896107] rtl8192cu: Tx queue select: 0x05
[  258.348956] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

# iw dev wlan0 scan
BSS f4:ca:e5:c4:bc:35(on wlan0)
        TSF: 2389267669750 usec (27d, 15:41:07)
        freq: 2417
        beacon interval: 96 TUs
        capability: ESS ShortSlotTime (0x0401)
        signal: -35.00 dBm
        last seen: 650 ms ago
        Information elements from Probe Response frame:
        SSID: FreeWifi
        Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 
        DS Parameter set: channel 2
        ERP: Barker_Preamble_Mode
        Extended supported rates: 24.0 36.0 48.0 54.0 
.....

To go further

Links