Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Troubleshooting wireless connection failures?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
lele
Posts: 105
Joined: 2010-03-02 15:10

[SOLVED] Troubleshooting wireless connection failures?

#1 Post by lele »

Hello,

I can't connect to my hotel's wireless network reliably. I can connect to other networks reliably, both protected and free, therefore it can't be a configuration or card issue (and thus every troubleshooting article I've found didn't help). I'm using Gnome Network Manager, and I don't change any default setting at connection time besides typing the password. While connecting, Network Nanager applet shows two little balls which turn both green one after the other, but then the connection fails.

I'm running Debian 6.

Any hint on how to trace what's going wrong? Thank you.
Last edited by lele on 2012-01-12 15:22, edited 1 time in total.

lele
Posts: 105
Joined: 2010-03-02 15:10

Re: Troubleshooting wireless connection failures?

#2 Post by lele »

Now my Debian can't connect even to free wireless network I've connected to without any issue whatsoever during past days. Neither /var/log/messages nor dmesg give out any hint about what's going wrong.

I could try debugging NetworkManager by following instructions given here:

http://live.gnome.org/NetworkManager/Debugging

and sending a bug report to developers, but I don't think it's a NetworkManager bug, because I've installed Wicd Network Manager, and it can't connect either, showing this error message: "Connection failed: Unable to Get IP Address". I've tried enabling Wicd's debug mode, but it doesn't make Wicd give out more information.

Any idea? Thanks.

notthatguy
Posts: 199
Joined: 2011-12-13 12:48

Re: Troubleshooting wireless connection failures?

#3 Post by notthatguy »

Wireless is something that is actually very simple and easy to configure and troubleshoot but is so abstracted from users that they think it is voodoo and have no idea where to start.

So you start by stopping all those network tools and be sure they are stopped. If they truly aren't working then purging them might be best, assuming you have access to some kind of internet connection to continue troubleshooting.

The other important thing is to edit you /etc/network/interfaces file and remove any interface information in the file besides the info for the lo interface. It should look something like the following for now.

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
Once those network manager tools and resolvconf is stopped and (purged forever) disabled at the very least, reboot and be sure none of that crap is running.

Now then you then open a terminal and su to root. Then you use a few commands to see what is going on.

In general...
ifconfig to enable your wireless device
iwlist to list available wireless access points
iwconfig to configure your wireless connection
dhclient to get an IP address via dhcp

something like the following for an unsecured network
ifconfig wlan0 up to be sure the interface is up
iwlist wlan0 scan to scan for networks
iwconfig wlan0 essid mynetwork to set the network you want
dhclient -v wlan0 to request network information
ping -c 2 208.67.222.222 to see if you have a connection
ping -c 2 opendns.org to see if you have a name resolution

Hopefully after that you are good to go otherwise something went wrong so post the output of those commands and someone can likely help you figure it out.




Of course you usually want something automatic so editing your /etc/network/interfaces file is the key to having things done fairly automatic for you.

Something like the following is a good general interfaces file for the open unsecured hotspots.

Code: Select all

auto wlan0
iface wlan0 inet dhcp
wireless-essid any
Often all you need to do is boot your system and be good to go.



An example of an interfaces file for a WEP network

Code: Select all

auto wlan0
iface wlan0 inet dhcp
wireless-essid mynetwork
wireless-key HEXKEY


An example of an interfaces file for a WPA network - must have wpasupplicant installed

Code: Select all

auto wlan0
iface wlan0 inet dhcp
wpa-ssid mynetwork
wpa-psk password


networking command info
http://wirelessdefence.org/Contents/Lin ... mmands.htm

lele
Posts: 105
Joined: 2010-03-02 15:10

Re: Troubleshooting wireless connection failures?

#4 Post by lele »

Notthatguy, thank you very much for your detailed explanation. I followed the procedure you described (with minimal /etc/network/interfaces file). Currently I don't have access to a open wireless network, therefore I can't test what seems to be the simpler case. Here are the commands I have issued:
-------------------------------------------------
$ ifconfig wlan0 up
$ iwlist wlan0 scan

Code: Select all

wlan0     Scan completed :
          Cell 01 - Address: 06:72:CF:52:0A:FD
                    Protocol:802.11b/g
                    ESSID:"myhotel"
                    Mode:Managed
                    Channel:5
                    Quality:50/100  Signal level:-70 dBm  Noise level:-97 dBm
                    Encryption key:off
                    Bit Rates:18 Mb/s
$ iwconfig wlan0 essid myhotel key s:mykey
$ dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:25:d3:14:7f:cd
Sending on LPF/wlan0/00:25:d3:14:7f:cd
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
-------------------------------------------------

That's it. Any idea?

notthatguy
Posts: 199
Joined: 2011-12-13 12:48

Re: Troubleshooting wireless connection failures?

#5 Post by notthatguy »

open terminal, su to root, use the following commands....

iwconfig wlan0 essid myhotel

iwconfig wlan0 key off

dhclient -v wlan0


post back and let me know if you get
DHCPOFFER from .....
or
No DHCPOFFERS received.



If you get the latter then tell me about the network. Are you sure it is using dhcp? Do other computers connect fine? What type of encryption is it using? Is it using a hex key or password? So on and so forth...

lele
Posts: 105
Joined: 2010-03-02 15:10

Re: Troubleshooting wireless connection failures?

#6 Post by lele »

notthatguy wrote:open terminal, su to root, use the following commands....

iwconfig wlan0 essid myhotel
iwconfig wlan0 key off
dhclient -v wlan0

post back and let me know if you get
DHCPOFFER from .....
or
No DHCPOFFERS received.

If you get the latter then tell me about the network.
Done. I get "No DHCPOFFERS received."
notthatguy wrote:Are you sure it is using dhcp?
I don't know, however...
notthatguy wrote:Do other computers connect fine?
Yes, I've tried a KDE-based OpenSUSE LiveCD (kernel 3.1.0-1.2-default) which connects fine, and it uses "Automatic (DHCP) as its IPv4 Address Method.
notthatguy wrote:What type of encryption is it using?
KDE Network Management Settings says "WPA/WPA2 Personal", whilst iwlist scan gives:

IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
notthatguy wrote: Is it using a hex key or password?
A password, I think.

As soon as I have a wired connection or a free wireless access point for my Debian system, I'd try installing both KDE and a more recent kernel release.

Thank you very much for your help.

lele
Posts: 105
Joined: 2010-03-02 15:10

Re: Troubleshooting wireless connection failures?

#7 Post by lele »

Well, the hotel manager reconfigured the network and now I'm able to connect. Still, I can't connect reliably: Network Manager always connects, but the connection dies after a while; whilst Wicd sometimes connects, sometimes doesn't. I'll get myself acquainted with the wireless tools and try to devise a reliable connection procedure.

freedommachine
Posts: 8
Joined: 2015-09-01 16:35

Re: [SOLVED] Troubleshooting wireless connection failures?

#8 Post by freedommachine »

hye guys.. i attempt to follow all the steps given.. however.. i got the following output:

root@debian:~# iwconfig wlan0 essid 341AC6 key s:1444ECDC30
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; Invalid argument.

freedommachine
Posts: 8
Joined: 2015-09-01 16:35

Re: [SOLVED] Troubleshooting wireless connection failures?

#9 Post by freedommachine »

hye guys..

i got the following output:

root@debian:~# dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:11:24:c7:d6:6b
Sending on LPF/wlan0/00:11:24:c7:d6:6b
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: [SOLVED] Troubleshooting wireless connection failures?

#10 Post by Head_on_a_Stick »

@freedommachine -- if you have a WPA2 connection, you will have to associate with the access point first.

Try this instead:

Code: Select all

# wpa_supplicant -B -D nl80211,wext -i wlan0 -c <(wpa_passphrase "341AC6" "1444ECDC30")
# dhclient wlan0
This presumes that your access point is called "341AC6" (check by running `iwlist wlan0 scan|grep SSID`) and that your password is "1444ECDC30"

If you have any more problems, please open a new thread as this one is ancient.
deadbang

pidlas
Posts: 4
Joined: 2017-05-01 14:22

Re: [SOLVED] Troubleshooting wireless connection failures?

#11 Post by pidlas »

Hi Head-on-a-stick

Sorry for the late answer but no time during mid-week. Thanks for your answers. Thanks to you I learned I had to associate my wifi board with the wifi router first.

So could you please let me know if the password is the actual password or the coded one ? For example if the password in my wifi router (gateway to internet) is something like "this is not my real password", is it what is part of the wpa_supplicant command wpa_passphrases arguments?

Post Reply