How to install the new version of the RTL8187 driver on Ubuntu 13.04?

Well, Ubuntu has made me feel very welcome in the Linux world, opening its arms with serious problems. I guess I wouldn't say I am new, but I haven't used Ubuntu for almost 5 years now.

I have been having a large issue where my Alfa AWUS036H Wireless Adapter is experiencing a VERY SLOW connection. It takes me about 5-10 minutes to download 5MB, and I have a 100mbps download speed through my provider. This worked great on windows, but now that I have switched to Ubuntu, I am having so many problems.

I read here that if I re-install the new version of the Realtek RTL8187 driver, it would fix my speed issue. I downloaded the most recent version of the RTL8187L driver, followed the steps provided, and ended up with this stacktrace:

make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
CC [M]  /home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.o
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:153:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8187_usb_probe’
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:155:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8187_usb_disconnect’
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:168:12: error: ‘rtl8187_usb_probe’ undeclared here (not in a function)
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:169:16: error: ‘rtl8187_usb_disconnect’ undeclared here (not in a function)
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c: In function ‘rtl8180_tx’:
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:1382:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c: In function ‘rtl8187_usb_initendpoints’:
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:1588:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c: At top level:
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:3762:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8187_usb_probe’
/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:3862:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8187_usb_disconnect’
make[2]: *** [/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.o] Error 1
make[1]: *** [_module_/home/lehmanlb/Desktop/rtl8187L_linux_1041.0209.2012/rtl8187] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make: *** [all] Error 2

Here is my iwconfig:

lehmanlb@lehmanlb-p6710f:~/Desktop/rtl8187L_linux_1041.0209.2012$ iwconfigwlan1     IEEE 802.11bg  ESSID:"6WFBC"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:7F:28:64:42:80   
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-30 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:89   Missed beacon:0

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=27 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

If you need any more information let me know! I am dying to get something working here! Thanks.


This last answer works like a charm for me in LUbuntu. I'm noticing every time I reboot I have to repeat these last steps. Is there anyway to like "cement" this as a permanent thing. I'm using a HP All in on 1 deal and I'm not liking how the bios won't let me shut off the onboard wifi for it and theres no external "turn off" switch for it. I've tried to accept the bad with the good and using the onboard for wifi internet while the Realtek runs airmon-ng. You're getting good traffic to this website from me tho, been to this page like 20 times now cuz it actually fixes my problem. But would like to actually "fix" fix it instead of bandaiding it like I am here.

In reply to:

sudo modprobe rtl8187
sudo iwconfig wlan1 rate 5.5M fixed 
sudo iwconfig wlan1 frag 2346
sudo iwconfig wlan1 rts 2347
sudo iwconfig wlan1 txpower 30
set in rc.local ^^

ALSO My version of this particular card WON'T let me set it to power 30 without the classic error:

Error for wireless request "Set Tx Power" (8B26) : SET failed on device wlan1 ; Invalid argument.

For this, I switched the numbers first 20, it didn't error anymore...Thought hmmm, its the number...so tried 21, 22, etc, it went as high as 27 for my version of this particular card before it errored. So there....I contributed with my question, those having the error with txpower part, try a smaller number.


sudo modprobe rtl8187
sudo iwconfig wlan1 rate 5.5M fixed 
sudo iwconfig wlan1 frag 2346
sudo iwconfig wlan1 rts 2347
sudo iwconfig wlan1 txpower 30

set in rc.local ^^