Realtek 8185L Based Wireless Card Problems

Tags:

Well, after lots of messing-with, i finally got my RTL8185L chipset-based wireless network card to work on my debian machine using ndiswrapper. After it worked for the first time i added some commands so it would work when i start the machine and restarted it, but since then i cant get it to work again. It is fully recognized by everything and i can set all the configs right, but it cant manage to register on dhcp (which is on my router), although it DID manage to the first time and nothing has changed since then. The few commands i use to try and start it and which started it the first time are:

ifconfig wlan0 up
iwconfig wlan0 key s:mypass
iwconfig wlan0 essid myssid
dhclient wlan0

And it just outputs the sort of this:

Listening on LPF/wlan0/*macaddress*
Sending on LPF/wlan0/*macaddress*
Sending on Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
Trying recorded lease 192.168.0.104 # <-- that was its ip the first time when it worked
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

No working leases in persistent database - sleeping.

I did notice that every time i try to run dhclient dmesg gets about three or four new lines of:
ndiswrapper (mp_reset:62): wlan0 is being reset

Anyways i tried about what i can think of but i really cant think how it could change if i havent changed anything...
Anyone got any idea of things i can check for, or maybe has anyone seen this problem before and know it? Help please.

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Realtek 8185L Based Wireless

Try putting the information into /etc/network/interfaces instead. For example:

auto wlan0
iface wlan inet dhcp
wireless-essid blahblah
wireless-mode AP
wireless-key s:TheWEPpassword
wireless-keymode whatever

Of course it's better to be running WPA-PSK if your access point supports it. In that case you need to install wpasupplicant and read its documentation.

Realtek 8185L Based Wireless

Nope, didnt do the trick. I just tried upgrading my dhcp3client and wireless-tools packages to those in the testing because i used the ndiswrapper package from the testing section and my kernel is the one being tested - 2.6.21, but nothing changes anything.
I might think about security once it works, but for now - please, does anyone have any more ideas?

Oh right, and one of the pieces of code i posted was cut off by a mysterious #, so afetr the "trying recorded lease" thing there was:
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

No working leases in persistent database - sleeping.

The lease it tries to use is the one that worked that one time...
I also tried using iwlist scan and I get:
wlan0 No scan results

Realtek 8185L Based Wireless

From what you've posted so far, I see no evidence that the radio is not working. Are you sure you can get a signal where you are? After all, iwlist is telling you it can't see anything.

Can you go through the detail on how the card is activated after boot?

Realtek 8185L Based Wireless

Yes i can definetly get a signal, its not a laptop and its sitting only few meters away from the router inside a building, plus i havent moved it at all since it worked...
What do you mean how the card is activated after boot? right now its not automated because im trying to get it to work first, so i just do:
modprobe ndiswrapper
And the light on the card goes on and dmesg shows it is fully recognized. tell me what information about it you need and ill write it.

Realtek 8185L Based Wireless

There's not much else I can suggest (without sitting next to the machine and checking it myself).

1. Check the router configurations again, then reboot the router and check that everything is as you expect it.

Things to check:
a. DHCP settings: the router should be dispatching addresses via DHCP (usually the default anyway)
b. Wireless settings: WiFi must be ON, and no restrictions on the MAC of people connecting. Check the security mode (off, WEP, or WPA-PSK), security phrases or keys, ESSID, and the CHANNEL used.

2. Reset your card:
rmmod ndiswrapper
modprobe ndiswrapper

3. Set card parameters manually, including:
ESSID
CHANNEL
MODE (AP)
security settings

Check if you can at least see the AP when you run iwlist.
As long as iwlist says it can't see anything, you won't be able to connect.

There is an option for you to test your card independent of the router/access point if you have another device around which has wireless. Set up the card for "Ad Hoc" mode and "open" (no security), and use the other computer to scan and see if it can spot your card and communicate with it. If the other computer can't spot your card then there might be something else wrong on your computer - but I can't imagine what it could be because everything you've posted so far indicates that your card is working.

Hmm... there is 1 more thing to check - make sure your IPv6 modules are not loaded.

Realtek 8185L Based Wireless

Well, yes, the ipv6 module was loaded so i blacklisted it and its not loaded now... I re-entered my options and everything but its still a no go. iwlist still cant find anything.
I also tried to set it to Ad-Hoc mode, but when i check it using iwconfig i still get Mode:Auto ... So i still tried searching for it with my Nintendo DS but it didnt find it (no other wireless device to use).
Only thing i can think of right now is that the driver is bad.. Btw it wasnt on their supported drivers list but the chipset was there many times with different cards. I can start trying to compile the linux driver but i got many problems doing that before because some of the kernel api it uses has changed since version 2.6.20 and its giving me lots of problems. Anyone got a precompiled package of the rtl8185, rtl-wifi or rtl818x drivers compiled under kernel 2.6.21 (testing one)? :-\

Realtek 8185L Based Wireless

How did you try to set 'Ad Hoc'? Maybe you made a mistake in typing the command? With some buggy wireless drivers in the past, I have noticed a few things such as:
1. all parameters must be passed via iwconfig in one command - using multiple commands repeatedly resets the parameters.
2. after loading the driver, the order in which parameters were set was very important; after certain parameters were set, others could no longer be changed

Since your gizmo did connect once before, I think it might be a matter of remembering exactly how you got it to work the first time around.

Other people have reported success with that chipset and ndiswrapper (although I forgot to note the exact kernel versions they had).

I think it was 2.6.22 where the IEEE802.11 stack was entirely replaced (for the second time in about 3 years), but the latest stack is a very good one, so hopefully it doesn't get replaced again. Is your problem due to the change of 802.11 stack, or is it a problem with a change to the old stack?

Realtek 8185L Based Wireless

Well, checking the iwconfig man page i figured setting it to Ad Hoc would be:
iwconfig wlan0 mode Ad-Hoc
but executing it still leaves mode as Auto if i check it using iwconfig, though it gives no errors.

Going way back into my bash history i can see that the commands i used to set it up the first time are simply:
modprobe ndiswrapper
ifconfig wlan0 up
iwconfig wlan0 key s:mykey
iwconfig wlan0 essid myssid
dhclient wlan0
And then it worked, but they dont do the trick now...

I tried removing the driver from ndiswrapper and installing it again, but it didnt help at all.

I'm not REALLY sure what my problems are with compiling the drivers, but i think there was some problems with the stack, and also with some part of the kernel called mac80211 (which might be some sort of stack i dont remember nor understand very much of it), and also something with part of the kernel API called INIT_WORK which was changed from taking 3 arguments to just 2 so i need to go over the code and change that and i dont know if it affects the rest of the code...

I really don't want to change my kernel (and if i would i would revert to the stable 2.6.18) because i spent much time specially compiling all sorts of modules for this kernel so that my old hardware would work good and it took a lot of digging into the net to find that stuff.

Realtek 8185L Based Wireless

Where did you get the driver source code from? I can have a quick look and see what's going on. I'm building an embedded gizmo with 2.6.21 so I have all the source for it.

Realtek 8185L Based Wireless

Umm i got the first one i got from the card's installation cd, but i saw it for download on realtek's site:
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=1&Level=6&Conn=5&ProdID=35&DownTypeID=3&GetDown=false&Downloads=true
(first one)

Later i tried a few drivers from sourceforge. The one i remember and that im trying again is rtl-wifi:
http://sourceforge.net/projects/rtl-wifi

Realtek 8185L Based Wireless

Did you follow the instructions at:
http://rtl-wifi.sourceforge.net/wiki/Installing

on how to install? Note the bits about the new kernel (whatever that means) having an incompatible IEE80211 stack. So presumably the driver includes a branch of the iee80211 driver as well.

But before you do too much, have a look in your directories to see what 80211 stuff you already have:

find /lib/modules/$(uname -r) -name "*80211*"

If your gizmo worked before, it should work again without you installing new drivers or anything.

Another possibility is that you forgot to load the ieee80211 stuff first, in which case:

rmmod ndiswrapper
(make sure it did unload)

modprobe ieee80211_crypt
modprobe ieee80211_crypt_wep
modprobe ieee80211

modprobe ndiswrapper

I'm assuming that those are the ieee80211 modules that worked the first time around - if you installed different ones, then unload these and make sure the ones you installed are loaded instead.

If you get your card to work with this, then the next step is setting up some configuration files so that these modules are always loaded (and in the correct order) when you load the ndiswrapper.

Realtek 8185L Based Wireless

Yes, i did try to follow this manual, but when it said to unload the ieee80211 module and i saw it wasn't loaded i didnt think of trying to load it...
Anyways it didnt work, still the same.

I am now trying to compile the rtl-wifi source and am writing as i do it:
After moving my ieee80211 folder so that the kernel wont load it, i typed 'make', had the ieee80211 part compiled with no probs, but on the rtl8187-newstack (which i actually dont need, because since im using the 8185l chipset i need the 818x-newstack part instead) i got an error on the r8180_core.o file which says that net/mac80211.h does not exist.
I figured that its related to the mac80211 module which is now included with the 2.6.22 kernel, but not with 2.6.21, so i found its source, but the problem with this is that i have to patch the kernel then compile it completely, something which i dont have enough space for (the system is on a four gig drive), so i turned to a precompiled mac80211 module package for kernel 2.6.21 from the fedora repositrories, which i turned into a .deb package using alien. Later installed the mac80211 devel package the same way.

*Back to make* New error:.. Wait, header files werent in the right place. Probably cuz of differences between debian and fedora core. Copied them over. Another error - same things, different files. Copied.
SURPRISE! Another one. This time its a harder one:

rtl818x-newstack/r8180_core.c: In function 'proc_get_stats_tx':
rtl818x-newstack/r8180_core.c:390: error: dereferencing pointer to incomplete type

Then this error comes, much like all the other errors, again and again and again in different lines of the code until it breaks...
So.. Any ideas?

Realtek 8185L Based Wireless

I'd suggest using an older version from the svn archive; 2.6.22 has an entirely different IEEE80211 stack, so you don't want to mess with that. There are instructions on the site on how to retrieve different 'tags'. I just wish they'd taken a little time to put tags and explain major changes.

Realtek 8185L Based Wireless

Wow. Im just about to kill myself.
What happened is i went through the revisions of rtl-wifi and found that it was on revision 58 that they patched everything to be compatible with 2.6.22, so i got revision 57 and it compiled with no errors, then i loaded all of the ieee80211 stack modules it made, and when i loaded the actual device driver the machine crashed, so i restarted it and loaded the stack modules and the ndiswrapper module, then used iwlist scan and it FOUND MY NETWORK, so i configured it and ran dhclient AND IT CONNECTED AND WORKED!!
So i thought "FINALLY", set it up to run when the system starts and typed reboot.

Since then it hasnt worked again. I tried to recompile everything, use the rtl-wifi device driver (which doesnt crash when loaded if ndiswrapper is not loaded...) and basically everything. IT DOESNT WORK AGAIN. I used the exact same commands i used when it worked, but it simply refuses to do so.

Please - does this make you think of anything new i can try with this little piece of s**t?

Realtek 8185L Based Wireless

The fact that it sometimes works suggests that drivers are loaded in the wrong order or another driver is loading and interfering. All I can suggest is that you post the output of 'lsmod' so we can check if modules are being associated correctly. Did you go back to just the original ieee80211 stuff plus the WinDos driver and ndiswrapper?

Also, how did you go about installing ndiswrapper? Did you use the source, tools, etc from the Debian repository?

Realtek 8185L Based Wireless

Just caught your new reply ^^.
Anyways - good news! I think its working for good now. This morning i woke up with a feeling that im getting it right this time, and i tried to load the new ieee80211 modules like before, only without the tkip one (since i only use simple wep encryption) and it worked, and kept on working after a reboot and another one :), although the first time it worked with these modules it DID work with the tkip one loaded.

So now im having troubles making it go online at startup. I basically just made a script with the sequence of commands (3 insmod's, modprobe, 2 iwconfig's and dhclient), but it didnt work and i figured its probably not waiting for each one to finish before it starts the next one (because commands like modprobe ndiswrapper take a few seconds to complete). So i seperated the commands in the script with &&'s, but now im probably getting some different error though i cant see it due to technical reasons. Plus i know its not the best way to do this.

How would you make these modules load and connection configured and dhcp'd at startup?

Realtek 8185L Based Wireless

It's good you've got it working - there really wasn't a need to load the tkip modules since you're not using tkip.

You can put a "pre-up" line in /etc/network/interfaces, but that may not be necessary (I only ever needed this once, to work around a buggy driver).

Anyway, to load modules at boot, put the name in the order you want into /etc/modules. For example:
ieee80211_wep
ieee80211
ndiswrapper

Which iwconfig parameters are you setting? These parameters can be controlled from the /etc/network/interfaces file - for example:

auto eth1
iface eth1 inet dhcp
wireless-essid blah
wireless-key s:blahblah
wireless-mode Ad-Hoc

Realtek 8185L Based Wireless

Nope, weirdly when loading the modules and configuring the connection like you said its back to where it was yesterday - iwlist not being able to find my network and dhclient not being able to connect...

I really hope im not doomed to do this manually every time this machine starts.

EDIT: Well, back to nothing... Cant get it to work any way i try *sniff*. This is really pissing me off and im on my way to throw this machine off the roof if this keeps on like this..

EDIT #2: Ok, this is weird, but apparently when i either modprobe the ieee80211 modules after i copy them to the appropriate /lib/modules/whatever directory it doesnt work, but when i go manual, cd into the rtl-wifi directory and then insmod the modules with their short locations everything works fine... So.. How can i get the automatic scripts to cd into the directory and insmod from there? Can i just use cd inside a bash script file and it will be as if the commands are run from that directory?

Realtek 8185L Based Wireless

I am having the EXACT same problem that you were having. It appears that ndiswrapper installed the WIN98 driver successfully but it is not working at all because I cannot see any networks and I cannot manually connect to any network. Scanning results in "scan complete. no networks found".

I read from your post that you got it working using an old version of rtl-wifi at sourceforge. I tried using an old revision (like 57 I think you said) but I ended up in the same situation - the card appeared to be installed but I could not see any networks or get connected to anything. How did you end up getting rtl-wifi to work?

Thanks!

Syndicate content