getting wpa to work

Asked by harsha

Hi,
  I have installed fiesty on Z61m with Intel 3945ABG Broadcom wireless card, Fiesty recognizes the wireless card and even shows all the wireless networks in my area. however when i click on the network i need to connect to - AirPennNet, which is is a WPA encrypted with EAP-TTLS protocol, i get prompted to enter WEP key even though the network is WPA encrypted. There was a help page on my network which asked me to install wpa_supplicant(already there in feisty) and make a configuration file with some required settings. This I did, and used wpa_supplicant along with dhclient at shell to start the wireless, But this too didn't work. What should i do to get WPA to start working?
thanks,
harsha

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
harsha
Solved:
Last query:
Last reply:
Revision history for this message
harsha (harsha-v-r) said :
#1

here's my wpa conf file, airpennnet.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=2
ap_scan=1

network={
  priority=2
  ssid="AirPennNet"
  key_mgmt=IEEE8021X
  eap=TTLS
  <email address hidden>"
  phase2="auth=PAP"
  identity="//my user name//"
  password="//my password//"
  ca_cert="/home/harsha/TSR/ThawtePremiumServerCA.cer"
}

Revision history for this message
harsha (harsha-v-r) said :
#2

here's what happens when i try to run wpa_supplicant :

harsha@ubuntu:~$ sudo wpa_supplicant -dd -c /etc/airpennnet.conf -i eth1 -d madwifi -B -K //replacing madwifi with wext or broadcom gives the same result
Initializing interface 'eth1' conf '/etc/airpennnet.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/airpennnet.conf' -> '/etc/airpennnet.conf'
Reading configuration file '/etc/airpennnet.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0' (DEPRECATED)
eapol_version=2
ap_scan=1
Line: 7 - start of a new network block
priority=2 (0x2)
ssid - hexdump_ascii(len=10):
     41 69 72 50 65 6e 6e 4e 65 74 AirPennNet
key_mgmt: 0x8
eap methods - hexdump(len=16): 00 00 00 00 15 00 00 00 00 00 00 00 00 00 00 00
anonymous_identity - hexdump_ascii(len=16):
     61 6e 6f 6e 79 6d 6f 75 73 40 6e 6f 2e 6f 72 67 <email address hidden>
phase2 - hexdump_ascii(len=8):
     61 75 74 68 3d 50 41 50 auth=PAP
identity - hexdump_ascii(len=8):
     68 61 72 73 68 61 76 72 //my user name appears here
password - hexdump_ascii(len=11):
     4d 75 6e 69 67 61 64 64 61 70 61 //my password appears here
ca_cert - hexdump_ascii(len=42):
     2f 68 6f 6d 65 2f 68 61 72 73 68 61 2f 54 53 52 /home/harsha/TSR
     2f 54 68 61 77 74 65 50 72 65 6d 69 75 6d 53 65 /ThawtePremiumSe
     72 76 65 72 43 41 2e 63 65 72 rverCA.cer
Priority group 2
   id=0 ssid='AirPennNet'
Initializing interface (2) 'eth1'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=21 WE(source)=16 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:18:de:63:c6:85
wpa_driver_hostap_set_wpa: enabled=1
wpa_driver_hostap_set_key: alg=none key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_key: alg=none key_idx=1 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_key: alg=none key_idx=2 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_key: alg=none key_idx=3 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_countermeasures: enabled=0
wpa_driver_hostap_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=0
Added interface eth1
Daemonize..

harsha@ubuntu:~$ sudo dhclient eth1
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/eth1/00:18:de:63:c6:85
Sending on LPF/eth1/00:18:de:63:c6:85
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping

Revision history for this message
harsha (harsha-v-r) said :
#3

here's my lspci and iwconfig indo and my /etc/network/interfaces file

harsha@ubuntu:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X1400
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752M Gigabit Ethernet PCI Express (rev 02)
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
15:00.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
15:00.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
15:00.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
15:00.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

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

eth0 no wireless extensions.

irda0 no wireless extensions.

eth1 unassociated ESSID:"AirPennNet"
          Mode:Managed Frequency=nan kHz Access Point: 00:17:0F:E4:B6:80
          Bit Rate:0 kb/s Tx-Power:16 dBm
          Retry limit:15 RTS thr:off Fragment thr:off
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:816 Missed beacon:0

/etc/network/interfaces
# 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

Revision history for this message
Best harsha (harsha-v-r) said :
#4
Revision history for this message
Kuong (kchaing) said :
#5

Hey how did you get it to work on the AirPennNet exactly? i tried using the settings for lehigh, but i couldnt get it work. Did you just modify your settings? As for the certificate, did you have to download that from a windows machine and then transfer it to your ubuntu setup? Did you use madwifi or wext? Any help is appreciated

Revision history for this message
harsha (harsha-v-r) said :
#6

sorry for the very late reply, i have been away from my laptop for a long time, so i couldn't find the exact settings. just in case you haven't configured it already and for future reference, here's a list of steps which worked for me
- register your MAC address with penn, (instructions here http://www.sas.upenn.edu/computing/wireless/user_mac_registration.html )
- create a airpennnet.conf file as specified here, http://www.sas.upenn.edu/computing/wireless/airpennnet_linux.html with your pennid and password in it
- download certificates from thawte site, you might find many certificates with similar names - the one you'll need is the one mentioned in the above configuration file
- change the /etc/network/interfaces file as mentioned in my previous post, this is the crucial step which made it work for me, originally i was trying wpa _supplicant directly but it didn't work for some reason
     for reference here's my /etc/network/interfaces file after i changed it as mentioned in the article
---
# The loopback network interface
auto lo
iface lo inet loopback

auto eth1 #eth1 is the wireless port
iface eth1 inet dhcp
wpa-driver wext #you might need to replace this
wpa-conf /etc/airpennnet.conf #this should be changed to wherever you have put the .conf file created in the above step
---
- after this do a sudo /etc/init.d/networking restart
at this point, it started working

if this does work out you might consider creating a script with a short name which runs the above command, or add an item to the desktop/ gnome panel(with theapplication in terminal option) which executes the above command

if it still doesn't work out, it might be that the wireless card isn't being recognized(which is unlikely as ubuntu seems to recognize intel cards) or there was an error in carrying out one of the above steps