Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.