LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   wpa_supplicant not working in CentOS on dell latitude x200 (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/wpa_supplicant-not-working-in-centos-on-dell-latitude-x200-820747/)

focusbob 07-19-2010 12:27 PM

wpa_supplicant not working in CentOS on dell latitude x200
 
Hi forum,

Just installed CentOS 5.5 on my dell latitude x200 and am trying to configure my wifi. I believe wpa_supplicant was installed by defualt; I also installed a package with a name like "wpa_supplicant gui" from add/remove programs.

I can get on to unsecured wireless networks, but unfortunately, my home network is WPA protected. When I start up CentOS, I get the message "wpa_supplicant failed to initialize". However, when the desktop boots, and I check which services are running, wpa_supplicant is listed as running. When I open networkmanager, there is no option to connect to wireless networks via wpa (wep only)- the wpa networks are listed, I just can't connect to them.

Can anyone help me connect to WPA networks with CentOS? Before you suggest "switch distros" or "CentOS is not ideal for laptops"; I need to learn RHEL, and I am using this installation towards that goal.

Thanks,
Jim

business_kid 07-20-2010 04:29 AM

Have you run wpa_passphrase? Favourite error & best kept secret.
See the man page. typical example

bash-3.1$ wpa_passphrase my_essid somesillynonsense
network={
ssid="my_essid"
#psk="somesillynonsense"
psk=f5f3f4b79c012c5ae783fec8e793894688a6d2cfb08a1a9ee8e89c69cf34a5ec
}
Put that lot in wpa_supplicant.conf. You see that the passphrase uses your ssid and your psk.

focusbob 07-25-2010 10:06 AM

Thanks for your reply,

Not sure if I'm doing this correctly, but after following your advice, I ran the command:
wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant/wpa_supplicant.conf

I had been taking the advice of this walkthrough (I've switched to Scientific Linux since my last post):
http://www.ippp.dur.ac.uk/old/Comput...roubleshooting

Anyway, my output was:
(wext) Device eth1 kernel driver name: orinoco_cs.
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 7 value 0x1 - Device eth1 kernel driver name: orinoco_cs.
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Invalid argument
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/eth1' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 7 value 0x0 - Failed to disable WPA in the driver.
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - [root@localhost ~]#

Which is a far cry from what the walkthrough said it should be.

When I run iwconfig:

eth1 IEEE 802.11b ESSID:"LimeHorse-guest" Nickname:"localhost.localdomain"
Mode:Managed Frequency:2.462 GHz Access Point: 68:7F:74:53:E1:E5
Bit Rate:11 Mb/s Sensitivity:1/3
Retry limit:4 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=33/92 Signal level=-64 dBm Noise level=-97 dBm
Rx invalid nwid:0 Rx invalid crypt:72 Rx invalid frag:78
Tx excessive retries:8 Invalid misc:0 Missed beacon:0

And, I'm able to connect to the internet via unsecured networks (so my driver and everything is working).

Any thoughts?

Thanks,
Jim

business_kid 07-26-2010 03:14 AM

This line
Quote:

Mode:Managed Frequency:2.462 GHz Access Point: 68:7F:74:53:E1:E5
tells you that you are connected, and that the AP you are connected to has a mac address of 68:7F:74:53:E1:E5. So I would check they are not running first
pgrep dhc
should return nothing.Then if you run dhcpcd or dhclient
dhclient eth1
You should get an ip and a network connection, and start surfing. Scientific linux is a slow RHEL based recompile(Well, I found it slow), so you may have networkmanager playing games in the background, and you have their obtuse and byzantine network rc script relying on data in /etc/sysconfig/. Have fun there. You also have the system-config-network utility, which pretends to know what it is doing.

I would reboot at some point and see how much is actually set up from there.

focusbob 07-27-2010 07:14 AM

Right, the problem is that I'm connected to an unsecured WAP; my router has a guest mode.

The problem started (before I started messing with wpa_supplicant) when I attempted to connect to my wpa network using network manager, it would spin its wheels for a while then ask for a password. Problem was, there was no option for wpa, only wep. Then I tried messing with wpa_supplicant, and got the message I posted above (where wpa_supplicant replies operation not supported and so on). I also tried uninstalling networkmanager and installing wicd, and that didn't even start.

Could it be my orinoco hardware that is causing the problem/is unsupported for wpa in linux (works fine in windows for wpa)? That seems to be what the wpa_supplicant message is suggesting.

...back to CentOs...

Thanks,
Jim

business_kid 07-28-2010 03:37 AM

http://www.linuxwireless.org
Find out about the driver there. I have never heard of a driver not being supported by wpa_supplicant.

As for your problem, it is useful to stop the network, before you try to start it. I presume you have the section in /etc/wpa_supplicant/wpa_supplicant.conf that I gave you above. Stop the NetworkManager service, and make sure it doesn't start again, if you want to learn Centos.

So you want to learn RHEL: This can be done from init without ever going to runlevel 5. IIRC, The relevant stuff is /etc/rc.d/init.d/network, /etc/sysconfig/networking, & /etc/sysconfig/network-scripts. There's some little half-assed file, ifcfg-wlan0 or the like for each interface, and configuration stuff goes into a similar file for setting up. It's all explained in some well hidden docs in /usr/share. Go to it!

If you want to test the principle at any time, stop everything - dhclient, network manager, wpa_supplicant. I trust you have man pages installed.
As root, the process is
ifconfig wlan0 up
iwlist wlan0 scan |less # and run a mouse over your chosen access point's mac address
wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dwext && iwconfig wlan0 essid your_essid ap <mac address>
dhclient wlan0

use no <> brackets in the lines above.

b0uncer 07-28-2010 03:53 AM

Quote:

Originally Posted by business_kid (Post 4047701)
wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dwext && iwconfig wlan0 essid your_essid ap
dhclient wlan0

Is "iwconfig" really necessary in that line? I think the only things I've ever needed were wpa_supplicant.conf, information from wpa_passphrase, wpa_supplicant itself (similar to the above quote) and then dhcpcd/dhclient -- no iwconfig unless unencrypted/WEP encryption was enough.

business_kid 07-29-2010 03:38 AM

Yes, you need the iwconfig stuff. iwconfig wlan0 ap <your mac address> tells it to associate with that access point.


All times are GMT -5. The time now is 10:11 AM.