RTL8192cu doesn't work

Hey there, I got a problem getting my wifi usb stick working. It’s a RTL8192cu (ID 0b05:17ab ASUSTek Computer, Inc. USB-N13 802.11n Network Adapter (rev. B1) [Realtek RTL8192CU]) using kernel 4.4.70-BPI-R2-Kernel driver.

Output lsmod

Module                  Size  Used by                                                                                                                                                         
ipt_REJECT              1747  26                                                                                                                                                              
nf_reject_ipv4          3066  1 ipt_REJECT                                                                                                                                                    
ipt_MASQUERADE          1363  1                                                                                                                                                               
nf_nat_masquerade_ipv4     2881  1 ipt_MASQUERADE                                                                                                                                             
iptable_nat             2144  1                                                                                                                                                               
nf_nat_ipv4             5877  1 iptable_nat                                                                                                                                                   
nf_nat                 15897  2 nf_nat_ipv4,nf_nat_masquerade_ipv4                                                                                                                            
bridge                117619  0                                                                                                                                                               
stp                     2300  1 bridge                                                                                                                                                        
llc                     5349  2 stp,bridge                                                                                                                                                    
nf_conntrack_ipv4      15603  1                                                                                                                                                               
nf_defrag_ipv4          1821  1 nf_conntrack_ipv4                                                                                                                                             
xt_tcpudp               2526  1                                                                                                                                                               
xt_conntrack            3467  0                                                                                                                                                               
nf_conntrack           99741  5 nf_nat,nf_nat_ipv4,xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_ipv4                                                                                      
ip6table_filter         1874  0                                                                                                                                                               
ip6_tables             13308  1 ip6table_filter                                                                                                                                               
iptable_filter          1933  1                                                                                                                                                               
ip_tables              13040  2 iptable_filter,iptable_nat                                                                                                                                    
x_tables               17730  8             
ip6table_filter,ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_conntrack,iptable_filter,ipt_REJECT,ip6_tables                                                          
tun                    21335  2                                                                                                                                                               
rtl8192cu              96355  0                                                                                                                                                               
rtl_usb                14811  1 rtl8192cu                                                                                                                                                     
rtl8192c_common        66995  1 rtl8192cu                                                                                                                                                     
rtlwifi                99944  3 rtl_usb,rtl8192c_common,rtl8192cu                                                                                                                             
mac80211              546443  3 rtl_usb,rtlwifi,rtl8192cu                                                                                                                                     
mtk_thermal             5801  0                                                                                                                                                               
mtk_cir                 3671  0             

Output lshw -C net

*-network:1 DISABLED                                                                                                                                                                        
   description: Ethernet interface                                                                                                                                                        
   physical id: 6                                                                                                                                                                         
   bus info: usb@3:1                                                                                                                                                                      
   logical name: wlx704d7b14e470                                                                                                                                                          
   serial: 70:4d:7b:14:e4:70                                                                                                                                                              
   capabilities: ethernet physical                                                                                                                                                        
   configuration: broadcast=yes driver=rtl8192cu driverversion=4.4.70-BPI-R2-Kernel firmware=N/A link=no multicast=yes              

Out iwconfig

wlx704d7b14e470  no wireless extensions.

Is there a problem using the kerne internal driver or did I make another mistake?

You might have to install the realtek firmware.
apt-get install firmware-realtek
The firmware is part of non-free so add that to each line in your apt sources.lst file.

Yes, but from personal experience. I have a BPi-R1. It has a built-in wifi on rtl8192cu. I managed to get the normal work of the wifi only with a 3.x kernel with a patched driver. On the core 4.x wifi works bad. The problem with the drivers. Normal ready no. It is necessary to patch and collect. I did not do it, it’s expensive. It’s easier to change the chip.

Ok I understand.
Have you tried installing the realtek firmware yet?
Is this the same distro you were using on the R1 or did you do a new install?
Which kernel are you using? If it is 4.4 then please update to a newer kernel for the R2 as 4.4 is very old and you are missing a lot of device support that the R2 needs.
The rtl8192cu driver did indeed have a lot of issues for a while and needed to be patched.
For starters install the realtek firmware and if that fails try installing a later kernel (Try 4.14) that has the following as kernel options:
CONFIG_RTL_CARDS=y
CONFIG_RTL8192CU=m
CONFIG_RTLWIFI=m
CONFIG_RTLWIFI_USB=m
CONFIG_RTLWIFI_DEBUG=y
CONFIG_RTL8192C_COMMON=m
Use Franks kernel source as he is on top of the R2 and everything works.
https://github.com/frank-w/BPI-R2-4.14/branches/all

On R1 I used different distributions found on the Internet. The best result showed armbian. But the problems with wifi everywhere are the same. Normally works with the client on Linux, and the problem with the device on Android. Connects to, but a large packet loss and floating ping. Therefore, I recognized this chip as unpromising for creating an AP. By the way, on R2 is well run by kernels and wifi from frank-w

(precompiled) Kernels for BPI-R2

Why not just use the R2 onboard wifi?
It’s only a single antenna but works ok.

Yes in R2 I use onboard wifi

@phil: I added the non-free parts to all lines of source.list, but this part seems to be not available?!

sources.list:

deb http://ports.ubuntu.com/ xenial main restricted universe multiverse non-free
deb-src http://ports.ubuntu.com/ xenial main restricted universe multiverse non-free

deb http://ports.ubuntu.com/ xenial-updates main restricted universe multiverse non-free
deb-src http://ports.ubuntu.com/ xenial-updates main restricted universe multiverse non-free

deb http://ports.ubuntu.com/ xenial-security main restricted universe multiverse non-free
deb-src http://ports.ubuntu.com/ xenial-security main restricted universe multiverse non-free

deb http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse non-free
deb-src http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse non-free
deb [arch=armhf] https://download.docker.com/linux/ubuntu xenial stable         
# deb-src [arch=armhf] https://download.docker.com/linux/ubuntu xenial stable

The output for apt-get update

OK:1 http://ports.ubuntu.com xenial InRelease
Holen:2 http://ports.ubuntu.com xenial-updates InRelease [109 kB]
OK:3 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu xenial InRelease          
OK:4 http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial InRelease        
Holen:5 http://ports.ubuntu.com xenial-security InRelease [107 kB]
Holen:6 http://ports.ubuntu.com xenial-backports InRelease [107 kB]
OK:7 https://download.docker.com/linux/ubuntu xenial InRelease
Es wurden 323 kB in 3 s geholt (92,1 kB/s).
Paketlisten werden gelesen... Fertig
E: Fehlschlag beim Holen von http://ports.ubuntu.com/dists/xenial/InRelease  Erwarteter Eintrag »non-free/source/Sources« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
E: Fehlschlag beim Holen von http://ports.ubuntu.com/dists/xenial-updates/InRelease  Erwarteter Eintrag »non-free/source/Sources« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
E: Fehlschlag beim Holen von http://ports.ubuntu.com/dists/xenial-security/InRelease  Erwarteter Eintrag »non-free/source/Sources« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
E: Fehlschlag beim Holen von http://ports.ubuntu.com/dists/xenial-backports/InRelease  Erwarteter Eintrag »non-free/source/Sources« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
E: Einige Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder alte an ihrer Stelle benutzt.

So now I try to install the newest kernel version.

I want to use the rtl usb stick, because the internal wifi adapter provides an AP for 5ghz wifi, but for some hardware I need an additional 2.4ghz.

Ubuntu does not know realtek-firmware package like in debian…

Maybe this is the right one: https://packages.ubuntu.com/search?keywords=linux-firmware-nonfree

Also it seems that backports (your mirror) does npt have a branch non-free…try the default ubuntu-repository

Yes, that’s definitely a Debian only package. I wasn’t sure what distro you were using as you never replied with it.

linux-firmware is the the one you want not linux-firmware-nonfree.

The linux-firmware package contains the following files related to rtl8192cu:
rtl8192cufw.bin
rtl8192cufw_A.bin
rtl8192cufw_B.bin
rtl8192cufw_TMSC.bin
Re-edit your sources.lst and remove the non-free tag and apt update and finally apt-install linux-firmware

Sry for the long term without any reaction.

I updated the kernel to 4.14 and installed a new driver for rtl8192cu via dkms. Now it comes up with wlan1 in the ifconfig.

My current problem is that there is no entry for it in iw dev

Any ideas? Thx for your help.