LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Connection to WPA-PSK-network wit NetApplet (https://www.linuxquestions.org/questions/linux-software-2/connection-to-wpa-psk-network-wit-netapplet-925206/)

SuSE_Lamer 01-23-2012 02:14 AM

Connection to WPA-PSK-network wit NetApplet
 
Hello @all,

I have a problem connecting to WPA-PSK-protected networks. Short description: I have Thinkpad T43p, WLAN-card is recognized and running. Several years ago, when NetApplet was too young and unusable, I decided to write a script, which switched on and off my WLAN (including connection to the router using wpa_supplicant). A month ago I gave a try to NetApplet. It looks quite good now, and I wanted to use it regularly. Unfortunatelly, I could not connect to my router.

On the week-end I switched from Debian to Ubuntu - I installed Ubuntu 11.10. Under "Unity" I could connect to my router, under GNOME - not. Since I'm going to use GNOME, I would like to get my NetApplet and WLAN running.

Here is my question: can anyone give me a hint, what I should to do to resolve the issue? I think, it has anything to do with my wpa_supplicant configuration, which I created when I used my old scripts, but I'm not quite sure.

Additional information: when I try to connect to WLAN using NetApplet, it tries several seconds and then asks for a password, although I have it already set in the network profile.

I would appreciate any help, thanks in advance.

Greetings from Hamburg,
Andrey.

thund3rstruck 01-24-2012 07:46 PM

I actually just did this in Puppy Linux. Puppy is designed to be run as a Live distro that's not designed to be run like a standard everyday distro so it requires you to manually (re)-enter the network info every time you start the machine!

To resolve this I had to create a login script to connect to the WPA2 router. Basically all you need to do is edit the wpa_supplicant's config file and then reference that file when calling the wpa_supplicant program.

Create/Edit /etc/wpa_supplicant.conf
Code:

## SAMPLE wpa_supplicant ##
## Calculate PSK HEX Key: http://jorisvr.nl/wpapsk.html
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="mySSID"
        scan_ssid=1
        psk="MyHexWPA2Passphrase"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
}

Establish WPA2 connection
Code:

wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf

Roken 01-24-2012 08:03 PM

Personally, I don't bother with a NM anymore. I have wpa_supplicant configured to start at boot, and leave it to it. No more dropped wifi, no more bad connections etc.

However, if you must have a NM, take a look at wicd. It's about the best out there.

SuSE_Lamer 01-25-2012 03:09 AM

wpa_supplicant vs. NetworkManager
 
Hello @all,

thanks for your hints and replies. Actually, I used to work with "Access Connections" from IBM/Lenovo. I want to be able to switch manually from cable to WLAN. That's why I want to get NetworkManager running.

Quote:

Originally Posted by Roken (Post 4583610)
Personally, I don't bother with a NM anymore. I have wpa_supplicant configured to start at boot, and leave it to it. No more dropped wifi, no more bad connections etc.

However, if you must have a NM, take a look at wicd. It's about the best out there.

To be honest, I do not really understand the realtionship between NetworkManager and wpa_supplicant. Someone says "they must run together", someone says "NetworkManager has its own WPA-driver, and that's why they conflict". Does anyone know the real situation?

Greetings from Hamburg,
Andrey

Roken 01-25-2012 06:40 AM

I can't be certain, but when I have used a Network Manager, a quick look at ps -A (or your task manager if you use one) will confirm that wpa_supplicant is still running. As such, I suspect that NMs are just basically another layer over the top of wpa_supplicant. My own experience, however, is that NMs can cause problems. Whenever I've used one (whether it be gnome-network-manager, wicd etc) I've had problems with stalling connections, dropped connections etc. Since I went directly to wpa_supplicant with no intermediate layer my wireless is rock solid.

Granted, you don't get all the pretty GUI configuration that a NM provides, and you have to take care of monitoring your network yourself if you want to know what's going on (a fairly trivial task with something like conky), but the stability IMO more than makes up for it.

NB. This may just be something peculiar to my PC, network, router etc., so YMMV.


All times are GMT -5. The time now is 04:37 PM.