Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Last week my wifi connection died all of a sudden. It just did, mysteriously, and it was something in my desktop machine. My wifi router still had a perfectly good connection, I could check it with my wifi PDA.
My wifi connection is started at boot with the following script:
If any expert sees anything wrong with it, please bear with me. I wrote it all by myself with the *very little* knowledge I have of networks. But it has worked fine for 5 months, until the problem struck for the first time.
The first problem I find is that I don't know how to kill wpa_supplicant and restart it. Once I kill it, it seems that only rebooting can make it work again. So I rebooted the machine a couple of times. But it didn't help. I booted into Windows and the wifi connection worked fine. The wifi card is OK.
So I booted into Slackware again, but this time I did not let the script run at boot. I typed the commands manually. It didn't work. After a few reboots, I saw that I could get a connection if I started everything manually and with wpa_supplicant in debug mode:
But after a couple more reboots, I finally made it all work, typing commands manually and running in daemon, no debug mode. I left it aside for a while...
Today, the problem is back. My connection just died all of a sudden while I was running nmapFE. This time, I have rebooted the machine at least 20 times, I have tried running the script and typing commands manually, I have tried running wpa_supplicant in debug mode, and nothing seems to work. Again, I can get a perfectly good connection if I boot into Windows. But nothing seems to make my wifi connection work correctly again on Slackware. Sometimes I can access the router and see or edit all the configurations. But I can't get a ping out to the Internet. I had to pull a cable all the way from the router to the desktop to get here.
I'll really appreciate if anyone can help me make wifi work again and/or improve my script or methods to get wifi network up and running.
Here is a little dmesg, in case it helps:
Code:
[4294710.629000] vmnet1: no IPv6 routers present
[4294710.652000] vmnet8: no IPv6 routers present
[4294750.212000] bridge-eth0: disabling the bridge
[4294750.215000] bridge-eth0: down
[4294920.870000] ndiswrapper version 1.34rc2 loaded (preempt=no,smp=no)
[4294921.011000] usb 1-4: reset high speed USB device using ehci_hcd and address 3
[4294921.153000] ndiswrapper: driver athfmwdl (,12/05/2003,1.00.001) loaded
[4294921.260000] usbcore: registered new driver ndiswrapper
[4294921.746000] usb 1-4: USB disconnect, address 3
[4294921.952000] usb 1-4: new high speed USB device using ehci_hcd and address 5
[4294922.067000] usb 1-4: configuration #1 chosen from 1 choice
[4294922.171000] usb 1-4: reset high speed USB device using ehci_hcd and address 5
[4294922.305000] ndiswrapper: driver net5523 (,10/04/2004,1.0.1.4) loaded
[4294922.971000] wlan0: ethernet device 00:03:2f:31:52:e3 using NDIS driver: net5523, version: 0x10000, NDIS version: 0x501, vendor: '', 0D8E:7801.F.conf
[4294922.971000] wlan0: encryption modes supported: WEP; TKIP with WPA; AES/CCMP with WPA
[4294923.034000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[4295169.899000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[4295376.623000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
(comment: here I give up on wifi and hook up an ethernet cable)
[4295494.041000] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[4295494.042000] bridge-eth0: enabling the bridge
[4295494.042000] bridge-eth0: up
[4295504.206000] eth0: no IPv6 routers present
[4297100.009000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[4297226.982000] ndiswrapper (miniport_reset:68): wlan0 is being reset
I'm confused as to why you're setting one IP address and then another, and I'm particularly confused about why you're setting the gateway to the first IP address. It should be pointing to your router.
And no offense intended, but I don't buy that this suddenly started on its own. Something must have changed. Did you update anything? Add anything? Stuff doesn't stop working for no reason, particularly on a distro as conservative as Slackware.
I don't quite understand those 4 lines either. All I know is that my connection didn't work without them. Yes, I really tried. 192.168.1.1 is my router. 192.168.1.2 is the desktop machine.
And no, I didn't change anything in the system. Like I said, I was running nmapFE scans, one after the other, when the connection suddenly halted. Slackware is very solid indeed, but wifi is not that solid in Linux, especially if managed by me. I am the first one to admit that I don't really know what I am doing when I configure my network.
OK, lets start running a few tests and see where things are going wrong. The first thing to do is to boot the computer and load ndiswrapper. Post any errors that get issued when you load ndiswrapper. Also check the output of lsmod to make sure ndiswrapper is actually loading. Then check iwconfig to make sure that you have a functional wireless device. If you're really feeling ambitious, you could upgrade your version of ndiswrapper. The one you've got is slightly out of date and it is an rc version, which in my experience is worth avoiding with ndsiwrapper.
Once you've done that, start up wpa_supplicant and re-check iwconfig. If wpa_supplicant is working, you should see that your SSID and key are set and that you've associated with the access point.
If things are still looking good, set the IP address and route. However, do NOT set the IP address to 192.168.1.1. Having two devices with the same IP address, even if for a short time, might be screwing things up. I also don't see that you've edited /etc/resolv.conf to include a DNS server. Have you done that?
It also might be useful to know what chipset your wireless card is running.
So basically, take it step-by-step and report back any place where it starts acting oddly or throws errors. The goal is to narrow down what is going wrong, because at the moment, there are lots of things that could be going wrong.
<edit>
One other question, what were you scanning with nmap? It might be a clue to what is happening or it might not.
</edit>
Hi. Excuse me for being absent this long. I had to take care of more urgent matters. I am back at this problem again.
I don't get any errors when I load ndiswrapper. The output of lsmod shows that ndiswrapper is loaded. Checking iwconfig, I have the wlan0 wireless device, but NO ACCESS POINT ASSOCIATION. There used to be association, before this problem came up, and my connection would work. Another thing I noticed is "ADDRCONF(NETDEV_UP): wlan0: link is not ready" in the output of dmesg. I often can get an access point association if I run wpa-supplicant in debug mode, but not if I run it in daemon and no debug mode. And when I get the association in debug mode, I can access the router and the configuration panel, but cannot reach the Internet.
I don't have time to upgrade my version of ndiswrapper right now. Besides, I remember that I tried the latest versions when I bought the router and they didn't work. They wouldn't load my wifi card's Windows drivers. I had to actually install an older version to make it work.
I can't really say I understand what you said about not setting the IP address to 192.168.1.1. I can assure you that I tweaked that a lot and confirmed that I could not have access to the Internet without those lines in my script.
My /etc/resolv.conf has been configured for years, since I first got ADSL. I haven't touched it in years.
Here is all the info I have on my wireless card:
Encore Electronics ENUWI-SG 802.11g, Wireless LAN USB Adapter
* Chipset: Atheros Communications Inc, AR5523
* usbid: 0d8e:7801
* Driver: Need to get the drivers from window$ instalation (athfmwdl.inf/.sys, net5523.inf,ar5523.bin/.sys)
About nmap, I ran a "SYN Stealth Scan" against my own IP with a program called nmapfe (Nmap Front End 4.11) when my connection died.
Checking iwconfig, I have the wlan0 wireless device, but NO ACCESS POINT ASSOCIATION. There used to be association, before this problem came up, and my connection would work.
You might want to post the iwconfig output, but my main question is the SSID set? You won't get an association without it.
Quote:
Another thing I noticed is "ADDRCONF(NETDEV_UP): wlan0: link is not ready" in the output of dmesg.
Hm. Is ndiswrapper complaining about anything in the logs?
Quote:
I don't have time to upgrade my version of ndiswrapper right now. Besides, I remember that I tried the latest versions when I bought the router and they didn't work. They wouldn't load my wifi card's Windows drivers. I had to actually install an older version to make it work.
Believe it or not, but that is pretty normal for ndiswrapper. There is frequently a hunt for a Windows driver and ndiswrapper version that work together. However, that was much more of a problem in the past. As ndiswrapper has matured, I've seen fewer and fewer cases where this is the answer.
Quote:
I can't really say I understand what you said about not setting the IP address to 192.168.1.1. I can assure you that I tweaked that a lot and confirmed that I could not have access to the Internet without those lines in my script.
I guess what I'm saying is that this could be masking a problem because there is absolutely no way you should have to do this. The ONLY thing this could be doing is confusing the router.
Quote:
My /etc/resolv.conf has been configured for years, since I first got ADSL. I haven't touched it in years
.
You might want to double check it then. ISPs do change the IP addresses of their DNS servers from time to time.
Quote:
About nmap, I ran a "SYN Stealth Scan" against my own IP with a program called nmapfe (Nmap Front End 4.11) when my connection died.
Which IP, your router? If so, you probably need to at least completely power down and re-boot it. It is possible that if your router is acting as a firewall, it decided you were attacking it and banned your IP address.
Hm. Is ndiswrapper complaining about anything in the logs?
No, it isnt.
Quote:
As ndiswrapper has matured, I've seen fewer and fewer cases where this is the answer.
Exactly what I was told at that time...
Quote:
You might want to double check /etc/resolv.conf then. ISPs do change the IP addresses of their DNS servers from time to time.
It is working right now. I am connected to the router with a cable.
Quote:
Which IP did you scan with nmap, your router? If so, you probably need to at least completely power down and re-boot it. It is possible that if your router is acting as a firewall, it decided you were attacking it and banned your IP address.
I scanned my external IP. And of course resetting the router was one of the first things I did... And I can use it with a cable...
What is clear to me is that wpa_supplicant and ndiswrapper are not communicating. I think at this point we need to distinguish between whether wpa_supplicant is causing the problem because it is borked, or if ndiswrapper is causing the problem because the driver won't communicate with wpa_supplicant. What I would do is to turn off all encryption at the router and see if you can get a wireless connection working. If so, then wpa_supplicant is the problem. If not, it's likely ndiswrapper.
Have you checked the environment for interference? Other cordless devices that operate on 2.4GHz can interfere, but a bigger problem would be a neighbor with a wireless network using the same channel/frequency, IP range and SSID. I've had that happen before and had to change my setup.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.