LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable to connect to wifi network with network manager. Poss authorization issue (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-connect-to-wifi-network-with-network-manager-poss-authorization-issue-685130/)

openSauce 11-21-2008 05:10 AM

Unable to connect to wifi network with network manager. Poss authorization issue
 
Hi,

I'm unable to connect to a particular home wireless network under Fedora 9, although I can connect to it using WinXP on the same machine. My Fedora installation is able to connect to my college's unsecured wireless network, so it's not a driver issue I think.

It seems to be an authorisation issue, as I'll describe below, but there's one other thing that's bothering me. The SSID for the network I have problems with is for some reason not listed in Network Manager's drop-down list, nor is it in the output of iwlist wlan0 scan. But I'm pretty sure it's not a "hidden" network - I don't know exactly how those work, but I helped the owner of the wifi network in setting it up, and don't remember doing anything that would make it hidden. As far as I can remember, Windows found the network automatically without having to be told the SSID. What's the best way to confirm whether it's a hidden network or not?

Anyway, I try to connect by selecting connect to other wireless network in Network Manager, and entering the SSID. As far as I can tell from the error messages below, the machine does contact the network and attempt to connect, but I'm not authorising myself properly. That may be a completely wrong diagnosis, but hopefully someone can see from the below info whether it's correct or not.

I'm not sure which option to use for "Wireless Security": at the time we set up the network, it gave us a Hex WEP key of 26 characters, which is 104 bits. But none of the options in Network Manager's list match that. Here are the options it has, and the error message I get with each one:
  1. None - if I select this, it fails to connect, with no error message.
  2. WEP 128-bit passphrase - if I select this and attempt to use my 26-character WEP key, it brings up a new dialog, saying "Passwords or encryption keys are required to access the wireless network [SSID]." It has a drop-down box labelled "Wireless Security", but this time the only option is "None", and the connect button is disabled, I can only click cancel.
  3. WEP 40/128-bit hex - as above.
  4. WEP 40/128-bit ASCII - The connect button is disabled when I try to use the WEP key, as the string is too long. Despite the fact that it says 40/128-bit, it actually accepts 5 and 13-character strings (40 or 104-bit). Since I've got a 104-bit hex key, I tried converting it to ASCII, but it consists of mostly unprintable characters, so I'm not sure there's any way to actually enter it into the textfield. I might have done something wrong here, so I've put my code below to see if anyone can point out a mistake.
  5. LEAP - requires a username, not applicable here I think. Windows doesn't need one, and we don't have one from when we set the network up.
  6. Dynamic WEP (802.1x) - requires username, private key and various other things, all N/A
  7. WPA & WPA2 Personal - Brings up a dialog with the same text as for "128-bit passphrase", but this time "WPA & WPA2 Personal" is the only option in the drop-down list, instead of "None". It asks for a password, so I just enter the hex key again - now it asks for the password for the Gnome Default Keyring, which I don't think I've ever set up. Don't know if I can go any further with that, but my understanding is that since we were given a WEP key when we set up the network, WPA will be N/A.
  8. WPA & WPA2 Enterprise - as Dynamic WEP. N/A.

Hopefully that's enough info that someone can help diagnose the problem. Some of the behaviour of Network Manager described above doesn't make sense to me, and I'm wondering if it's buggy.

Just to make sure I did the Hex to ASCII conversion right, here's my python code:
Code:

# keyhex is a string containing the WEP key
>>> keybytes = []
>>> for i in range(0, len(keyhex)-1):
...    keybytes.append(eval("0x" + keyhex[i] + keyhex[i+1]))
...    i = i+1
...
>>> map(chr, keybytes)
# output of the above is mostly just escaped character codes of the form '\x##', where ## is the original hex value.
# there are a few printable characters here and there.

I also used the converter here, and it output mostly question marks. However, the fact that I've got a 104-bit key, and the ASCII option accepts 104-bit keys, makes me think there's a connection there somewhere.

irishbitte 11-23-2008 10:47 AM

Sounds to me like someone changed the WPA key!

openSauce 11-24-2008 04:01 AM

Nope! Thanks for your suggestion, but I just double-checked, and the key I'm using works under Windows. Maybe if I can figure out a way to get all those non-printables into the textfield for the key I'll be sorted. Or if I can connect without Network Manager, which seems buggy, that might work too..

tredegar 11-24-2008 04:30 AM

Quote:

Or if I can connect without Network Manager....
In my experience, wicd works better than "Network Manager".

You need to run iwlist scan as root for all the available networks to be listed, and you may need to run it more than once.

openSauce 11-24-2008 04:35 AM

Hmm, I followed the instructions here to try connecting with wpa_supplicant instead of Network Manager. I got no output initially, so added the -dd option for debugging output. That generated quite a lot of output which I won't c/p here, but it included the same list of SSIDs that Network Manager lists, i.e. the SSID I want was missing from the list.

So it seems like my machine isn't detecting the network for some reason. I don't think it's a hidden network - in WinXP, I unchecked the "connect even if network is not broadcasting" box, but it still connected, so presumably the network is broadcasting. And now I just checked the router's config program and "SSID Broadcast" is enabled.

openSauce 11-24-2008 07:20 AM

Quote:

Originally Posted by tredegar (Post 3352576)
You need to run iwlist scan as root for all the available networks to be listed, and you may need to run it more than once.

I have done this (several times in a row), but the network is still not listed.

Quote:

Originally Posted by tredegar (Post 3352576)
In my experience, wicd works better than "Network Manager".

I may try that if I get some time and can work through the installation instructions (mostly straightforward but there were some things I didn't immediately understand, and IME these things always suck up a couple of hours even when they look simple), but as noted, wpa_supplicant is not working either.

irishbitte 11-24-2008 08:29 AM

What kinda wireless router do you have?

tredegar 11-24-2008 01:34 PM

Quote:

I have done this (several times in a row), but the network is still not listed.
Then something is seriously wrong (are you too far away?).
Quote:

wpa_supplicant is not working either.
If this is the case, you are certain to have trouble.

As you can see I'm running kubuntu. Everything works (except perhaps, Network Manager, which I replaced with wicd, and don't really need it anyway as I have manually edited my distro's config files to set up my network - I'd like to help you with doing this yourself, but I am pretty sure Fedora does things very differently, and my advice would not work).

Quote:

I may try [installing wicd] if I get some time and can work through the installation instructions
I don't need any "installation instructions", I just use my distro's package manager, and tell it to install wicd:
Clicky- clicky-click. Done.
Or sudo apt-get install wicd Done
Doesn't Fedora have a package manager? I am sure it must do, but I do not know what it is called: Please find out and use it.

Would you like to try running a "live CD" of 8.10 or 8.04(?)ubuntu and see if your network is detected any better?
knoppix live CDs are renowned for making almost everything work.

openSauce 11-27-2008 04:17 AM

Thanks for your replies. I'm away for a bit now and won't get another chance to have a go on the network for a week or so, but I'll bump the thread when I do.

Quote:

Originally Posted by tredegar
Then something is seriously wrong (are you too far away?).

Nope! This is even when I'm sitting right next to the router. XP says the signal strength is fine.

Yes, Fedora does have a package manager (rpm-based, named yum), but wicd is not in the standard repos unfortunately.

Quote:

Originally Posted by tredegar
Would you like to try running a "live CD" of 8.10 or 8.04(?)ubuntu and see if your network is detected any better?
knoppix live CDs are renowned for making almost everything work.

A good idea, I'll try both of those when I've got access to the network again.

Quote:

Originally Posted by irishbitte
What kinda wireless router do you have?

Don't know, will find out next week!

openSauce 12-05-2008 05:19 AM

Bump! Hope you guys are still around, or maybe a fresh pair of eyes will see something. I just tried connecting with Ubunutu and Knoppix live CDs, but didn't have any luck and they don't seem like the best things to try. Ubuntu was not detecting any wireless networks, so I tried installing the madwifi driver, but the instructions I have require a reboot, so obviously with a live CD that's no good.

Knoppix I've used before on other machines and found it very useful, but bizarrely it couldn't even use my wired connection, and certainly didn't seem to have any wireless connectivity. Details of exactly what I did with both distros are below, maybe there's something else I could try that I don't know about, but AFAICS I'm better off sticking with Fedora for now.

So to sum up in one sentence, since there are a few longish posts here now:
Fedora still can't detect my wireless network, not with Network Manager, wpa_supplicant, or iwlist scan, although it has no problem connecting to other wifi networks, and the same machine can connect to this network under WinXP.

Quote:

Originally Posted by irishbitte (Post 3352739)
What kinda wireless router do you have?

It's a Philips SNV6520 from Belgacom.

So, details on the live CDs now. If there's something else I could try with one of them, let me know.

Ubuntu Live CD:

madwifi is not installed by default
Code:

ubuntu@ubuntu:~$ dpkg --get-selections | grep -i wifi
ubuntu@ubuntu:~$

So I installed it from the snapshot referenced here, since my AR5007EG card isn't yet supported by the main madwifi release found in the repos (more info here, but you don't need to know that, it's just for my records!).

I had some help from these instructions, but since the installation requires 2 reboots, which I couldn't do with a live CD, it was a bit of a pointless exercise. Don't think I'm going to get madwifi working this way, unless there is a way to get the driver working without rebooting. I didn't see any hint that the computer had wireless capability:

Code:

ubuntu@ubuntu:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:38:b3:8c:e5 
          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:38ff:feb3:8ce5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8724 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5086 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9453705 (9.0 MB)  TX bytes:620956 (606.4 KB)
          Interrupt:217

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:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4000 (3.9 KB)  TX bytes:4000 (3.9 KB)

ubuntu@ubuntu:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

ubuntu@ubuntu:~$

No mention of it from the above commands, nor in network manager. System -> Administration -> Driver Setup did say support for Atheros wireless cards was enabled, however. I also couldn't install wicd, maybe that's something to do with a different setup on the live cd vs an hdd install, or could it be KDE only?

Code:

ubuntu@ubuntu:~$ sudo apt-get install wicd
Reading package lists... Done
Building dependency tree     
Reading state information... Done
E: Couldn't find package wicd
ubuntu@ubuntu:~$

Knoppix

This has madwifi already installed:
Code:

knoppix@Knoppix:~$ dpkg --get-selections | grep -i wifi
madwifi-modules-2.6.19                          install
madwifi-tools                                  install
knoppix@Knoppix:~$

But again, no indication of any wireless capability:

Code:

knoppix@Knoppix:~$ ifconfig -a
eth0      Link encap:UNSPEC  HWaddr 00-02-3F-7C-AD-42-69-57-00-00-00-00-00-00-00-00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:8 dropped:8 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth1      Link encap:Ethernet  HWaddr 00:1B:38:B3:8C:E5
          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:16 Base address:0xa000

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:210 errors:0 dropped:0 overruns:0 frame:0
          TX packets:210 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:15300 (14.9 KiB)  TX bytes:15300 (14.9 KiB)

knoppix@Knoppix:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

knoppix@Knoppix:~$

It didn't seem to have any alternative to network manager, and in fact even failed to get an IP address for eth0. I normally use dhclient at this point, but it's not present in Knoppix.

tredegar 12-05-2008 01:14 PM

Quote:

So to sum up in one sentence, [SNIP] Fedora still can't detect my wireless network, [SNIP] although it has no problem connecting to other wifi networks.
Then the problem lies not with fedora, linux, or the drivers you are using.
The problem lies with your wireless router.

I suspect that your ESSID is "strange" and / or your WPA passphrase is "strange".
Please post them, preferably by using "copy & paste" from your wireless router's configuration pages. (We are unlikely to be within range, and you can always change them). Likely causes of errors are: spaces in ESSID or the passphrase, characters other than letters of the alphabet and numbers.

A couple of other points:
  • It would be worth logging into your wireless router's configuration pages (via ethernet, or wirelessly from windows) and checking its configuration: ESSID, WPA type and encoding, WPA Key, ESSID = Hidden etc.
  • Network Manager is buggy, which is why I use wicd but the most reliable way to get the network configured correctly is to edit the configuration files manually. You are using fedora, which does things completely differently from Debian/ubuntu, which is what I am now used to. But there'll be guides and HOWTOs for fedora all over the net. Check those configuration files, and remember that as soon as you fire up "NetworkManager", they are likely to become messed up.
  • This is interesting:
Code:

knoppix@Knoppix:~$ ifconfig -a
eth0      Link encap:UNSPEC  HWaddr 00-02-3F-7C-AD-42-69-57-00-00-00-00-00-00-00-00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:8 dropped:8 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Because HWaddr 00-02-3F-7C-AD-42-69-57-00-00-00-00-00-00-00-00 is not in the correct format, though the one listed for eth1 is in the correct format.
  • wicd needs this repository (which is for 8.04, "hardy"):
    Code:

    deb  http://apt.wicd.net  hardy extras
    to be listed in /etc/apt/sources.list before you can install it.

openSauce 12-13-2008 02:44 AM

Quote:

Originally Posted by tredegar (Post 3365686)
I suspect that your ESSID is "strange" and / or your WPA passphrase is "strange".
Please post them, preferably by using "copy & paste" from your wireless router's configuration pages. (We are unlikely to be within range, and you can always change them).
...
It would be worth logging into your wireless router's configuration pages (via ethernet, or wirelessly from windows) and checking its configuration: ESSID, WPA type and encoding, WPA Key, ESSID = Hidden etc

Fair enough. The router's config page says:
Code:

SSID                    SNV6520f7cd8e
SSID Broadcast          ENABLE
Wireless Mode                  Mixed (11b + 11g)
Channel                  13

Security
Allowed Client Type      WEP only
WEP mode                128-bit
Key entry method        Hex
Key Provisioning        Static
Key                      00AAAAA0012BFF7CD8E00BBBBB


tredegar 12-13-2008 05:03 AM

Thank you. The router's SSID & Key look alright.
Maybe you should take a look here: http://www.linuxhomenetworking.com/w...ess_Networking

Read it all through once, so you have a general overview of what is needed, then follow the instructions for fedora from the command line rather than trying to use a GUI.

That way, errors and mistakes are more easily found and corrected.

Follow that guide, and let us know at what point it fails, and with what error message(s)

openSauce 12-13-2008 09:59 AM

Wouldn't you know it. Changed the channel from 13 to 1 and now I can connect! No idea why, and not sure I want to know. As noted previously, the same machine connects successfully under WinXP, so unlikely to be a hardware issue.

Might possibly be connected to this bug, but that's for ubuntu so may be entirely unrelated.

Thanks for your help tred. It was a random guess that solved the issue in the end, but wouldn't have got to that stage without trying everything else first!

tredegar 12-13-2008 10:05 AM

Quote:

Changed the channel from 13 to 1 and now I can connect!
Well, there you go!
It might be a good idea to put your country in your Profile (At left, see mine?), as this often helps with this sort of weird problem.
Pleased you got it working, and thanks for the solution.


All times are GMT -5. The time now is 12:53 PM.