[sf-lug] wifi on linux (notably laptops)

Akkana Peck akkana at shallowsky.com
Thu Feb 4 09:39:57 PST 2010

jim writes:
> i've noticed that they have different mental models, 
> some of which are better than mine. it's my mental 
> model that i want to improve. 
[ ... ]
>    using the wifi problem as an example, what are the 
> tools and files to use to diagnose problems of 
> installation and configuration? yes, i've looked and 

I'm sure every's debugging technique is a little different.
But I like to understand why things work, and I find that the
high-level tools like Network Manager get in the way of that.
They have so many layers (usually undocumented) that it either
works or it doesn't and you don't know why.

What I usually do is turn off all those higher layers and start
from a level that's easier to understand. For the wireless case,
ifconfig -a can tell you if the hardware is being seen at all.
(The usual hang-up there is not having a "firmware blob"
installed in the right place.)

Once that's established, programs like iwconfig and iwlist from
the wireless-tools package can tell you whether you're getting a
signal and what access points you're seeing. You can use iwconfig
commands to make sure you're bound to a specific access point (e.g.
iwconfig eth1 essid name-of-my-accesspoint).

With wireless this gets a little more complicated because not all
chipsets have Linux drivers that support the same calls. So for example,
with some cards you can't get a list of access points, and with some
cards you can't get signal strength. So don't be too shocked if you
try something that's documented to work and it doesn't.

I do the rest of the network configuration at a low level too,
using the /etc/network/interfaces file to specify which interface
I'm using and which access point and key to use, when appropriate.
Then I can use
  service networking start
and watch what gets written to the terminal.

I'm not saying this is better than using Network Manager --
but I find it a lot easier to wrap my head around what's going on
without those extra layers, and a lot easier to debug problems
when they arise.

When I change locations, I use a different /etc/network/interfaces
file with appropriate settings. I have a set of "network schemes"
and a script to switch them easily, described in
That page also has some sample /etc/network/interfaces entries
you can copy if you want to try this.


More information about the sf-lug mailing list