linuxthefish
Posts: 4
Joined: Sat Jan 26, 2013 3:27 pm

Why has the rt8192cu driver been replaced with 8192cu?

Wed May 27, 2015 5:38 pm

Hi,

A few years back I used to use a Realtek RTL8188CUS USB card as a hotspot. Now when I try to use this USB card it tries to use the 8192cu driver, how can I stop this?

I have tried to compile the rt8192cu with no luck, as gcc "is too buggy; it is known to miscompile kernels"! Is there any way to switch back to the 3.6.11 kernel or a version where this driver was working?

Code: Select all

root@pi3:~/linux# lsusb
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
root@pi3:~/linux# lsmod
Module                  Size  Used by
8192cu                569561  0

Code: Select all

root@pi3:~# cat /proc/version
Linux version 3.18.11+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #781 PREEMPT Tue Apr 21 18:02:18 BST 2015
root@pi3:~# gcc --version | grep gcc
gcc (Raspbian 4.8.2-21~rpi3rpi1) 4.8.2

Code: Select all

root@pi3:~# rpi-source

 *** gcc version check: OK

 *** Using: /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz

 *** Latest firmware revision: 6cc27e02dde4f1e02cfddb3d0f23d54be87680cb

 *** Linux source commit: bb6b4b6b331680bed807605685572d727638bb51

 *** Kernel source already installed: /root/linux-bb6b4b6b331680bed807605685572d727638bb51

Code: Select all

root@pi3:~# ln -s ~/linux/arch/arm ~/linux/arch/armv6l

I then downloaded proper driver from https://github.com/dz0ny/rt8192cu

Code: Select all

root@pi3:~/rt8192cu# ls
blacklist-dkms-8192cu.conf  clean  core  dkms-8192cu.install  dkms.conf  hal  ifcfg-wlan0  include  Kconfig  Makefile  os_dep  README.md  runwpa  wlan0dhcp
root@pi3:~/rt8192cu# make
make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/3.18.11+/build M=/root/rt8192cu  modules
make[1]: Entering directory '/root/linux-bb6b4b6b331680bed807605685572d727638bb51'
  CC [M]  /root/rt8192cu/core/rtw_cmd.o
  CC [M]  /root/rt8192cu/core/rtw_security.o
  CC [M]  /root/rt8192cu/core/rtw_debug.o
  CC [M]  /root/rt8192cu/core/rtw_io.o
  CC [M]  /root/rt8192cu/core/rtw_ioctl_query.o
  CC [M]  /root/rt8192cu/core/rtw_ioctl_set.o
  CC [M]  /root/rt8192cu/core/rtw_ieee80211.o
  CC [M]  /root/rt8192cu/core/rtw_mlme.o
  CC [M]  /root/rt8192cu/core/rtw_mlme_ext.o
  CC [M]  /root/rt8192cu/core/rtw_wlan_util.o
  CC [M]  /root/rt8192cu/core/rtw_pwrctrl.o
  CC [M]  /root/rt8192cu/core/rtw_rf.o
  CC [M]  /root/rt8192cu/core/rtw_recv.o
  CC [M]  /root/rt8192cu/core/rtw_sta_mgt.o
  CC [M]  /root/rt8192cu/core/rtw_ap.o
  CC [M]  /root/rt8192cu/core/rtw_xmit.o
  CC [M]  /root/rt8192cu/core/rtw_p2p.o
  CC [M]  /root/rt8192cu/core/rtw_tdls.o
  CC [M]  /root/rt8192cu/core/rtw_br_ext.o
  CC [M]  /root/rt8192cu/core/rtw_iol.o
  CC [M]  /root/rt8192cu/core/rtw_sreset.o
  CC [M]  /root/rt8192cu/core/efuse/rtw_efuse.o
  CC [M]  /root/rt8192cu/hal/hal_intf.o
  CC [M]  /root/rt8192cu/hal/hal_com.o
  CC [M]  /root/rt8192cu/hal/dm.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_hal_init.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_phycfg.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_rf6052.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_dm.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_rxdesc.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_cmd.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/usb_halinit.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/rtl8192cu_led.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/rtl8192cu_recv.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/usb_ops_linux.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_sreset.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_xmit.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.o
  CC [M]  /root/rt8192cu/os_dep/osdep_service.o
  CC [M]  /root/rt8192cu/os_dep/linux/os_intfs.o
/root/rt8192cu/os_dep/linux/os_intfs.c:1017:2: warning: initialization from incompatible pointer type [enabled by default]
  .ndo_select_queue = rtw_select_queue,
  ^
/root/rt8192cu/os_dep/linux/os_intfs.c:1017:2: warning: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’) [enabled by default]
  CC [M]  /root/rt8192cu/os_dep/linux/usb_intf.o
  CC [M]  /root/rt8192cu/os_dep/linux/usb_ops_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/ioctl_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/xmit_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/mlme_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/recv_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /root/rt8192cu/os_dep/linux/rtw_android.o
  LD [M]  /root/rt8192cu/8192cu.o
  Building modules, stage 2.
  MODPOST 1 modules
/bin/sh: 1: scripts/mod/modpost: not found
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[2]: *** [__modpost] Error 127
Makefile:1384: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/root/linux-bb6b4b6b331680bed807605685572d727638bb51'
Makefile:584: recipe for target 'modules' failed
make: *** [modules] Error 2
I then try to fix missing kernel scripts issue...

Code: Select all

root@pi3:~/linux/scripts# cd ~/linux
root@pi3:~/linux# ls
arch   COPYING  crypto         drivers   fs       init  Kbuild   kernel  MAINTAINERS  mm              Module.symvers.backup  README          samples  security  tools  virt
block  CREDITS  Documentation  firmware  include  ipc   Kconfig  lib     Makefile     Module.symvers  net                    REPORTING-BUGS  scripts  sound     usr
root@pi3:~/linux# make modules_prepare
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      arch/arm/kernel/asm-offsets.s
arch/arm/kernel/asm-offsets.c:53:2: error: #error Your compiler is too buggy; it is known to miscompile kernels
 #error Your compiler is too buggy; it is known to miscompile kernels
  ^
arch/arm/kernel/asm-offsets.c:54:2: error: #error and result in filesystem corruption and oopses.
 #error and result in filesystem corruption and oopses.
  ^
Kbuild:81: recipe for target 'arch/arm/kernel/asm-offsets.s' failed
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Makefile:980: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
But I can't as Raspberry Pi kernel uses an ancient version of GCC! How can I compile this driver and get wireless working like it used to? :(

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Why has the rt8192cu driver been replaced with 8192cu?

Wed May 27, 2015 7:02 pm

linuxthefish wrote: How can I compile this driver and get wireless working like it used to?
Good luck.

You're fighting the problem. There are several wifi modules that work well with the RPi; and they are inexpensive. Purchase a wifi adapter that works and be happy.
marcus
:ugeek:

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Why has the rt8192cu driver been replaced with 8192cu?

Wed May 27, 2015 8:25 pm

It was replaced because it didn't work. This was done years ago. I was using the 8192cu driver with 3.1.9 and have done with all versions since then on the Pi, and still do. No problems as far as I can see.

If you want to create a hotspot/access point look here http://www.daveconroy.com/turn-your-ras ... s-chipset/

Or if you really want to compile the old rt8192cu look here to update gcc https://somewideopenspace.wordpress.com ... pi-wheezy/


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

linuxthefish
Posts: 4
Joined: Sat Jan 26, 2013 3:27 pm

Re: Why has the rt8192cu driver been replaced with 8192cu?

Thu May 28, 2015 11:20 am

MrEngman wrote:It was replaced because it didn't work. This was done years ago. I was using the 8192cu driver with 3.1.9 and have done with all versions since then on the Pi, and still do. No problems as far as I can see.

If you want to create a hotspot/access point look here http://www.daveconroy.com/turn-your-ras ... s-chipset/

Or if you really want to compile the old rt8192cu look here to update gcc https://somewideopenspace.wordpress.com ... pi-wheezy/


MrEngman

Do you happen to know what version this was removed in? Thanks.

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Why has the rt8192cu driver been replaced with 8192cu?

Thu May 28, 2015 1:01 pm

linuxthefish wrote:
MrEngman wrote:It was replaced because it didn't work. This was done years ago. I was using the 8192cu driver with 3.1.9 and have done with all versions since then on the Pi, and still do. No problems as far as I can see.

If you want to create a hotspot/access point look here http://www.daveconroy.com/turn-your-ras ... s-chipset/

Or if you really want to compile the old rt8192cu look here to update gcc https://somewideopenspace.wordpress.com ... pi-wheezy/


MrEngman

Do you happen to know what version this was removed in? Thanks.
A quick search through the raspberrypi firmware repository shows it was removed on raspbian kernel version 3.2.27+ #114 3 Sep 2012, and replaced by the 8192cu driver.

raspberrypi git repo linux kernel commit-id - 1625539436b4965c445fff708eb28d3d55af7685
raspberrypi git repo firmware commit-id - 7847986e3d282365b49777acd67819e5bb0823b3
hexxeh rpi-update git repo commit-id - d860bb689b8a66a303325d87a57ab33221c5a5e7


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

linuxthefish
Posts: 4
Joined: Sat Jan 26, 2013 3:27 pm

Re: Why has the rt8192cu driver been replaced with 8192cu?

Sun Jun 28, 2015 11:25 am

This driver has some serious issues, it won't even work for connecting to a wireless network when an x86 PC and standard linux kernel works fine...

Code: Select all

root@pi4:~# cat /etc/network/interfaces 
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.16.0.5
netmask 255.255.255.0

allow-hotplug wlan2
iface wlan2 inet static
wpa-conf /etc/wpa_supplicant/wpa_supplicant0.conf
address 172.16.0.50
gateway 172.16.0.1
netmask 255.255.0.0

Code: Select all

root@pi4:~# cat /etc/wpa_supplicant/wpa_supplicant0.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="BTHub5-48AQ"
psk="password"

# Protocol type can be: RSN (for WP2) and WPA (for WPA1)
proto=RSN

# Key management type can be: WPA-PSK or WPA-EAP (Pre-Shared or Enterprise)
key_mgmt=WPA-PSK

# Pairwise can be CCMP or TKIP (for WPA2 or WPA1)
pairwise=CCMP

#Authorization option should be OPEN for both WPA1/WPA2 (in less commonly used are SHARED and LEAP)
auth_alg=OPEN
}

Code: Select all

root@pi4:~# ifup wlan2
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

Code: Select all

root@pi4:~# iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
wlan2     IEEE 802.11bgn  ESSID:"BTHub5-48AQ"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 64:A1:3A:C9:A5:B0   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

wlan1     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

All my other wireless cards work fine, just not this card in RPI! lsusb says:

Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Return to “Troubleshooting”