Wireless AP "not associated" problem
Hello all
I have a NEWLINK USB pen wireless ethernet card connecting back to me wireless NETGEAR router. Card, and router, work fine on windows. Hardware is IBM thinkpad 6004, 160 MB Ram, 10 GB disk. OS = Knoppix 5.1 - kernel 2.6.19 I have set up wpa_supplicant, and assigned a manual address using the /etc/network/interfaces file. I have also set the default gateway. Here's the problem - I see 6 AP's with "iwlist wlan0 scan" - and no matter how many times i issue "iwconfig wlan0 essid <myessid>" is always reverts back to sating "Any" and the essid does not get set. Same goes for setting the AP of the NETGEAR router with "iwconfig wlan0 ap xxxxxxxx" - the setting is not preserved. The ESSID on the router is set to broadcast (i checked yesterday) I have to use "iwpriv wlan0 network_type g" to get the correct listing for the network, but this setting IS preserved. I have tried iwconfig mode wlan0 auto also. The output from dmesg shows no problems with recognising the usb wireless newlink adapter, and is able to recognise hotplug of the device. I see nothing unusual. I have been using "-Dwext " option for the startup of wpa_supplicant as the third party drivers produce a complaint about "WPA not supported" when i try and use them. I get no such message when using the "-Dwext" option, so I've stuck with that. Is is just that I need to perhaps select a new channel (other than 6) with "iwconfig wlan0 channel <number>" to try and isolate mine form the others visible in my street (the other 5) or is there something more fundamentally wrong you think ? I have to presume my wireless card is operational as it can "see" mine (and other) networks in the area - I just can't lock on to it. I have read many threads and so far I have done what I can - any advice appreciated. Thanks - Ian |
Your hardware seems to be working - I think you have an authentication problem. Make double-sure that you have the SSID correctly spelled, both on the AP and in your interfaces file
Here's the relevant part of my /etc/network/interfaces file: Code:
auto eth1 1] eth1 is my wireless interface, yours may be different, please double-check! 2] You may need to choose a different channel (same as your AP, obviously!) 3] 10.0.0.2 is the address of my modem/router/switch/AP 4] I have wpasupplicant installed 5] I like static IPs on my LAN, if you want dhcp make it look like this: Code:
auto eth1 ifdown eth1 ifup eth1 and (hopefully), you'll be connected..... |
Hi tredegar
Thanks - your example /etc/network/interfaces file is interesting. I am on knoppix (which I understand to be a debian based distro) - I also notice you have an entry for both "wpa-passphrase" and "wireless-key" in the /etc/network/interfaces file. I thought (perhaps incorrectly) that if you used WPA (in my case WPA-PSK) the wireless-key was not needed to be declared with "iwconfig" , but that the wpa-supplicant daemon took care of key exchanges via the wpa-supplicant.conf file ? Hmmm - if it is required that the key is declared in both those elements this could be my problem ? What I will try tonight is altering the channel / frequency of the AP broadcasts to make sure there is no kludge between them. I am still baffled though as when I have been issuing the "iwconfig wlan0 essid XXXXX" command and the shell prompt is accepted, but the output from later "iwconfig wlan0" commands does not show the essid I just declared. It's just being flatly ignored. This suggests that encryption has to be spot on first prior to attempting to connect to my chosen AP / essid. Out of interest - does your setup work without the "wireless-key s:mysecretphraseishere" entry in your /etc/network/interfaces file if you are using wpa_supplicant ? Thanks - Ian |
I do not have a wpa-supplicant.conf file, but it all works fine.
Quote:
Code:
# wireless-essid MywirelessAPName I do need these entries though: Code:
wpa-passphrase mysecretphraseishere Quote:
Code:
/sbin/iwconfig wlan0 mode managed channel 11 key restricted s:mysecretphraseishere essid MywirelessAPName Check that it is broadcasting the right ESSID |
OK -
One last q: Can you see your AP with the command iwlist eth1 scanning ? Yes, I see not only my AP, but another 5 from the neighbours also !. Thats why I was trying to issue "iwconfig wlan0 ap xxxxxxxxxxxx" to set my specific mac address for the AP (also the router/gateway) I have been looking at the "iwpriv" options I could supply (which so far I havent used many) and I will try tonight to experiment with these. I have not been declaring WEP key via the "iwconfig" command as per your example :- /sbin/iwconfig wlan0 mode managed channel 11 key restricted s:mysecretphraseishere essid MywirelessAPName This is simply because the PSK key gets defined in there /etc/wpa_supplicant/wpa_supplicant.conf, in a file that looks like this :- # WPA-PSK/TKIP ctrl_interface=/var/run/wpa_supplicant network={ ssid="Myessid" key_mgmt=WPA-PSK proto=WPA pairwise=TKIP group=TKIP psk="secret passphrase" } So tonight I will try and config using your exmaple, and also experiment a little with "iwpriv" commands, as in some distros I see you can declare the PSK key as an argument to "iwpriv" (amongst other settings). Will catch up with you tomorrow - thanks for assistance so far - I have no doubt that having spent several days with this so far :) Cheers - Ian |
Quote:
Quote:
Quote:
If you make your interfaces file look like mine (with the obvious eth0 / wlan0 substitutions) and it still doesn't work, may I suggest you post your file in its entirety, without editing out or changing your ESSID or passwords? There may be something simple that is wrong. I spent the best part of a week with some guy who was convinced his ESSID was correct and that linux was "broken" and then it turned out that he was using Rapid Falls (or something like that) as his ESSID, when in fact it should have been Rapidfalls. Security note: It is highly unlikely that anyone reading this is within 100m of you, and once you get it working, you can always change those security settings to something new. |
SOLVED - Wireless AP "not associated" problem
Hi Tredegar - SOLVED :) !!! :)
I made my /etc/nertwork/interfaces file look similar to yours :) - thanks I entered the "iwconfig wlan0 key restricted s:xxxxxxxxxxxx" and also set mode to "managed" along with the "ap_scan=1" option in my /etc/wpa_supplicant/wpa_supplicant.conf file (extract below) I launch the wpa_supplicant process via the /etc/network/interfaces file (as a quick and dirty startup) so it's activated with "ifup wlan0" accordingly. Amazingly, DHCP worked too (which staggered me) ! My prior downfall was presuming that the key statement was only required to be declared in the wpa_supplicant.conf file - Look like that's not the case. All I need to do now is work out the correct method for clean startup and shutdown of the wpa_supplicant process - I'll look on the forums and documentation later today. Thanks very much indeed for your help - muxch appreciated - now off to read up on clean startup/shutdown on process. Sample code used below :- Code : From /etc/network/interfaces :- allow-hotplug irda0 iface irda0 inet dhcp pre-up ifconfig irda0 up auto wlan0 iface wlan0 inet dhcp pre-up ifconfig wlan0 up pre-up sh /etc/wpa_supplicant/start.sh > /dev/null & # My script to start wpa_supplicant pre-up iwconfig wlan0 mode managed pre-up iwconfig wlan0 channel 6 pre-up iwconfig wlan0 essid "MyEssid" pre-up iwconfig wlan0 key restricted s:xxxxxxxxxxxx # xxxx= My key (WPA-PSK) pre-up iwconfig wlan0 ap 00:0F:xx:xx:xx:xx # My AP (gateway/router) pre-up iwpriv wlan0 network_type g allow-hotplug wlan0 allow-hotplug wmaster0 iface wmaster0 inet dhcp pre-up ifconfig wmaster0 up Code : From /etc/wpa_supplicant/wpa_supplicant.conf ap_scan=1 network={ ssid="myEssid" proto=WPA psk="mysecretphrase" key_mgmt=WPA-PSK pairwise=TKIP } |
It is working - Congratulations!
Quote:
|
Hi again tredegar
Many thanks for helping this problem get resolved - much appreciated. I'm not going to lose any sleep over auto startup and shutdown as you suggest ... life's too short ..... ;-) Have a good weekend ! cheers - Ian |
All times are GMT -5. The time now is 02:38 AM. |