Ubuntu 12.04 suddenly cannot connect to WPA2/WPA Personal protected connection. Windows 7 can

internet connectionubuntu 12.04wireless-networkingwpawpa2

I have a laptop with Windows 7 and Ubuntu 12.04. I have a Cisco E1200 and when I set it up, it created 2 SSIDs. Let's name them:

  1. MyConnection (WPA/WPA2 personal), and
  2. MyConnection-Guest (no authentication, guest password entered via web browser).

I had no problem connecting to MyConnection before, either in Windows 7 and Ubuntu. But now, I can't access MyConnection on Ubuntu. It just says "connecting…" then disconnects after a while. But I'm able to access the internet (on Ubuntu) when I connect to MyConnection-Guest.

MAC filtering is off (even if it's on its MAC address is in the white list). Any idea why I'm unable to connect to MyConnection in Ubuntu? Thanks.

Update: My Ubuntu installation can connect to ANY WiFi connection (WPA/WEP/no auth), except for MyConnection.
Update2: This is what "The not so easy way" returned:

Initializing interface 'eth1' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Priority group 0
   id=0 ssid='MyConnection'
   id=1 ssid='MyConnection'
   id=2 ssid='MyConnection'
   id=3 ssid='MyConnection'
WEXT: cfg80211-based driver detected
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf flags 0x0
netlink: Operstate: linkmode=1, operstate=5
Own MAC address: xx:xx:xx:xx:xx:xx
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_countermeasures
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): 16 3b d8 47 9e 24 50 89 96 16 6d 66 35 f3 58 37
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface eth1

Best Answer

Ubuntu is very tricky and very "delicate" when working with this kind of connections. WPA, WPA2, WEP... etc...

Assuming that you've already checked your /etc/network/interfaces.conf and all is correct,

You have 2 ways. The Easyone and the not so easy one:

Easy.

Just Edit your connections . Up in the left side of the volume icon. There, select your wireless connection and just delete it. At this point I'd suggest a restart(For both, your pc and your AP). Now, when you pc turns on, try to connect to My connection and procceed normally.

That should work.. sometimes you have to wait a while but it works the most of the times.

.

Now. The not so easy way

I like to use command line. So, if you are not used to it.. well.. this way won't be so fast.. but you can learn a lot.

With this method you will be working with a file called wpa_supplicant.conf which, as its name says, it will beg for a WPA connection.

now, With

iwlist scanning 

You can see all your available AP (Access Points)

You should see My Connection.

Make the wpa_supplicant.conf with:

linux:~# /usr/bin/wpa_passphrase SSID_HERE SECRET_WIFI_PASS_HERE | tee -a /etc/wpa_supplicant.conf

And you will get something like this as output:

network={
ssid="SSID_HERE"
#psk="SECRET_WIFI_PASS_HERE"
psk=6f7590250c4496ff7bf8dd25199ac3bb5a614d4bc069975aa884bcf084da73bc
}

..The last one is the encrypted pass which is usefull in the /etc/network/interfaces file

then, you'll need the fresh new wpa_supplicant.conf to stablish the connection with:

linux:~# /sbin/wpa_supplicant wpa_supplicant -d wext -i wlan0 -c /etc/wpa_supplicant.conf -B

-d wext is for the wireless extention -B tells the wpa_supplicant to make a background connection to prevent the wireless to disconect if the console gets closed.

After that, you should have a fress active connection.

Hope this helps for you. If it doesn't, let me know and i'll try to help.

Related Question