2007-06-23 trying to get wlan working under Kubuntu 7.04

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Revision as of 17:44, 29 June 2007 by Woozle (talk | contribs) (→‎Intro: links for ubuntu wifi docs)
Jump to navigation Jump to search

Intro

I've patchily updated these notes from things I learned on 2007-06-28 from reading the Ubuntu wifi troubleshooting wiki page (WifiDocs: WiFiTroubleshooting), which was suggested by the research bot (ubotu) on #kubuntu (@freenode) when someone helpfully typed "!wifi".

What Has to Happen for wifi to work

  • Wifi card must be initialized (how is this done?)
    • You can find out if it has been initialized properly by removing and reinserting the card, then checking the results of this command:
      • tail -f /var/log/messages
      • Good result: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
      • Ungood result: ADDRCONF(NETDEV_UP): eth0: link is not ready
    • If you get the ungood result, next check this file:
      • /etc/network/interfaces
      • Look for any hard-configured ESSID names; removing them made the card initialize properly for me.
  • Wifi card must be set to proper SSID
    • iwconfig dev essid accesspt
      • ...where dev is the wlan device name (e.g. wlan0) and accesspt is the access point's ESSID (name)
      • e.g. iwconfig wlan0 essid NETGEAR
  • Wifi card must have an IP address set; I always use DHCP even though Tenebram says DHCP is stupid and unreliable:

root@scooter:~# dhclient

There is already a pid file /var/run/dhclient.pid with pid 5362
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:18:39:bd:52:38
Sending on   LPF/eth0/00:18:39:bd:52:38
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 192.168.0.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.254
bound to 192.168.0.117 -- renewal in 17464 seconds.

Unanswered Questions

How can you tell from the command line whether or not the wireless is working, and if not why not? (Does iwconfig give enough info?) (This isn't a very clear question and I should probably rephrase it...)

Why does "iwconfig wlan essid NETGEAR" fail, and then cause input devices (kbd/mouse) to be all laggy (until you pull out the wireless card)? Probably because "wlan" isn't a device.

Why are there now two wireless devices (wifi0, wlan1)? Why is this different for different wireless cards? What do the names signify?

Why do both of the interfaces always show "test" as the SSID when the card has just been plugged in? (Did I set this somewhere?) (Possible answer: this may have gotten set in the /etc/network/interfaces file; check that if this happens again.)

What is the "wlan1:ava" device which sometimes appears in ifconfig?

"ifup eth0" says "interface eth0 already configured", but dhclient eth0 gets no returns (although KWirelessThingy on Ubuntu 6.10 is able to connect) -- what does it mean when this happens?

"iwlist eth0 scanning" reports lots of cells with good signals; what is necessary and sufficient for connecting to one of them? (Possible lead on this: try iwconfig dev ap MAC ID)

How can iwconfig report a good signal and yet dhclient can't fetch an IP address? (Is the card being initialized successfully?)

How can the following results from dhclient result in a working connection?? (They did.)

Listening on LPF/eth0/00:18:39:bd:52:38
Sending on   LPF/eth0/00:18:39:bd:52:38
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Are the various wireless/network utilities just wrappers on various CLI commands, or do they call libraries directly? What CLI commands or what libraries?

Are there any other relevant commands?

What does it take to "turn on" a wireless card so that at least it thinks it is connected (lights flashing in a connected-looking way)?

Different Cards

  • OLD Linksys: wifi0, wlan1
  • NEW Linksys: eth0
    • returns list of several cells
  • TRENDnet: wmaster0, wlan0
    • wmaster0 doesn't support scanning
    • wlan0 does return one cell

2007-06-28 working

What finally worked was to remove all the fixed ESSIDs from /etc/network/interfaces, reinsert the card, and then run dhclient.