LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Wicd not allowing wireless connection but wired works fine (https://www.linuxquestions.org/questions/linux-wireless-networking-41/wicd-not-allowing-wireless-connection-but-wired-works-fine-925717/)

dwivvc 01-25-2012 06:13 PM

Wicd not allowing wireless connection but wired works fine
 
Hello let me start off by saving I'm a complete novice my current os is backtrack 5
and i'm having issues with using wicd to get on a wireless network wired is fine but when i try connecting to a wireless it says that it's unable to get an ip.


i've looked on google for the past 6 hours 0_0
could someone please please please help me as this is very frustrating

Roken 01-25-2012 06:29 PM

Please post the output of
Code:

cat /etc/wpa_supplicant.conf
before you do - scroll down to the bottom and obfuscate any passwords that are there

dwivvc 01-25-2012 06:32 PM

Quote:

Originally Posted by Roken (Post 4584547)
Please post the output of
Code:

cat /etc/wpa_supplicant.conf
before you do - scroll down to the bottom and obfuscate any passwords that are there


Hi thanks for the reply this is what i got

Code:

cat: /etc/wpa_supplicant.conf: No such file or directory

Roken 01-25-2012 06:37 PM

Ok - try this (assuming that you are using a fairly standard router with wpa2 encryption).

create a file called networkconfig(, the name doesn't matter and you can do this in your /home directory) containing the following:

Code:

network={
        ssid="YOURSSID"
        key_mgmt=WPA-PSK
        psk="YOURPASSWORD"
        priority=5
}

Obviously, replace YOURSSID with the ssid of your wireless router, and replace your wireless password accordingly. Then run (assuming you save it to /home and called it "networkconfig"):

Code:

wpa_supplicant -D wext -iwlan0 -c/home/yourusername/networkconfig
Again - replace "yourusername" accordingly. See if this gets you connected.

dwivvc 01-25-2012 06:54 PM

ok thanks again i did what you said then i got this

Code:

wpa_supplicant -D wext -iwlan0 /root/networkconfig
wpa_supplicant v0.6.9
Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the
BSD license. See README and COPYING for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:
  wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>] \
        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-p<driver_param>] \
        [-b<br_ifname>] [-f<debug file>] \
        [-N -i<ifname> -c<conf> [-C<ctrl>] [-D<driver>] \
        [-p<driver_param>] [-b<br_ifname>] ...]

drivers:
  wext = Linux wireless extensions (generic)
  nl80211 = Linux nl80211/cfg80211
  atmel = ATMEL AT76C5XXx (USB, PCMCIA)
  wired = wpa_supplicant wired Ethernet driver
options:
  -b = optional bridge interface name
  -B = run daemon in the background
  -c = Configuration file
  -C = ctrl_interface parameter (only used if -c is not)
  -i = interface name
  -d = increase debugging verbosity (-dd even more)
  -D = driver name (can be multiple drivers: nl80211,wext)
  -f = log output to debug file instead of stdout
  -g = global ctrl_interface
  -K = include keys (passwords, etc.) in debug output
  -s = log output to syslog instead of stdout
  -t = include timestamp in debug messages
  -h = show this help text
  -L = show license (GPL and BSD)
  -p = driver parameters
  -P = PID file
  -q = decrease debugging verbosity (-qq even less)
  -u = enable DBus control interface
  -v = show version
  -W = wait for a control interface monitor before starting
  -N = start describing new interface
example:
  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
root@bt:~# wpa_supplicant -D wext -iwlan0
wpa_supplicant v0.6.9
Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the
BSD license. See README and COPYING for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:
  wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>] \
        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-p<driver_param>] \
        [-b<br_ifname>] [-f<debug file>] \
        [-N -i<ifname> -c<conf> [-C<ctrl>] [-D<driver>] \
        [-p<driver_param>] [-b<br_ifname>] ...]

drivers:
  wext = Linux wireless extensions (generic)
  nl80211 = Linux nl80211/cfg80211
  atmel = ATMEL AT76C5XXx (USB, PCMCIA)
  wired = wpa_supplicant wired Ethernet driver
options:
  -b = optional bridge interface name
  -B = run daemon in the background
  -c = Configuration file
  -C = ctrl_interface parameter (only used if -c is not)
  -i = interface name
  -d = increase debugging verbosity (-dd even more)
  -D = driver name (can be multiple drivers: nl80211,wext)
  -f = log output to debug file instead of stdout
  -g = global ctrl_interface
  -K = include keys (passwords, etc.) in debug output
  -s = log output to syslog instead of stdout
  -t = include timestamp in debug messages
  -h = show this help text
  -L = show license (GPL and BSD)
  -p = driver parameters
  -P = PID file
  -q = decrease debugging verbosity (-qq even less)
  -u = enable DBus control interface
  -v = show version
  -W = wait for a control interface monitor before starting
  -N = start describing new interface
example:
  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf


Maybe i didn't explain myself better what I'm trying to do connect to my other pc via an adhoc network I did this on windows in about 5 minutes i tried it with a password and without a password i can see the wireless networks in wicd but when i try to connect to one it says the following connection failed: Unable to get ip address but it gets the ip address on wired in fact I'm using it right now

Roken 01-25-2012 07:03 PM

I understood your problem, I was trying to establish whether or not wireless authetication was working properly. I used to have a similar problem with wicd (and other network managers) which were fixed by not using the NM but connecting directly.

The output suggests something about your installation of wpa_supplicant didn't like the command, so try it each way as follows:

Code:

wpa_supplicant -Dwext -iwlan0 -c/home/yourusername/networkconfig
try with variations of spaces between -D, -i and -c

eg:

Code:

-Dwext -iwlan0 -c /home....."
etc


It should connect to your wireless network, in which case we can rule out unsupported hardware etc and look at wicd itself.

dwivvc 01-25-2012 07:03 PM

Is there a possibility that the wireless adapter drivers haven't been installed correctly and if so how can i check if they have?

dwivvc 01-25-2012 07:09 PM

ok I got one to work and it came up with the following

Code:

root@bt:~# wpa_supplicant -Dwext -iwlan0 -c/root/networkconfig
Line 4: Invalid PSK ''.
Line 4: failed to parse psk ''.
Line 6: WPA-PSK accepted for key management, but no PSK configured.
Line 6: failed to parse network block.
Failed to read or parse configuration '/root/networkconfig'

really am sorry for being a pain

Roken 01-25-2012 07:13 PM

Does your wireless router have a password set, and did you set it correctly in networkconfig? Other things to check:

Does your router use wpa2 encryption (if not and if it supports it, you should use it to minimise the risk of someone hijacking your wireless while they are sat outside). If it doesn't support wpa2, what encryption does it support? As long as you know the encryption and the credential, you should be able to connect.

Edit: Also check line 4 of network config - make ure it starts "psk" and not "PSK"

dwivvc 01-25-2012 07:19 PM

Ok i have a wirelress usb adapter that i'm connecting to my windows pc it works when they are both windows (my laptop has duelboot) but doesn't work when my laptop is in backtrack 5

It supports wpa2-personal
and AES encryption but i couldn't connect with that so i turned them all off and have no pass key and it's currently an unsecured connection with the hope of making it secure as soon as i get the wireless to work (it's not really a big issue tho as I live in the country and the nearest house near me is about 3 miles away

Roken 01-25-2012 07:21 PM

Ok, that may be your problem. I've never used an unsecure connection, and it may simply be that wpa_supplicant (which the network managers use) just doesn't like it. I'd recommend securing your network regardless (it doesn't matter where you live, someone can turn up with a laptop and a tin of beans antenna and potentially get access from a mile away).

I'm prepared to hazard a guess that if you secure it and try again it will work.

dwivvc 01-25-2012 07:28 PM

ok I secured it and put a password on it then i tryed connecting via wicd but i still got the erorr unable to get ip then i modifed the code you sent me and got the following

Code:

root@bt:~# wpa_supplicant -Dwext -iwlan0 -c/root/networkconfig
Line 4: Invalid PSK 'passwordtest123'.
Line 4: failed to parse psk 'passwordtest'.
Line 6: WPA-PSK accepted for key management, but no PSK configured.
Line 6: failed to parse network block.
Failed to read or parse configuration '/root/networkconfig'.

I'm starting to think it's a driver issue but then again the wireless card can pick up the net work just can't obtain an ip.


EDITTTTTTTTTTTTTTTTTTTTTTin and

ok i put the password in speachmarks and ran it again and somehting completly different happend.

Code:

root@bt:~# wpa_supplicant -Dwext -iwlan0 -c/root/networkconfig
WPS-AP-AVAILABLE
WPS-AP-AVAILABLE
oot@bt:~# wpa_supplicant -Dwext -iwlan0 -c/root/networkconfig
WPS-AP-AVAILABLE
WPS-AP-AVAILABLEWPS-AP-AVAILABLE
WPS-AP-AVAILABLE

what does this mean?

Roken 01-25-2012 07:32 PM

I'm almost certain it's not a driver problem. Double check the config file we've been testing with. wpa_supplicant doesn't like something in it, but I can't for the life of me see what (I copied it from my own config)

dwivvc 01-25-2012 07:34 PM

ok i put the password in speachmarks and ran it again and somehting completly different happend.


Code:

root@bt:~# wpa_supplicant -Dwext -iwlan0 -c/root/networkconfig
WPS-AP-AVAILABLE
WPS-AP-AVAILABLE
oot@bt:~# wpa_supplicant -Dwext -iwlan0 -c/root/networkconfig
WPS-AP-AVAILABLE
WPS-AP-AVAILABLEWPS-AP-AVAILABLE
WPS-AP-AVAILABLE

what does this mean?

Roken 01-25-2012 07:37 PM

It means test if you have a connection.
Either open a browser or a new terminal. With browser, browse somewher, with terminal, ping somewhere


All times are GMT -5. The time now is 07:42 PM.