WiFi failure after initial success with ndiswrapper on Ubuntu 7.04
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.
WiFi failure after initial success with ndiswrapper on Ubuntu 7.04
Hello All.
My first post; I will attempt to be succinct.
Running Feisty with a DL-510 (Marvell chipset) wireless NIC. Installed ndiswrapper successfully and was able to connect to my Windows network and the Internet with relative ease, but only when using network manager in roaming mode, which would prompt me for WEP key (after I would deny “keyring” PW - don’t quite understand this). Anyway, when I booted the machine at a later time, my Internet connection was gone. My connection statistics showed all zeros (no IP, DNS etc.), but everything seemed to be working otherwise. I relocated machine to my workplace where we run unencrypted WiFi, but I’m experiencing the same thing. The only substantive change I have made since the problem began is to add ndiswrapper to the /etc/modules (startup?) file.
Some observations/questions:
1. The signal strength meter went from green bars to gray upon onset of this problem, but still indicates that I am connected to my AP/router at varying signal strengths. When I execute iwconfig, everything looks reasonable except for RX/TX stats etc.
2. If I attempt to configure the connection manually, I notice there is no option for an unprotected system, only two variations of WEP, hex and ASCII. How does one connect to a completely open system? Also, despite repeatedly unchecking my wired connection option (and suppressing from CLI as well), my wired connection option keeps reappearing with a check mark (prompting this question: what is the difference between blank checkbox and checkbox with minus sign?)
Any suggestions are appreciated. Note: I am a newbie in the extreme (about a week) so assume I know nothing when explaining (which is about right), especially regarding terminal commands.
Anyway, when I booted the machine at a later time, my Internet connection was gone.
Wireless in Linux is still pretty ugly, and for the most part you need to set it up every time you boot. This isn't quite as scary as it sounds, and is easily handled in a script. You might want to double check that ndiswrapper is loading at boot. If you open a console and run the command lsmod (which lists all the running kernel moduels), hopefully it is on the list. If it isn't you then load ndiswrapper (modprobe ndiswrapper), as long as you don't have errors, you'll probably see a wireless device in iwconfig that you can configure and use.
Quote:
If I attempt to configure the connection manually, I notice there is no option for an unprotected system, only two variations of WEP, hex and ASCII. How does one connect to a completely open system?
Pretty much all you have to do is set the SSID and then request an IP address. You ignore setting the WEP key.
If you post the outputs of iwconfig and ifconfig, it would probably help diagnose the problem.
I got it working, though I'm not quite sure why. The only thing I did was to uninstall network manager, which is reported to occasionally interfere with manual configurations (though I only attempted manual config when my NM managed connection quit working).
After uninstalling NM, I attempted to install WICD, a wireless utility I found on a related post, but the installation halted indicating a conflict with NM. I am still quite fuzzy on the Linux file system - where programs end up, conventions, etc. How do I ensure a complete uninstall?
I am posting my iwconfig and ifconfig in case there is something obvious to which I should be alerted:
iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11b ESSID:"default"
Mode:Managed Frequency:2.437 GHz Access Point: 00:0D:88:ED:58:B1
Bit Rate=6 Mb/s Sensitivity=-200 dBm
RTS thr=2346 B Fragment thr=2346 B
Power Managementff
Link Quality:37/100 Signal level:-72 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
jtg@JTG-LinuxDesktop:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:2C:03:AD:7D
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:15 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)
The only thing I did was to uninstall network manager,
Well, if my opinion counts, that was a very wise first step. Too many people rely on the various GUI monstrosities floating around out there, and as a consequence have no idea what is actually happening. Learning the console way will definitely make it easier to figure out a GUI later on.
Quote:
After uninstalling NM, I attempted to install WICD, a wireless utility I found on a related post, but the installation halted indicating a conflict with NM.
This might be some sort of Ubuntu thing. Usually it doesn't matter if you have multiple programs doing the same thing.
Quote:
I am still quite fuzzy on the Linux file system - where programs end up, conventions, etc. How do I ensure a complete uninstall?
This really depends on how you install it. If you used the Ubuntu installer, using the same program to uninstall should do the trick. If you're compiling from source, some of the kinder programmers will have a make uninstall, otherwise have a look at checkinstall, which is capable of producing Debian packages (.deb files) that you can install, and uninstall, as any other Debian package.
As for why you're online, I'm afraid I can't really help based on the description you've given. Ubuntu really shouldn't be automatically connecting to an SSID and requesting an IP address, however I suppose that somewhere in the boot scripts it is doing exactly that. Basically the procedure for connecting to an open access point is a two step:
1) Set the SSID iwconfig wlan0 essid "TheSSID"
2) Request an IP address: ifup wlan0
Thanks. I am definitely making a concerted effort to do things from the CLI, only using GUI tools when I'm completely stumped. The frustrating aspect for me is that for any given scenario, it seems there are an endless variety of commands and sequences with which to address the problem, often with no obvious hierarchy for what to try first. No doubt it'll get easier with time.
The frustrating aspect for me is that for any given scenario, it seems there are an endless variety of commands and sequences with which to address the problem, often with no obvious hierarchy for what to try first.
If you'd explain this in a bit more detail, maybe I can lift at least a little bit of the fog. At least with wireless, there aren't that many variations on what you need to do and the order to do it in. It is pretty much set the SSID, set the encryption key (but be aware that WEP and WPA are done differently) and then get an IP address. Using DHCP does become a touch confusing because there are several different DHCP clients in use, but once you've figured out which one your distro uses, it shouldn't change.
Go to the source-directory and run make distclean and make. As root, run make install. This should compile and install both the kernel module and the userspace utilities. If you don’t need USB support in ndiswrapper, with recent versions, you can compile with make DISABLE_USB=1 and install with make DISABLE_USB=1 install.
NOTE: Source-directory is for the ndiswrapper directory that you just created. (NOT the /usr/src directory)
I realize all of these accomplish the same thing, more or less, but to the uninitiated, variations like those above can be very confusing. Hell, just trying to understand the modprobe command had me scratching my head for half a day (the man pages are really arcane).
Anyway, my connection did fail again, so I attempted setting the essid from the CLI as you instructed, but it gave me an error. The machine is at work so I can’t be more specific until Monday.
As you've probably figured out by now, dpkg and apt-get are two different ways of installing pre-compiled Debian packages. The main difference is that apt-get will resolve, and install, any dependencies where I thin dpkg just installs the specific package.
The ndiswrapper instructions are for compiling from source code, and this is the method that I always recommend. Why? Because ndiswrapper is a kernel module and therefore must be compiled against the exact kernel you're using. Using pre-compiled packages runs the risk the ndiswrapper was compiled against a different kernel, in which case funky stuff can happen.
Quote:
Hell, just trying to understand the modprobe command had me scratching my head for half a day (the man pages are really arcane).
Yeah, man pages can be kind of brutal. Again, you've probably figured out that the modprobe command inserts and removes kernel modules from use by the kernel. However, with modprobe you really only need to understand two uses:
Installing a module: modprobe modulename (in this case modprobe ndiswrapper)
Removing a module: modprobe -r modulename (this just removes it from use, it doesn't delete it from the system)
Quote:
Anyway, my connection did fail again, so I attempted setting the essid from the CLI as you instructed, but it gave me an error.
Please post the error when you can. It will definitely help sort this out.
Yes, I was able to deduce most of what you pointed out. In fact, my instinct was to compile source code from the tar ball I downloaded from the ndiswrapper site. But I got really hosed up trying to understand to where I should extract the files and install. I extracted the tar ball to a directory in my home directory, but I was unclear about whether I should install to usr or etc, or whether those choices were made automatically for me. I found some good sites with file system overviews etc, but I remain somewhat confused. Ultimately, I went with the procedure from the Ubuntu Wiki on installing the *.deb packages and used an adjunct GUI called ndisgtk to help with the install (heresy, I know).
Anyway, below is my wireless link status, along with the error that results when I issue the iwconfig instructions you provided:
jtg@JTG-LinuxDesktop:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11b ESSID:"default"
Mode:Managed Frequency:2.437 GHz Access Point: 00:0D:88:ED:58:B1
Bit Rate=6 Mb/s Sensitivity=-200 dBm
RTS thr=2346 B Fragment thr=2346 B
Power Managementff
Link Quality:21/100 Signal level:-82 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
jtg@JTG-LinuxDesktop:~$ iwconfig wlan0 essid "default"
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; Operation not permitted.
Again, thanks for the help.
Quick Followup edit after posting above: When I issue ifconfig, I get same output as post dated 6-1 12.25pm indicating a connection to the network, and sure enough, my browser opens to my home page at present. This will not last, though.
Well, one big problem with that is you're not root. Messing with hardware almost always requires root privileges, so either su to root or set up sudo so you can run iwconfig with root privileges.
If you've been able to get a network connection, do stuff until it breaks, and then have a look in your log files (/var/log/syslog, /var/log/messages and the output of the dmesg command). I'm hoping that ndiswrapper is leaving a clue as to what is going on.
Quote:
But I got really hosed up trying to understand to where I should extract the files and install. I extracted the tar ball to a directory in my home directory, but I was unclear about whether I should install to usr or etc, or whether those choices were made automatically for me.
You can extract source code tarballs pretty much anywhere. Once you're done with the compile and install, the source code really isn't needed anymore. Some people hang onto it in case it has a make uninstall, but personally I've found making a package with checkinstall to be a much better way to go. Very few programs I've compiled have a make uninstall. As for the installation directory, almost all source code comes with a set of defaults that should work with pretty much any Linux distro. There are a few oddball distros like Slackware that put things in a slightly different place, but even then the defaults almost always work.
One more think to consider (sorry, I should have brought this up earlier)... Sometimes when you get random dropping, it isn't anything to do with the computer, it is external interference. A lot of cordless phones operate in the same frequency as 802.11 b/g, so if you have a 2.4 GHz phone (or someone nearby does) that could be a problem.
I've had that experience at home. Indeed, it became such a problem, I was forced to replace my 2.4GHz phones with 5.8GHz models. We must have a fairly robust Wifi at work though, because we build high power TWTAs (traveling wave tube amplifiers) which are microwave amplifiers capable of (in our case) power levels up to 2kW CW. We routinely radiate in S-Band (2.0-4.0 GHz) and I've never observed a jam. We also have 2.4GHz cordless phones peppered throughout the place. But with all that stated, the Linux machine is in fact located in a lab that is far away from the AP, and even though I've never observed a dropped connection on my laptop in there, the signal is rather weak, so that may well be a factor.
Thanks again for all your help; I'm sure I'll have more questions as I tinker this week.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.