OpenWrt Forum Archive

Topic: RTL8188RU support

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have an alfa NHR v2 that i have never managed to make it work on my router.
I have a brcm63xx based router with one usb port.

on 15.05 i can install the rtl8192cu driver and from dmesg it seams that it loads fine

[   15.472000] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   15.480000] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   15.488000] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[   15.492000] usbcore: registered new interface driver rtl8192cu
[   21.264000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 3, 100Mbps, full-duplex
[   29.016000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 3, 100Mbps, full-duplex
[   29.044000] device eth0.1 entered promiscuous mode
[   29.048000] device eth0 entered promiscuous mode
[   29.068000] br-lan: port 1(eth0.1) entered forwarding state
[   29.072000] br-lan: port 1(eth0.1) entered forwarding state
[   31.076000] br-lan: port 1(eth0.1) entered forwarding state
[   31.780000] rtl8192cu: MAC auto ON okay!
[   31.816000] rtl8192cu: Tx queue select: 0x05

But it brings to a stall even the internal wifi adapter b43-phy0: Broadcom 43225. Ifconfig iwconfig never respond and hang indefinitely. Neither the internal b43 nor the usb work.
The b43 works fine without the usb.

if they are both disabled iwconfig works fine

root@OpenWrt:~# iwconfig
eth0.1    no wireless extensions.

lo        no wireless extensions.

wlan1     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
          
wlan0     IEEE 802.11bg  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
eth0      no wireless extensions.

br-lan    no wireless extensions.

So i decided to try the latest 15.05.01(same behavior with the latest snapshot 20/6)

tried first the newest driver rtl8xxxu but no luck as you can see

[   11.846574] usbcore: registered new interface driver usbfs
[   11.852511] usbcore: registered new interface driver hub
[   11.858220] usbcore: registered new device driver usb
[   11.876378] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.912044] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   11.919688] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   11.934476] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.964436] nf_conntrack version 0.5.0 (439 buckets, 1756 max)
[   12.049642] xt_time: kernel timezone is -0000
[   12.654458] PPP generic driver version 2.4.2
[   12.664695] NET: Registered protocol family 24
[   12.718603] usbcore: registered new interface driver rtl8xxxu
[   12.778614] b43-phy0: Broadcom 43225 WLAN found (core revision 23)
[   12.786196] b43-phy0: Found PHY: Analog 8, Type 4 (N), Revision 6
[   12.792506] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2056, Revision 11, Version 0
[   12.801162] Broadcom 43xx driver loaded [ Features: PNL ]
[   12.966992] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   24.423824] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 3, 100Mbps, full-duplex
[   24.439916] device eth0.1 entered promiscuous mode
[   24.444880] device eth0 entered promiscuous mode
[   24.468977] br-lan: port 1(eth0.1) entered forwarding state
[   24.474784] br-lan: port 1(eth0.1) entered forwarding state
[   26.475345] br-lan: port 1(eth0.1) entered forwarding state
[   27.911347] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[   28.050036] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   28.064364] device wlan0 entered promiscuous mode
[   28.615884] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   28.622713] br-lan: port 2(wlan0) entered forwarding state
[   28.628432] br-lan: port 2(wlan0) entered forwarding state
[   30.631345] br-lan: port 2(wlan0) entered forwarding state

and same thing with the rtl8192cu, the only line that appeared in the logs was
usbcore: registered new interface driver rtl8192cu and nothing else

Do you know of any driver that works with this chipset?

In kali linux it works fine with the rtl8192cu driver.

(Last edited by owrt2 on 21 Jun 2016, 11:27)

alfa NHR v2 is a (client-) bridge, a 'repeater'.

  • Why are you loading a driver in the combo-modem?

  • And from where is the RTL8192CU module?

  • Why are you attaching the device to the combo-modem with a USB cable?

Max Hopper wrote:

alfa NHR v2 is a (client-) bridge, a 'repeater'.

  • Why are you loading a driver in the combo-modem?

  • And from where is the RTL8192CU module?

  • Why are you attaching the device to the combo-modem with a USB cable?

it is this AWUS036NHR V2
i wanted to use it in sta mode, a rt2800 dongle i have works fine

usb wifi in sta mode set as wan, internal wifi as access point

(Last edited by owrt2 on 21 Jun 2016, 12:50)

A STA to extend the WAN port of the modem?

Diagram, please.

http://i.imgur.com/BRP3ZCE.png


the following configuration works fine if i use a dongle that uses the rt2800 driver


network

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd17:b843:481c::/48'

config interface 'lan'
    option ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.4.1'
    option netmask '255.255.255.0'
#    option ip6assign '60'

#start switch: first port is eth0.2 is a separate vlan that is configured as wan, 2-3-4 are lan ports dhcp
config switch
    option name 'eth0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'eth0'
    option vlan '1'
    option ports '0 1 2 3 8t'

config switch_vlan
        option device 'eth0'
        option vlan '2'
        option ports '3 8t'


#end 


#wifi as wan, disable the other wan!
config interface 'wan'
    option proto 'dhcp'

# uncoment for wan on port 1 eth0.2
#    option ifname  'eth0.2'


wireless

# Internal b43 device that will be used as accesspoint
config wifi-device 'radio0'
    option type 'mac80211'
    option channel '13'
    option hwmode '11g'
    option path 'pci0000:00/0000:00:00.0/0000:01:00.0/bcma0:1'
    option txpower '20'
    option country 'JP'
    option disabled '0'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option network 'lan'
    option ssid 'blabla'
    option key 'passwordexample'
    option encryption 'psk2+ccmp'



# usb RT8188RU device
config wifi-device 'radio1'
    option type 'mac80211'
    option channel '4'
    option hwmode '11g'
    option path 'platform/ehci-platform/usb1/1-1/1-1:1.0'
    option htmode 'HT20'
    option disabled '0'

config wifi-iface
    option device 'radio1'
    option network 'wan'
    option mode 'sta'
    
# Internet Acesspoint    
    option ssid 'MotherAcesspoint'
    option key 'password22'
    option encryption 'psk2'

(Last edited by owrt2 on 21 Jun 2016, 15:30)

Hello,

be aware you can use only rtl8192cu or rtl8xxx driver.
But not both

elektroman wrote:

Hello,

be aware you can use only rtl8192cu or rtl8xxx driver.
But not both

yes sure, always tried them separately

any working driver source i can compile?
usbutils seams  broken too in 15.05.1 and latest snapshot, lsusb doesn't work

i build latest trunk from source and at least usbutils worked.
The usb chip was recognized correctly by the driver
eventhought the following error appeared in dmesg and as you can expect the usb wifi didn't work

here is the error for the rtl8192cu driver
mac addresses have been edited

[    5.437941] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   12.644102] rtl8192cu: Chip version 0x10
[   12.752863] rtl8192cu: MAC address: 00:xx:xx:xx:xx:xx
[   12.758123] rtl8192cu: Board Type 1
[   12.762205] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   12.768772] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   12.776541] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[   12.779518] usbcore: registered new interface driver rtl8192cu
[   27.201308] rtl8192cu: MAC auto ON okay!
[   27.333644] rtl8192cu: Tx queue select: 0x05
[   41.306506] rtl_usb: reg 0x824, usbctrl_vendorreq TimeOut! status:0xffffff6f value=0x6000300
[   51.314509] rtl_usb: reg 0x870, usbctrl_vendorreq TimeOut! status:0xffffff6f value=0x6000300
[   61.322645] rtl_usb: reg 0x860, usbctrl_vendorreq TimeOut! status:0xffffff6f value=0x6000300
[   71.330514] rtl_usb: reg 0x860, usbctrl_vendorreq TimeOut! status:0xffffff6f value=0x6000300

here is the error for the rt8xxxu driver

[    5.437136] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   11.933843] usb 1-1: Vendor:         11n U
[   11.937507] usb 1-1: Product: US036NHR
[   11.941392] usb 1-1: RTL8188RU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=1
[   11.949985] usb 1-1: RTL8188RU MAC: 00:xx:xx:xx:xx:xx
[   11.955210] usb 1-1: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   11.991114] usb 1-1: Firmware revision 80.0 (signature 0x88c1)
[   12.544601] usbcore: registered new interface driver rtl8xxxu
[   35.492515] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[   35.603132] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[   35.893391] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[   36.102012] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[   36.309775] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[   37.005692] br-lan: port 2(wlan1) entered forwarding state
[   37.456248] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[   37.507641] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[   37.717777] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[   37.925766] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[   38.142531] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[   39.720757] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[   39.764878] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[   39.973770] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[   40.181621] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[   40.389867] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[   42.451009] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[   42.493387] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[   42.701734] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[   42.909741] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[   43.118113] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[   54.101241] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[   54.137509] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[   54.345659] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[   54.553647] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[   54.761737] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[   75.716614] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[   75.749999] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[   75.957651] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[   76.165674] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[   76.373640] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  107.328782] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  107.364507] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  107.573726] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  107.781649] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  107.989656] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  168.948799] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  168.984482] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  169.193654] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  169.401658] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  169.609641] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  230.564100] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  230.600604] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  230.809646] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  231.017739] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  231.225642] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  322.193060] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  322.223125] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  322.429645] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  322.637749] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  322.845649] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  413.796250] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  413.831725] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  414.041648] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  414.249649] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  414.457641] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  505.408250] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  505.443530] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  505.649730] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  505.857649] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  506.065740] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  598.012624] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  598.048624] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  598.257655] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  598.465646] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  598.673642] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  691.604779] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  691.640906] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  691.849656] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  692.057650] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  692.265643] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[  813.211811] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[  813.247751] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[  813.457649] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[  813.665654] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[  813.873739] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out

any idea?

(Last edited by owrt2 on 24 Jun 2016, 22:50)

i guess i found a patch for the
authentication  timed out
with the rt8xxxu driver

 rtl8xxxu: Fix 8188RU support

The 8188RU does not like PAPE to be enabled, while all the other gen1
parts seem to require it.

This makes the RTL8188RU able to associate for me.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

https://github.com/torvalds/linux/commi … a052f3e3ff

will try to rebuild the driver with this changes when i get home, hope it work...

i'm having difficulties in compiling this

I see on http://mirror2.openwrt.org/sources/ and updated compat driver exists that includes the patch

http://mirror2.openwrt.org/sources/compat-wireless-2016-05-12.tar.bz2

but when building openwrt it uses the previous version

http://mirror2.openwrt.org/sources/compat-wireless-2016-01-10.tar.bz2

i tried to replace them manually but i get an error

mkdir -p /home/openb/openwrt/bin/brcm63xx/packages /home/openb/openwrt/build_dir/target-mips_mips32_musl-1.1.14/linux-brcm63xx_generic/compat-wireless-2016-01-10/ipkg-brcm63xx/kmod-rtl8xxxu/CONTROL /home/openb/openwrt/staging_dir/target-mips_mips32_musl-1.1.14/pkginfo
ERROR: module '/home/openb/openwrt/build_dir/target-mips_mips32_musl-1.1.14/linux-brcm63xx_generic/compat-wireless-2016-01-10/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko' is missing.
make[3]: *** [/home/openb/openwrt/bin/brcm63xx/packages/kernel/kmod-rtl8xxxu_4.1.23+2016-01-10-1_brcm63xx.ipk] Error 1
make[3]: Leaving directory `/home/openb/openwrt/package/kernel/mac80211'
make[2]: *** [package/kernel/mac80211/compile] Error 2
make[2]: Leaving directory `/home/openb/openwrt'
make[1]: *** [/home/openb/openwrt/staging_dir/target-mips_mips32_musl-1.1.14/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/openb/openwrt'
make: *** [world] Error 2

any idea how to fix this or build the new compat-wireless-2016-05-12.tar.bz2 drivers?

ok fine i did it
Compiled the last compat-wireless-2016-05-12.tar.bz2 manually and now its working fine

The discussion might have continued from here.