Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Ndiswrapper has installed the Windows driver in the /etc/ndiswrapper/drivername directory. The ndiswrapper module loads at boot.
When I type:
"iwlist wlan0 scan"
The machine says the wlan0 interface doesn't support scanning. Why is this?
But when I type "iwlist scan | less" I do get a listing.
What is this listing? I think it is a list of APs whether I am connected to them or not. Is this true? What does the output mean? I need to know to correct whatever problems I have.
Thanks in advance for all your time and attention.
Last edited by saturndude; 03-05-2007 at 12:49 AM.
Look at the output of "lsmod" and make sure "ndiswrapper" is listed. I'm betting that it is. Make sure you ran "ndiswrapper -m" to write your modprobe.conf alias.
( It may create a /etc/modprobe.d/ndiswrapper file instead for more recent versions. )
iwlist scan will try to scan on all devices. Which device did it say performed the scan?
Someone in another thread (Mandriva 2006, or other "close" Mandriva version) suggested (to somebody) to put stuff in /etc/modules.preload, so that is what I did, and it works. I don't have any /etc/modprobe.d directory.
Yes, I did the "ndiswrapper -m".
I'm not sure about using iwlist. It seems like a way to list a config, but iwconfig (by itself) can do that too, correct? I'll have to study the commands more.
The stuff that follows "lo", "ath0" and "eth0" is supposed to be on the same line, but I couldn't get the formatting correct.
When I type "iwconfig ath0 ap router-mac-address" (entered as 00:13:46: and so forth) to force an association with the router, then type "iwconfig ath0" to list the new configuration, all zeros are listed (just as before). More evidence that it's not working.
I removed the encryption today to make it easier. I'll turn it back on (for security) after it is working.
I did NOT INSTALL the card until after the Mandriva system was installed. IIRC, Mandriva inserted the "alias ath0 ath_pci" line, probably the first time I booted after inserting the PCI card.
Also, when I shut down, I see some errors (some surrounding lines also shown):
Stopping portmap services:
Shutting down interface eth0:
Shutting down interface ath0: ndiswrapper (NdisAllocateMemory:239): Windows driver allocating too big a block at DISPATCH_LEVEL: 156816
Shutting down loopback interface:
Any thoughts? I noticed madwifi kernels on the Mandriva 2006 DVD. I'm a home user, behind a router, with no special security needs. Also, I haven't built a kernel in years (it's a big process). Would a madwifi solution be a reasonably easy way to use the D-link? Another idea is to stick with ndiswrapper, but use the D-link in Windows and a CompUSA PCI wireless card for Mandriva (Realtek 8185, I've tried it before, it might work)?
I'd like to see if I can get the D-link to work first however.
Please let me know any thoughts you have.
Thanks in advance,
Last edited by saturndude; 03-05-2007 at 08:27 PM.
When I type "iwlist ath0 scan" I get the following:
ath0 Scan completed :
Cell 01 - Address: 00:13:46:[snip the rest]
Frequency:2.437 GHz (Channel 6)
Quality:0/100 Signal level:-51 dBm Noise level:-256 dBm
Bit Rate:1 Mb/s
Bit Rate:2 Mb/s
Bit Rate:5.5 Mb/s
Bit Rate:6 Mb/s
Bit Rate:9 Mb/s
Bit Rate:11 Mb/s
Bit Rate:12 Mb/s
Bit Rate:18 Mb/s
Bit Rate:24 Mb/s
Bit Rate:36 Mb/s
Bit Rate:48 Mb/s
Bit Rate:54 Mb/s
(Unknown Wireless Token 0x8C05)
My router's MAC address is listed. Does the PC listen and pick up my router's MAC address, or is this because I typed it in in a previous post ("iwconfig ath0 ap router-mac-address")?
In an earlier post, I mentioned that I disabled encryption (for now). When I type "iwconfig | less", the key is still listed. How do I remove it?
It looks like you have two drivers for your wireless. Look at the "lsmod" listing. Is one of them ath_pci?
You might try shutting down wlan0, removing the ndiswrapper module, and commenting out the /etc/modprobe.conf entry with ndiswrapper.
See if you can configure wireless with the atheros driver (ath0). Also do a google search. I'm not familiar with this driver. Some don't have full interfaces for wireless tools and you need to use something else. But since iwlist worked with it, it may be OK, and you simply need to configure wpa or wep encryption to match the router, so that the router gives you an IP address via DHCP.
( However, I don't like the look of "unknown token". It does say that your router is in managed mode. That means either wep or wpa. )
You say I should try the ath0 driver? Well, a year ago I had linux working wirelessly (same equipment, same computer) with the ndiswrapper (and a windows driver) on an old 20 Gig hard drive. The connection dropped randomly, so I went back to wired but kept the setup. I flashed the router's firmware a week ago. I am using the old drive right now to type this, and with the new router firmware, the connection is ROCK SOLID. I am trying to look at this configuration, and seeing how it differs from my current drive (160 GB) drive, in hopes that I can make the 160 GB work.
First of all, I see that the "ifup" and "ifdown" files in /etc/sysconfig/network-scripts have old dates (2002 to 2005, before I bought Mandriva 06). Those old files work "out of the box" on my 20 GB drive, so I'm smart enough to leave them alone.
Earlier, when I inserted inserted the PCI card and booted (with the "bad" 160 GB), the module ath_pci was loaded. You are entirely correct, this is a problem. After I removed the card and rebooted a couple of times, I reinserted the card. It is not listed in lsmod anymore. I can always put ndiswrapper in /etc/modules.preload and BLACKLIST the ath_pci module.
My old 20 GB drive (the one that works) has a text file here:
and one line of that config file is "WIRELESS_MODE=Managed".
So I think managed mode can work. There are other files in the wireless.d directory (from other attempts at wireless), but "Mikes-Network" is the ESSID of the router. Also, the file "Mikes-Network" has a date stamp of today, about one hour ago, when I booted with the 20 GB to start writing this.
My "new" 160 GB drive (wireless doesn't work) has an interesting problem, and I think it goes to the heart of the matter. When I type 'iwconfig' by itself, all of the information is listed beside "ath0" and not "wlan0". The ESSID is listed correctly. The channel used by the card is incorrect and cannot be changed by typing "iwconfig ath0 Channel 6" at the command line. The MAC address is all zeros, so it doesn't see the router (of course it doesn't, the card is on the wrong channel!). If you use "iwconfig ap 00:13:46 etc.", then type "iwconfig" by itself, the MAC address is not changed.
If I can make the computer associate all the wireless info with the "wlan0" interface instead of "ath0", any config script that expects hardware to appear at wlan0 will automatically be fixed. Any idea how to change this?
Also, when I go into Mandriva Control Center and input "2.437 GHz" as the frequency to use, this is not reflected in /etc/sysconfig/network-scripts/wireless.d/Mikes-Network.
So clearly something is not right here.
I see "alias wlan0 ndiswrapper" as the last line of the file /etc/modprobe.conf on the 20 GB drive, so I made sure that was the last line of the file on the 160 GB as well.
How do I make the machine see "wlan0" instead of "ath0"?
Thanks in advance for all your help,
Last edited by saturndude; 03-06-2007 at 09:16 PM.
I think you are close but you have dueling drivers.
Look at the output of "sudo /sbin/lspci -v" and do some searching on Google based on the device listed. Double check on what drivers can be used. If you used ndiswrapper before and it worked, you could blacklist the other one. You don't want both drivers (kernel modules) however.
I suggested using the other because it is the one that seems to be working.
It would be easy to comment out the ndiswrapper lines from /etc/modprobe.conf. (and the preload list) For insurance, backup the modprobe.conf file. Also check in /etc/modprobe.d/ndiswrapper if it exists as well as /etc/modprob.conf.local if it exists as well. ( Maybe not, but I am trying to cover the bases )
You can also add the line "blacklist ndiswrapper". If it doesn't work you can restore your old files from backup. Then blacklist the atheros driver if you want to use ndiswrapper and comment out the line that looks like
install ath0 /bin/true
if it exists.
Did you perform a fresh install in the process of adding a new drive. If it is the same version of Mandriva, you could use the old one as a model. If it is a new version of Mandriva, or a different kernel, it may have added native support for the device. Examine both modprobe.conf files and compare the differences.
Are you certain which drive you are using as the root device. Is it possible that you are still booting to the old partition.
Another thought is that with changing modprobe.conf, this is one case where you may want to reboot after making changes. Trying to remove a live module (i.e. ndiswrapper if wlan0 is up) can lock up your machine. Also, you will be verifying which modules will load when you reboot.
Using the old drive as a model for the new one is exactly what I was doing. Sorry I couldn't make it work.
I ended up reinstalling. I saved a master list of RPMs on a floppy, so you can "replay" the installation. Mandriva could not read my floppy, but I did not learn this until after I 'blew away' the old install. I had a floppy of the install from my old 20 Gig drive, so I used that "replay disk" and tweaked it to my taste (added a few packages, deleted a few).
I made SEVERAL "replay install" disks this time, believe me! I'll troubleshoot my floppy drive unit in a day or two.
Now that I have my "replay disks" matched to the retail DVD, I am free to get security updates, the latest OpenOffice, stuff that wasn't on the 2006 Retail DVD. (and reset the KDE "look and feel" items, and other things.)
I used Partition Magic 8.01 to back up my /home directory before reinstalling (always on a separate partition, so PM can preserve it, in case of exactly this type of emergency). There will be a few issues as I copy things back (pointing Thunderbird to my pre-existing mail messages and so forth), but all should go well.
The wireless works just splendidly. When using iwconfig, all the "stuff" is listed for wlan0. The old 160 GB listed wireless info for ath0. Wlan0 wasn't even detected by iwconfig, and it wasn't mentioned in the startup items that scroll up the screen. Now, everything is like the old 20 GB. Perfect!
Sorry it had to come to a reinstall. I can't know the inner workings of everything. And I guess the install routines can still do things I cannot. Part of being "nimble" and versatile is being able to recover from a disaster quickly (while losing essentially nothing).
It turns out that I MIGHT have been able to boot from the retail DVD and repair things, but I didn't do too badly.
Thanks for trying.
Last edited by saturndude; 03-07-2007 at 08:28 PM.