# WLAN USB adapter to MangOH

**URL:** <https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179>\
**Category:** Legato Application Framework\
**Created:** [January 8, 2016, 4:10pm UTC](https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179 "2016-01-08T16:10:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vkuehne](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@Vkuehne](https://forum.legato.io/u/Vkuehne)\
**Post date:** [January 8, 2016, 4:10pm UTC](https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179/1 "2016-01-08T16:10:53Z")

</div>

Hello,  
I connected a WLAN USB ISY IWL2000 Adapter to MangOH.  
root@swi-mdm9x15:/# lsusb  
Bus 001 Device 006: ID 050d:11f2 Belkin Components ISY Wireless Micro Adapter IWL 2000 [RTL8188CUS]  
Bus 001 Device 004: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter  
Bus 001 Device 003: ID 0424:9514 Standard Microsystems Corp.  
Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp.  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ifconfig does not list wlan0

root@swi-mdm9x15:/# ifconfig  
eth0 Link encap:Ethernet HWaddr 52:AE:24:AA:76:ED  
UP BROADCAST MULTICAST MTU:1500 Metric:1  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback  
inet addr:127.0.0.1 Mask:255.0.0.0  
inet6 addr: ::1/128 Scope:Host  
UP LOOPBACK RUNNING MTU:65536 Metric:1  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:0  
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr D2:C4:29:83:98:B3  
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0  
inet6 addr: fe80::d0c4:29ff:fe83:98b3/64 Scope:Link  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:501 errors:0 dropped:0 overruns:0 frame:0  
TX packets:291 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:37527 (36.6 KiB) TX bytes:47365 (46.2 KiB)

Which steps should I follow to configure it?

---

<div class="post-metadata">

**Author:** ![JayM2M](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JayM2M](https://forum.legato.io/u/JayM2M)\
**Post date:** [January 22, 2016, 4:49pm UTC](https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179/2 "2016-01-22T16:49:53Z")

</div>

Hi,

You need to add kernel driver for the Realtek RTL8188CUS chipset.

So, you have to play a bit with Yocto in order to rebuild new kernel/rootfs images with all the needed stuff.

RTL8188CUS is using the same driver as RTL8192CU: check other projects like Raspberry Pi or OpenWRT for info about how to integrate such a driver.

Also, maybe some existing Yocto recipes like the following one can help:  
[github.com/resin-io/meta-resin/ … .2\_9000.bb](https://github.com/resin-io/meta-resin/blob/master/meta-resin-common/recipes-kernel/rtl8192cu/rtl8192cu_4.0.2_9000.bb)

Jay

---

<div class="post-metadata">

**Author:** ![JayM2M](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JayM2M](https://forum.legato.io/u/JayM2M)\
**Post date:** [January 29, 2016, 1:47pm UTC](https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179/3 "2016-01-29T13:47:58Z")

</div>

Hi,

I did the exercise to integrate all the drivers and tools in order to support USB WiFi dongles based on Realtek RTL8192CU/RTL8188CUS chipset.

It is working fine on my mangOH board with WP8548 running the firmware SWI9X15Y\_07.05.01.00 (the one delivered with Legato 15.10).

My WiFi dongle used for the test is the famous Edimax EW-7811UN (based on RTL8188CUS).

If you want to test it, I have uploaded a Yocto image (kernel+rootfs) for WP85 target:  
[Yocto image (only for SWI9X15Y\_07.05.01.00)](http://s000.tinyupload.com/?file_id=87907125914005278044)

[color=#FF0000]Warning[/color]:  
Prior to install this image, your mangOH board (WP8548 module) must be already upgraded to Legato 15.10 (firmware SWI9X15Y\_07.05.01.00).  
[color=#FF0000]Do not try to install it on top of another version.[/color]

Then, here is an example about how to use it:

[code]# modprobe rtl8192cu

# iw dev wlan0 info

Interface wlan0  
ifindex 12  
wdev 0x1  
addr 74:da:38:xx:xx:xx  
type managed  
wiphy 0

# ifconfig wlan0 up

# wpa\_supplicant -B -i wlan0 -c wifi.conf

Successfully initialized wpa\_supplicant  
[479.072394] wlan0: authenticate with 00:1a:1e:xx:xx:xx  
[479.114146] wlan0: send auth to 00:1a:1e:xx:xx:xx (try 1/3)  
[479.123363] wlan0: authenticated  
[479.126323] rtl8192cu 1-1.3.2:1.0 wlan0: disabling HT as WMM/QoS is not supported by the AP  
[479.142652] rtl8192cu 1-1.3.2:1.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP  
[479.167312] wlan0: associate with 00:1a:1e:xx:xx:xx (try 1/3)  
[479.178605] wlan0: RX AssocResp from 00:1a:1e:xx:xx:xx (capab=0x431 status=0 aid=1)  
[479.188310] wlan0: associated  
[479.190324] IPv6: ADDRCONF(NETDEV\_CHANGE): wlan0: link becomes ready

# iw dev wlan0 link

Connected to 00:1a:1e:xx:xx:xx (on wlan0)  
SSID: MYWIFIHOTSPOT  
freq: 2412  
RX: 88966 bytes (1616 packets)  
TX: 978 bytes (10 packets)  
signal: -40 dBm  
tx bitrate: 18.0 MBit/s

```
    bss flags: short-preamble short-slot-time
    dtim period: 0
    beacon int: 100

```

# udhcpc -i wlan0

udhcpc (v1.22.1) started  
Sending discover…  
Sending select for 192.168.40.190…  
Lease of 192.168.40.190 obtained, lease time 28800  
/etc/udhcpc.d/50default: Adding DNS 8.8.8.8  
/etc/udhcpc.d/50default: Adding DNS 4.2.2.2

# ifconfig wlan0

wlan0 Link encap:Ethernet HWaddr 74:DA:38:xx:xx:xx  
inet addr:192.168.40.190 Bcast:192.168.40.255 Mask:255.255.255.0  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:8 errors:0 dropped:0 overruns:0 frame:0  
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:1204 (1.1 KiB) TX bytes:2614 (2.5 KiB)

# ping -c 4 [www.legato.io](http://www.legato.io)

PING [www.legato.io](http://www.legato.io) (185.31.18.133): 56 data bytes  
64 bytes from 185.31.18.133: seq=0 ttl=54 time=23.226 ms  
64 bytes from 185.31.18.133: seq=1 ttl=54 time=25.729 ms  
64 bytes from 185.31.18.133: seq=2 ttl=54 time=20.968 ms  
64 bytes from 185.31.18.133: seq=3 ttl=55 time=25.515 ms

— [www.legato.io](http://www.legato.io) ping statistics —  
4 packets transmitted, 4 packets received, 0% packet loss  
round-trip min/avg/max = 20.968/23.859/25.729 ms[/code]

* * *

Jay

---

<div class="post-metadata">

**Author:** ![Vkuehne](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@Vkuehne](https://forum.legato.io/u/Vkuehne)\
**Post date:** [February 3, 2016, 5:23pm UTC](https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179/4 "2016-02-03T17:23:58Z")

</div>

Hi Jay,

now it works.

root@swi-mdm9x15:~# ifconfig  
eth0 Link encap:Ethernet HWaddr 9A:D4:75:C2:9B:D7  
UP BROADCAST MULTICAST MTU:1500 Metric:1  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback  
inet addr:127.0.0.1 Mask:255.0.0.0  
inet6 addr: ::1/128 Scope:Host  
UP LOOPBACK RUNNING MTU:65536 Metric:1  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:0  
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr F2:A9:2C:54:0D:B3  
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0  
inet6 addr: fe80::f0a9:2cff:fe54:db3/64 Scope:Link  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:6063 errors:0 dropped:0 overruns:0 frame:0  
TX packets:8261 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:464100 (453.2 KiB) TX bytes:4654500 (4.4 MiB)

wlan0 Link encap:Ethernet HWaddr EC:1A:59:D5:80:5E  
inet addr:192.168.137.179 Bcast:192.168.137.255 Mask:255.255.255.0  
inet6 addr: fe80::ee1a:59ff:fed5:805e/64 Scope:Link  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1  
RX packets:13 errors:0 dropped:0 overruns:0 frame:0  
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
RX bytes:2405 (2.3 KiB) TX bytes:2133 (2.0 KiB)

root@swi-mdm9x15:~# ping [www.google.de](http://www.google.de)  
PING [www.google.de](http://www.google.de) (173.194.112.143): 56 data bytes  
64 bytes from 173.194.112.143: seq=0 ttl=47 time=78.224 ms  
64 bytes from 173.194.112.143: seq=1 ttl=47 time=113.017 ms

Thanks!!

---

<div class="post-metadata">

**Author:** ![vincelai520](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vincelai520](https://forum.legato.io/u/vincelai520)\
**Post date:** [November 22, 2016, 1:01am UTC](https://forum.legato.io/t/wlan-usb-adapter-to-mangoh/179/5 "2016-11-22T01:01:26Z")

</div>

Hi Jay,

I bought a Wi-Fi USB dongle, EDIMAX EW-7811Un, which chip is rtl8188cu and the driver is compatible with rtl8192cu. I found there is rtl8192cu driver in Legato-Dist-Source-mdm9x15-SWI9X15Y\_07.11.09.00.

I create rtl8192cu.cfg in meta-swi/meta-swi-mdm9x15/recipes-kernel/linux/files/ as the following  
CONFIG\_AVERAGE=y

Generic 802.11 Support:  
CONFIG\_CFG80211=m  
CONFIG\_CFG80211\_DEFAULT\_PS=y  
CONFIG\_MAC80211=m  
CONFIG\_MAC80211\_HAS\_RC=y  
CONFIG\_MAC80211\_RC\_MINSTREL=y  
CONFIG\_MAC80211\_RC\_MINSTREL\_HT=y  
CONFIG\_MAC80211\_RC\_DEFAULT\_MINSTREL=y  
CONFIG\_MAC80211\_RC\_DEFAULT=“minstrel\_ht”  
CONFIG\_CFG80211\_WEXT=y

USB 802.11 Devices:  
CONFIG\_RTL8192CE=m  
CONFIG\_RTL8192CU=m  
CONFIG\_RTLWIFI=m  
CONFIG\_RTLWIFI\_DEBUG=y  
CONFIG\_RTL8192C\_COMMON=m

Rfkill support (used by wireless/bluetooth devices)  
CONFIG\_RFKILL=m  
CONFIG\_RFKILL\_LEDS=y

Add cpu temperature support (Not related to 802.11, but a nice thing to have)  
CONFIG\_SENSORS\_CORETEMP=m

Edit meta-swi/meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto\_3.14.bbappend  
SRC\_URI += “file://rtl8192cu.cfg”

After make yocto, I got rtlwifi.ko, rtl\_usb.ko, rtl8192cu.ko, and rtl8192c-common.ko, but without RTL8192CE.ko, why?

When I modpobe rtl8192cu, I got the error message.  
modprobe: can’t load module rtl\_usb (kernel/drivers/net/wireless/rtlwifi/rtl\_usb.ko): unknown symbol in module, or unknown parameter

dmesg log is  
[19.357942] mbim\_read: Requests list is empty. Wait.  
[129.082923] Loading modules backported from Linux version R8.5  
[129.095070] Backport generated by backports.git R8.5  
[129.235373] cfg80211: Calling CRDA to update world regulatory domain  
[129.485121] rtlwifi: Unable to register rtl\_rc, use default RC !!  
[129.491622] rtl\_usb: Unknown symbol ieee80211\_rx (err 0)

Can I modify the configuration file in arch/arm/configs/ ?  
If so, which configuration do I need to modify?

Thank you very much!
