LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-30-2007, 09:43 PM   #1
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Rep: Reputation: 0
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.

So much for brevity
 
Old 06-01-2007, 07:29 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Welcome to LQ!

Quote:
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.
 
Old 06-01-2007, 11:25 AM   #3
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the reply.

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)

wlan0 Link encap:Ethernet HWaddr 00:0F:3D:0C:3D:86
inet addr:192.168.0.107 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20f:3dff:fe0c:3d86/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:352 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150312 (146.7 KiB) TX bytes:4321 (4.2 KiB)
Interrupt:11 Memory:e7010000-e7020000

I don't have a warm and fuzzy about any of this, so I appreciate the help and am certain I will be back when my connection fails again. Thanks much.
 
Old 06-01-2007, 12:27 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
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
 
Old 06-01-2007, 01:21 PM   #5
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 06-02-2007, 07:00 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
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.
 
Old 06-03-2007, 12:33 AM   #7
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I guess I was speaking generically, but as an example, I found several different instructions for installing ndsiwrapper.

From the Ubuntu Wiki:


· sudo dpkg -i ndiswrapper-common_*.deb
· sudo dpkg -i ndiswrapper-utils*.deb


From the ndiswrapper site:

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)

And from yet another Wiki:

sudo apt-get install ndiswrapper-utils-1.8
sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf
sudo ndiswrapper -l
sudo modprobe ndiswrapper

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.

Thanks for the continued input.
 
Old 06-03-2007, 08:27 AM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 06-04-2007, 09:53 AM   #9
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
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.

Last edited by gatsis; 06-04-2007 at 10:11 AM.
 
Old 06-04-2007, 12:17 PM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
jtg@JTG-LinuxDesktop:~$ iwconfig wlan0 essid "default"
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.
 
Old 06-04-2007, 01:51 PM   #11
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
"Duh" on root privileges; I should have realized that requirement.

Also, your explanation of the source code install was helpful. I will study checkinstall as well.

I am typing this on my Linux machine, so obviously my connection is holding up. I will do as you suggested and then study the logs.

No doubt I will be back.

Thanks again.
 
Old 06-04-2007, 04:18 PM   #12
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 06-04-2007, 08:58 PM   #13
gatsis
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
  


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
Success after Failure -- My Story briandonohue111 LinuxQuestions.org Member Success Stories 2 09-02-2006 01:00 PM
Debian 3.1 dhcp success then failure shuuhen Debian 9 07-09-2005 07:32 PM
eMachines M5310: Success and failure QuatMosk Linux - Laptop and Netbook 0 12-29-2004 02:27 PM
M$ .Net - Success or Failure X11 General 15 05-28-2002 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:43 PM.

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