LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2006, 03:28 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Wireless won't associate with AP with ndiswrapper


I've recently moved, and am without wired Internet for a couple of weeks. Since I need something for school, I'm using the wireless router my roommate has set up in the meantime. If I boot into Windows, I can easily type in the essid and key, and successfully connect to the network and browse the web. I'm trying to get it to work on Linux as well, and I'm using ndiswrapper and iwconfig (which I have gotten to work before with other, unsecured wireless networks).

I enable the module with ndiswrapper, and dmesg confirms everything is good so far. I then do:

Code:
iwconfig wlan0 essid "ESSIDHERE"
iwconfig wlan0 key KEYHERE
ifconfig wlan0 up
However, the essid field on wlan0 shown by "iwconfig" remains blank, and I can't connect to anything. I remember before that a blank field there means the system failed to associate itself with the access point, but I've tried moving the computer around, and it works fine with Windows, so I assume it's something else.

Since it worked with an unsecured network with the same configuration, I assumed my problem was in the encryption, so I've tried issuing the commands in different orders, doing "KEY", key, s:key, etc., and nothing works. Any idea what I'm doing wrong?

Thanks in advance.
 
Old 08-28-2006, 04:07 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Try leaving out the quotes (") around the SSID. So try

iwconfig wlan0 essid TheSSID

Also be sure you're root when running iwconfig.

Also, when you use iwconfig wlan0 key KEYHERE, KEYHERE has to be the hex version of the key. If you use s:KEYHERE, you use the text version of the key.

Finally, check that your mode is Auto or Managed.

If you're getting errors when you run iwconfig, post them. Also have a look in your log files and see if ndiswrapper is complaining.
 
Old 08-28-2006, 06:44 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Hangdog42
Try leaving out the quotes (") around the SSID. So try

iwconfig wlan0 essid TheSSID

Also be sure you're root when running iwconfig.

Also, when you use iwconfig wlan0 key KEYHERE, KEYHERE has to be the hex version of the key. If you use s:KEYHERE, you use the text version of the key.

Finally, check that your mode is Auto or Managed.

If you're getting errors when you run iwconfig, post them. Also have a look in your log files and see if ndiswrapper is complaining.
Thanks for all the suggestions, but I've already tried most of them. For the quotes, I read that they were supposed to be there, but I've tried it both ways, and neither works. I'm doing everything as root. The mode is Managed. No errors really coming up.

I'll look in my log files (well, where should I look, actually?). As far as hex vs. text, I believe I'm using the hex version (how many digits should it be for WEP?), but not 100% sure. When I try doing s:, I do get an iwconfig error, which I can't post at the moment since I can only get online with Windows. It says something about the operation failing. I'm also using ndiswrapper 0.8 (I almost wonder if the s: thing isn't supported or something), since that's what I originally had.

Any other ideas?
 
Old 08-28-2006, 09:24 PM   #4
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Just an update, if I try s: before something, it comes up with an invalid argument error message (same with anything starting with 0x), but I'm using just the hex code normally with key and that still doesn't work.
 
Old 08-29-2006, 12:47 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
The log files you should check are /var/log/syslog and /var/log/messages. You also might want to check the output of dmesg. I don't think that the version of ndiswrapper you're using is an issue (I use 1.10 which isn't that much later) and you can't move to the latest version until Slackware 11 comes out and gcc gets upgraded. Did the original compile go without any errors? How about when you installed the Windows driver?

You might also want to try removing and then re-installing the wireless tools package. As long as your syntax is correct, using s:Text should work. Also, your hex key shouldn't start with Ox, it should just be a alphanumeric string (and mine is 26 characters long).

Also double check that the Windows driver you're using is the one suggested by ndiswrapper. I have seen this kind of weird behavior from drivers that weren't entirely compatible with ndiswrapper.
 
Old 08-30-2006, 12:32 AM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Like I said before, using the same ndiswrapper and Windows drivers, I was able to use my current setup just fine to connect to unsecured networks several times in the past, so I don't think compiling or configuration are the problems. I'll look into a few of your other suggestions, though. Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Broadcom Wireless (BCM4306) Wireless problems: modprobe ndiswrapper freezes HP Laptop shthap3ns Linux - Hardware 11 02-11-2007 12:53 PM
Associate Wireless card with wlan0 Nixon Linux - Wireless Networking 12 12-16-2005 02:45 PM
how to associate wireless card with dedicated driver ssyy Linux - Newbie 1 03-16-2005 08:15 AM
how to associate wireless card with a dedicated driver ssyy Linux - Hardware 1 03-15-2005 07:21 PM
Wireless card only works under Kismet! Won't associate with my AP! Ima Sudonim Linux - Wireless Networking 2 12-26-2003 07:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration