LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2012, 08:46 PM   #1
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Rep: Reputation: Disabled
Help installing drivers from source (RTL8187L)


Hi,

Recently I posted over on the LMDE forums about my difficulties with the stock rtl8187 module. It turns out that many Linux users have the same problems. And for many of them, the fix was to install drivers downloaded from Realtek.

My AWUS036H USB card is supposed to have an RTL8187L chip, so I downloaded that package and installed it. Then I marked that thread solved. It turned out that was a bit premature, because after a decent couple of hours, my problems started cropping up again. I think that somehow my installation wasn't successful.

The output of the 'make' process seems to report that an rtl8187l.ko file was built. But I've searched my entire filesystem, and there's no such file there. I've also checked the only rtl8187.ko file extant under /lib/modules. Its datestamp is from last week, I think from the day I built my custom kernel and modules. In any case, that date is well before my last attempt to install the Realtek drivers, today.

Here's a transcript of my most recent terminal session, with output from 'make clean', 'make', and 'make install'. I hope you can help.

Code:
mint rtl8187L_linux_1041.0209.2012 # make clean

make[1]: Entering directory `/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187'
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
rm -fr Module.symvers
rm -fr modules.order
rm -fr Module.markers
rm -rf tags
make[1]: Leaving directory `/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187'
make[1]: Entering directory `/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/ieee80211'
rm -f *.mod.c *.mod *.o .*.cmd *.ko *~
rm -rf /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/ieee80211/tmp
rm -fr Module.symvers
rm -fr modules.order
rm -fr Module.markers
make[1]: Leaving directory `/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/ieee80211'


mint rtl8187L_linux_1041.0209.2012 # make

make[1]: Entering directory `/usr/src/linux-source-3.2'
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.o
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c: In function ‘rtl8180_tx’:
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:1382:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c: In function ‘rtl8187_usb_initendpoints’:
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_core.c:1588:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8180_93cx6.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8180_wx.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8180_rtl8225.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8180_rtl8225z2.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187_led.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8180_pm.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8180_dm.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_softmac.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_rx.o
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_rx.c: In function ‘ieee80211_network_init’:
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_rx.c:1046:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat]
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_tx.o
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_tx.c: In function ‘ieee80211_xmit’:
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_tx.c:426:28: warning: assignment makes integer from pointer without a cast [enabled by default]
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_wx.o
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_wx.c: In function ‘ieee80211_wx_set_gen_ie’:
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_wx.c:887:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat]
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_module.o
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_module.c: In function ‘store_debug_level’:
/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_module.c:271:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_softmac_wx.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_crypt.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_crypt_tkip.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_crypt_ccmp.o
  CC [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/../ieee80211/ieee80211_crypt_wep.o
  LD [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187l.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187l.mod.o
  LD [M]  /usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187/r8187l.ko
make[1]: Leaving directory `/usr/src/linux-source-3.2'


mint rtl8187L_linux_1041.0209.2012 # make install

kernel/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko: kernel/drivers/usb/core/usbcore.ko kernel/drivers/usb/usb-common.ko kernel/net/mac80211/mac80211.ko kernel/net/wireless/cfg80211.ko kernel/net/rfkill/rfkill.ko kernel/drivers/misc/eeprom/eeprom_93cx6.ko
kernel/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko: kernel/drivers/usb/core/usbcore.ko kernel/drivers/usb/usb-common.ko kernel/net/mac80211/mac80211.ko kernel/net/wireless/cfg80211.ko kernel/net/rfkill/rfkill.ko kernel/drivers/misc/eeprom/eeprom_93cx6.ko
make[1]: Entering directory `/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187'
make -C /lib/modules/3.2.9/build M=/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187 CC=gcc modules
make[2]: Entering directory `/usr/src/linux-source-3.2'
  Building modules, stage 2.
  MODPOST 1 modules
make[2]: Leaving directory `/usr/src/linux-source-3.2'
find /lib/modules/3.2.9 -name "r8187.ko" -exec ls -l {} \;
find /lib/modules/3.2.9 -name "r8187.ko" -exec rm {} \;
install -p -m 644 r8187l.ko /lib/modules/3.2.9/kernel/drivers/net/wireless
depmod -a
make[1]: Leaving directory `/usr/src/linux-source-3.2/drivers/net/wireless/rtl8187L_linux_1041.0209.2012/rtl8187'

mint rtl8187L_linux_1041.0209.2012 #
 
Old 05-26-2012, 01:11 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,837

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
the name of the module is r8187l.ko. installed into /lib/modules/3.2.9/kernel/drivers/net/wireless. can you find it?
 
Old 05-26-2012, 01:41 PM   #3
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
EDIT: Oops, searched for the wrong file. This might work. Will follow up soon.

Last edited by noah++; 05-26-2012 at 01:45 PM.
 
Old 05-26-2012, 01:46 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,837

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
the name of the module is r8187l.ko. NOT rtl8187l.ko. installed into /lib/modules/3.2.9/kernel/drivers/net/wireless. can you find it?
 
Old 05-26-2012, 01:50 PM   #5
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thanks, I discovered my mistake just as you were posting that.

I am able to modprobe r8187l, but it doesn't create any network interface when I do that. Only the old rtl8187 driver will do that. So how do I make r8187l work with my card? My Googling confirms that my card is an RTL8187L.
 
Old 05-26-2012, 01:55 PM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,837

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
it is really hard to say from here. Probably the old driver is still loaded before the new one. But it is only a tip. You should try to find some error messages.
 
Old 05-26-2012, 02:02 PM   #7
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hmm. I definitely removed the rtl8187 driver before I inserted the r8187l driver. That's confirmed by the fact that I had no wireless interfaces at all until inserted rtl8187 again. And I just grepped -R for 'r8187' in /var/log, and the only matching entries are in pm-suspend.log, and they aren't error messages. [shrug]
 
Old 05-26-2012, 02:15 PM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,837

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I think it means modprobe fails, module is not initialized at all.
 
Old 05-26-2012, 02:40 PM   #9
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Well, it is listed in lsmod when I modprobe it. It's only used by usbcore, though.
 
Old 05-26-2012, 02:46 PM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,837

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
have you tried ifconfig wlan up?
 
Old 05-26-2012, 02:54 PM   #11
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Once I have removed rtl8187 and inserted r8187l, there is no interface listed in iwconfig for me to 'up'. That is, my 'wlan0' interface is gone, and the remaining three listed still say "no wireless extensions".
 
Old 05-28-2012, 04:36 PM   #12
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Solution

I was able to force my card to use the r8187l driver I compiled. Well, it kept causing a kernel panic upon associating to a network. I guess the kernel knew what it was doing when it wouldn't load that driver automatically!

My solution was to grab the latest kernel driver from compat-wireless, patch it, and install it. For my distro, LMDE, this was how I did it. It seems to work pretty well.
 
Old 07-10-2012, 03:32 PM   #13
noah++
LQ Newbie
 
Registered: May 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
My card ran well for a little longer under compat-wireless drivers, but ultimately the same problem kept arising again. Those searching this thread for a fix should know I found a truly effective workaround, which I also describe here: Make a cron job that runs 'ifconfig wlan0 -promisc' every minute.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Realtek RTL8187L Wireless config and a strange RadioPower.sh DecioSP Slackware 10 02-14-2010 02:55 PM
Installing Drivers on Mandriva- Installed Kernel Source but not found. swilliams2006 Linux - Kernel 1 11-15-2006 02:51 AM
nvidia drivers not installing due to problems with the kernel source bcf2 Mandriva 1 01-16-2005 04:33 PM
Kernel Source Headers? (help needed installing modem drivers) Jakeyboy Linux - Hardware 8 10-07-2003 03:59 PM
Installing Network card drivers from source. BBlalock Linux - Newbie 4 06-23-2002 03:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration