Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Connecting to WPA access point, wpa_supplicant
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
avkhatri
n00b
n00b


Joined: 29 Sep 2010
Posts: 18

PostPosted: Sat Nov 06, 2010 6:19 pm    Post subject: Connecting to WPA access point, wpa_supplicant Reply with quote

Hey everyone,

I recently got a new ISP, new router, and new passcode and I am having trouble connecting wirelessly to the router via wpa_supplicant. Before I switched to the new ISP we had a ten digit wep key and I was easily able to connect to the internet with these simple commands

Code:

ifconfig wlan0 up
iwconfig wlan0 mode managed key 1234567890
iwconfig wlan0 essid "2WIRE650"
dhcpcd wlan0


The new network uses a WPA personal key with a string of letters and numbers and will not work with the commands above. I've configured wpa_supplicant and my /etc/conf.d/net. (I've also tried the GUIs wicd and NetworkManager and they will just hang while attempting to connect and then fail)

However, when I run

Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf


This error loops

Code:
Trying to associate with e0:91:f5:0c:6f:fd (SSID='My-PC-Wireless' freq=2412 MHz)
Associated with e0:91:f5:0c:6f:fd
WPA: Key negotiation completed with e0:91:f5:0c:6f:fd [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to e0:91:f5:0c:6f:fd completed (auth) [id=0 id_str=]



My wpa_supplicant looks like this:


Code:
#Generated by NetworkManager
###### Global Configuration ######
ctrl_interface_group=0
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

###### Security Configuration ######
network={
   ssid="My-PC-Wireless"
   psk="thisismynewpasscode112010"
   priority=5
   }

I've noticed the line:
"ctrl_interface_group=/var/run/wpa_supplicant"
however there is no folder or file in /var/run/ that is "wpa_supplicant"

My /etc/conf.d/net file looks like this (I actually made this from an example from another forum post which I cant seem to dig up again right now)

Code:
#Generated by NetworkManager
###### Global Configuration ######
#wpa_supplicant_wlan0="-Dwext"
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
modules=( "wpa_supplicant" )

###### Connection Configuration ######
#----------------------------------
#config_eth0=( "dhcp" )


iface wlan0 inet dhcp
wireless-essid My-PC-Wireless
wireless-key 4491fb9facd85bad415b8bd69a6537bf857453a7bb9716d420dca076db186d11
wpa-driver wext
wpa-essid My-PC-Wireless
wpa-psk 4491fb9facd85bad415b8bd69a6537bf857453a7bb9716d420dca076db186d11
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun Nov 07, 2010 6:34 pm    Post subject: Reply with quote

I would unmerge wicd and network manager, (asuming your wireless interface is named wlan0, ), run
Code:
iwlist scan
to gather network parameters, then check that
Code:
ls -l /etc/init.d/net.*
includes symlink /etc/init.d/net.wlan0 -> net.lo
Edit /etc/conf.d/net to
Quote:
modules_wlan0=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext"
wpa_timeout_wlan0=15
config_wlan0=( "dhcp" )
dhcpcd_wlan0="-t 10"
Edit /etc/wpa_supplicant/wpa_supplicant to:
method 1:
(If you have wpa_gui)Enter the following:
Quote:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1
Then use wpa_gui to configure your network.

method 2: ( If unwilling or unable to use wpa_gui)
Quote:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
ssid="your ssid"
psk="your psk"
proto=RSN
key_mgmt=WPA-PSK
pairwise=TKIP
auth_alg=OPEN
}

The psk= entry usually requires the parentheses for 8 character code and not for the character key. but i think that may vary based on nic/router
Back to top
View user's profile Send private message
avkhatri
n00b
n00b


Joined: 29 Sep 2010
Posts: 18

PostPosted: Sun Nov 07, 2010 9:42 pm    Post subject: Reply with quote

Donahue,

Running
Code:
 ls -l /etc/init.d/net.*


gives me

Code:

/etc/init.d/net.eth0 -> net.lo
/etc/init.d/net.lo


But nothing that says
/etc/init.d/net.wlan0 -> net.lo.

How can I add that in? I opened the file in nano, but I don't know what to do with all that syntax haha.

I've edited the files as per your original post and used method 2. However, I am getting a different CTRL EVENT DISCONNECTED error

Code:

Trying to associate with e0:91:f5:0c:6f:fd (SSID='My-PC-Wireless' freq=2412MHz)
Associated with  e0:91:f5:0c:6f:fd
WPA: 4-Way Handshake failed - pre-shared key may be incorrect


I'm sure my key has been typed correctly though
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun Nov 07, 2010 11:13 pm    Post subject: Reply with quote

The psk= entry usually requires the quotes for 8 character code and not for the 64 character key. but i think that may vary based on nic/router. you might try psk= with and without quotes.

misspoke before with parentheses, sorry.

Your wireless interface is named wlan0? Then:
Code:
cd /etc/init.d
ln -s net.lo net.wlan0
rc-update add net.wlan0 default
/etc/init.d/net.wlan0 restart


does dmesg show dhcp events working correctly?
Back to top
View user's profile Send private message
avkhatri
n00b
n00b


Joined: 29 Sep 2010
Posts: 18

PostPosted: Tue Nov 09, 2010 10:48 pm    Post subject: Reply with quote

Donahue, after using the commands provided
Code:

cd /etc/init.d
ln -s net.lo net.wlan0
rc-update add net.wlan0 default
/etc/init.d/net.wlan0 restart


My desktop connects to the internet at boot! Thank you so much for your help.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Tue Nov 09, 2010 11:02 pm    Post subject: Reply with quote

well done
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Fri Dec 10, 2010 6:43 am    Post subject: Reply with quote

I am having a similar problem.
I have checked other forum topics and example configurations and at best what can get is "Bad password".

i tried with cli wpa configurations, wicd with wicd-curses and gtk and it never connects.
However with another distro that i have in the same netbook, it works right away. I also used that distros config files with gentoo and still no solution.

I am very lost. The other distro uses the same wireless driver and setup.

The network i can trying to connect is :

Code:
# iwlist eth1 scan
eth1      Scan completed :
          Cell 01 - Address: 38:22:9D:A0:47:A0
                    ESSID:"name"
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality:3/5  Signal level:-68 dBm  Noise level:-91 dBm
                    IE: Unknown:
DDAA0050F204104A00011010440001021041000100103B000103104700100000000000000001000338229DA047A010210013506972656C6C6920436F72706F726174696F6E1023000B502E44472041313030304710240019302E39392E313962312D50545F54523036395F416E6E65784D1042000D323439303159303033373734331054000800060050F204000110110014576972656C65737320526F757465722857464129100800020004
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 12 Mb/s
                              24 Mb/s; 48 Mb/s


I have done and redone /etc/conf.d/net as well as wpa_suppliant.conf and even used this topic as an example. I am using the broadcom-sta wl driver and for both distros. My last try complained about the PSK which no matter how i set it up; the result was the same.

Any tips or ideas about how to connect to this AP ?
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Dec 10, 2010 7:18 am    Post subject: Reply with quote

are you using baselayout1 or baselayout2 and openrc?
Pls post results of:
Code:
cat /etc/conf.d/net
ls -l /etd/init.d/net*
cat /etc/wpa_supplicant/wpa_supplicant.conf
ifconfig
lspci -k
ls -l /lib/firmware
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum