Wireless doesn't work with WPA

Asked by Andrea Francia on 2009-04-07

I'm using Ubuntu 9.04 and since few days ago I have problems connecting to the router through wireless.

I use NetworkManager with the nm-applet. The device is D-Link DI-254 802.11g/2.4Ghz Wireless Router

I can access the device trough the wire and I can change the settings of the device.
If I disable the WPA authentication on device my Ubuntu connects correctly.
If I enable the WPA authentication my Ubuntu ask me the passphrase then it tries to connect, it waits about a minute, then it asks me again the passphrase.

My sister use a laptop with Windows Vista, its computer connects to the device with both WPA and with no authetication. Few days ago also my Ubuntu connects without problems.

I can't figure out how to spot the problem. Any suggestion?

Thanks for your help

andrea@puzzle:~$ dpkg -l network-manager network-manager-gnome
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
ii network-manager 0.7.1~rc3.2.gitb8fc83a7-0ub network management framework daemon
ii network-manager-gnome 0.7.1~rc3-0ubuntu4 network management framework (GNOME frontend)

andrea@puzzle:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu jaunty (development branch)
Release: 9.04
Codename: jaunty

andrea@puzzle:~$ uname -a
Linux puzzle 2.6.28-11-generic #40-Ubuntu SMP Fri Apr 3 17:39:51 UTC 2009 i686 GNU/Linux

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Andrea Francia
Solved:
2009-04-13
Last query:
2009-04-13
Last reply:
2009-04-09

This question was reopened

Craig Huffstetler (xq) said : #1

Network-manager supports WPA encryption protocols as well as WEP, etc.; however, on certain connections (I.E. 802.11 networks) you need a supplement package: wpasupplicant.

To get this, fire up a terminal (Applications > Accessories > Terminal) and type/paste:

sudo apt-get install wpasupplicant

Enter in your user password. This will install it.

If this does not work try something for me. However, I am betting the above will work...

First, DISABLE wireless on your P.C.'s network manager applet:

- Right click on the applet, in the tool-bar, and uncheck "Wireless Networking."
- Now right click it again and check "Enable Wireless Networking." (Make sure there is a checkbox next to it).
- Try a network besides your own. Even it has encryption enabled.
- Now switch back to your own. Ensure the hostname is correct (i.e. puzzle-network). Enter the WPA passkey. Ensure it is correct and if you want Network-Manager to remember it select "Remember..."

Let me know if this works.

Very thanks, Craig, you were very nice. But I didn't to resolve the problem.

The wpasupplicant seems to be installed:

andrea@puzzle:~$ sudo apt-get install wpasupplicant
Reading package lists... Done
Building dependency tree
Reading state information... Done
wpasupplicant is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

andrea@puzzle:~$ ps -ef | grep wpa
root 3176 1 0 19:04 ? 00:00:01 /sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log
andrea 6697 4622 0 20:52 pts/0 00:00:00 grep wpa

I followed your istructions trying to connect to another network then back my network but I was out of luck.

This is the log of wpasupplicant when I try to connect to my network. The BSSID and the SSID matches the values of my device. In the report reported here I obscured the second part of my BSSID with xx:xx:xx.

andrea@puzzle:~$ tail -f -n 1 /var/log/wpa_supplicant.log
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:19:5b:xx:xx:xx (SSID='Cartaccia1' freq=2437 MHz)
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
CTRL-EVENT-SCAN-RESULTS
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:19:5b:xx:xx:xx (SSID='Cartaccia1' freq=2437 MHz)
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.

I'm sure that the password was entered correctly because: 1) I used the copy & paste from the configuration page of my device, 2) when entering the passphrase I turn the "Show Password" flag on, 3) the same password works with my sister Windows PC

There is a strange thing: After some time my system is trying the to connect it ask the password again, and it shows a password concealed behind asterisks (or discs). When I turn on "Show Password" check box there is not the password that I inserted before but something that resemble a string of hexadecimal digit, like: dd848c561af2355xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I hope somebody can help me.

Very thanks, Craig, you were very nice. But I didn't to resolve the problem.

The wpasupplicant seems to be installed:

andrea@puzzle:~$ sudo apt-get install wpasupplicant
Reading package lists... Done
Building dependency tree
Reading state information... Done
wpasupplicant is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

andrea@puzzle:~$ ps -ef | grep wpa
root 3176 1 0 19:04 ? 00:00:01 /sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log
andrea 6697 4622 0 20:52 pts/0 00:00:00 grep wpa

I followed your istructions trying to connect to another network then back my network but I was out of luck.

This is the log of wpasupplicant when I try to connect to my network. The BSSID and the SSID matches the values of my device. In the report reported here I obscured the second part of my BSSID with xx:xx:xx.

andrea@puzzle:~$ tail -f -n 1 /var/log/wpa_supplicant.log
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:19:5b:xx:xx:xx (SSID='Cartaccia1' freq=2437 MHz)
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
CTRL-EVENT-SCAN-RESULTS
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:19:5b:xx:xx:xx (SSID='Cartaccia1' freq=2437 MHz)
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
Associated with 00:19:5b:xx:xx:xx
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.

I'm sure that the password was entered correctly because: 1) I used the copy & paste from the configuration page of my device, 2) when entering the passphrase I turn the "Show Password" flag on, 3) the same password works with my sister Windows PC

There is a strange thing: After some time my system is trying the to connect it ask the password again, and it shows a password concealed behind asterisks (or discs). When I turn on "Show Password" check box there is not the password that I inserted before but something that resemble a string of hexadecimal digit, like: dd848c561af2355xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I hope somebody can help me.

I wonder how to remove the message I posted when I clicked the wrong button...

The wireless stopped working on Apr 6.

I discovered that there was a change in the modules:
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 3" | grep b43
/var/log/daemon.log.0:Apr 3 10:16:35 puzzle NetworkManager: <info> (wlan0): new 802.11 WiFi device (driver: 'b43')
/var/log/daemon.log.0:Apr 3 21:05:08 puzzle NetworkManager: <info> (wlan0): new 802.11 WiFi device (driver: 'b43')
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 4" | grep b43
/var/log/daemon.log.0:Apr 4 00:57:19 puzzle NetworkManager: <info> (wlan0): new 802.11 WiFi device (driver: 'b43')
/var/log/daemon.log.0:Apr 4 16:16:41 puzzle NetworkManager: <info> Found radio killswitch /org/freedesktop/Hal/devices/ssb__null__rfkill_b43_phy0_wlan
/var/log/daemon.log.0:Apr 4 19:48:05 puzzle NetworkManager: <info> Found radio killswitch /org/freedesktop/Hal/devices/ssb__null__rfkill_b43_phy0_wlan
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 5" | grep b43
/var/log/daemon.log:Apr 5 11:00:09 puzzle NetworkManager: <info> (wlan0): new 802.11 WiFi device (driver: 'b43')
/var/log/daemon.log:Apr 5 20:48:23 puzzle NetworkManager: <info> Found radio killswitch /org/freedesktop/Hal/devices/ssb__null__rfkill_b43_phy0_wlan

The 'b43' stopped to be present after the Apr 6:
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 6" | grep b43
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 7" | grep b43
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 8" | grep b43

But instead I can see the bcmwl5 driver in the logs:

andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 3" | grep bcmwl5
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 4" | grep bcmwl5
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 5" | grep bcmwl5
andrea@puzzle:~$ sudo grep -r "wlan" /var/log/* | grep "Apr 6" | grep bcmwl5
/var/log/kern.log:Apr 6 09:52:10 puzzle kernel: [ 18.396791] wlan0: ethernet device 00:14:a5:64:8d:fe using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4318.5.conf
/var/log/kern.log:Apr 6 19:23:35 puzzle kernel: [ 17.848540] wlan0: ethernet device 00:14:a5:64:8d:fe using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4318.5.conf
/var/log/messages:Apr 6 09:52:10 puzzle kernel: [ 18.396791] wlan0: ethernet device 00:14:a5:64:8d:fe using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4318.5.conf
/var/log/messages:Apr 6 19:23:35 puzzle kernel: [ 17.848540] wlan0: ethernet device 00:14:a5:64:8d:fe using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4318.5.conf

How can I get rid of bcmwl5 and get back the b43 driver?

Craig Huffstetler (xq) said : #6

What network card do you have? Exact make/model.

Also, one thing to consider (if this is a newer model card -- which it may be and not supported yet via the drivers available) is to:

a) Use MAC level authentication on your router (disable WPA);
b) Disable the broadcasting of the host name of your router.

OR: Try WEP-level encryption.

This may suffice until the newest drivers surface for your card (if this is indeed the issue). Also, if it is a new card, we can always go directly to the source (not the Ubuntu repositories) and download from there. This would ensure the newest drivers and we can see if these drivers work for you.

Craig Huffstetler (xq) said : #7

This is a great post on how to get back to the b43 driver (*warning: read all the way through!*):

http://www.linuxforums.org/forum/ubuntu-help/138255-problems-wireless-network-card-b43-driver.html

Sincerely,

Craig

I blacklisted ndiswrapper and bcmwl5 adding these lines to /etc/modprobe.d/blacklist.conf:

# Andrea: Odio questo driver!
blacklist bcmwl5
blacklist ndiswrapper

And I restarted the system.
After the restart I need to load manually the b43 driver with

modproble b43

I don't know, maybe I just need to add it to /etc/modules to get it loaded automatically. I'll try for the next boot.