Using iwconfig
Hi
I finally got my ndiswrapper installed and also the wireless tools 26 so that I could run iwconfig etc... However, after a few hours I only managed to my wireless DLINK650+ to work a couple of times, i have been using iwconfig as per the doc to set:
My card only works some of the time. But my main questions are....since I am completely new to iwconfig is how does it work? where does it store the information/config? Does the order of the various iwconfig commands matter? If use pull the card out, are iwconfig commands lost? What state does the card need to be (from ifconfig) for commands to work? really sorry if i am asking too many questions but i'm pulling my hair out here trying to get the card to work... CK |
iwconfig
Hello
I am very new to linux Unfortunately I have to ask more questions instead of answering yours. I'm having the same problems. I am using an ndiswrapper... i can modprobe it and it comes up fine... then i run iwconfig wlan0 it shows the default settings for wireless connections.. Follow the same steps as cck23, and the card sees the wireless AP... and fills in the rest of the info... i bring the card up with ifconfig wlan0 up and it now shows when i do an ifconfig... but i lack an IP address. I can get one by running dhcpcd (which didnt come with Fedora Core2, i downloaded and installed it) and bam.. i'm online. but when i have to do this every time i start the computer. I've tried setting the connection in the system --> Networking --> and there i can add a new wireless card... and it shows wlan(0)(ndiswrapper) so i add that... and enter in all the settings there... but then if I try to activate the card i get this error: /sbin/ifup: line 60: 2440 Segmentation fault iwconfig $DEVICE key $KEY THEN¡K my computer hangs¡K at first I can still close stuff, but nothing else opens.. then it becomes altogether frozen.. and I have to hit the resart button¡K and I am filled with guilt as linux scolds me for not umounting the drives properly. Pretty sure I don¡¦t know what else to do. I¡¦ve gone under /etc/sysconfig/network-scripts/ifcfg-wlan0 The key wasn¡¦t in there.. .but the ESSID and CHANNEL.. and other such things were there.. added KEY=(then my hex key here) with VI¡Kand no luck.. same errors¡K any suggestions? And I have a question for you cck23, I¡¦d been working with mandrake 10 for a while, and that¡¦s the OS you have listed, I found that whenever I modprobe ndiswrapper, themachine would hang, do you get that problem? I was using ndiswrapper v0.8. but it always froze. Just wondering. Anyhow, looking to my linux gurus for some help :) THX Jopnick |
Hi there Jop,
I dont get the machine hanging when I modprobe, though earlier today I had problem with some KDE applications starting really slowly. I tried removing the wireless card and using linux without it and it was fine. However, I dont know if that just pure coincence as I have not repeated that excercise more than two times to see if it was the wireless card causing the slowness. though about 1/2 time I am able to get the wireless card to work. At the moment, it seems pot luck whether or not the card works. Hopefully I will have worked out what the problems are in a coupld of days and will repost. Have fun CK |
Quote:
Quote:
Quote:
Most, if not all, of these problems can be solved by adding the relevant commands to your /etc/rc.d/rc.local file. First modprobe ndiswrapper then add the needed iwconfig command. Finally you can issue a dhcpcd wlan0 (or dhclient wlan0, whichever works) and you should be up and running. By putting all of this in your rc.local it will get run every time you boot. Quote:
Quote:
|
Hi Hangdog,
i have the following problem when trying to use iwconfig commands: Error for wireless request "Set Encode" SET failed on device wlan0, operation not permitted. I have searched via google and found a few other people that have this problem but no one seems to have an answer. As a result of this, when I use iwlist to view the current settings, my key is not accepted so I cannot log on to the network. CK |
Quote:
|
I "su -" to root, and then run all my iwconfig commands as root user.
I did read somewhere that whatever user you run iw* commands as, you need permissions to certain files in /proc. However, when I look there there are loads of files there :( CK |
Well, the stuff you would be interested in would be in /proc/net. Everything there sould be owned by root and read only, except for the directories which should be readable and executable. There should be a file in here called wireless that has info about the card. There should also be a ndiswrapper directory and if you drop into it you should see a directory with your card (wlan0). That direcotry has files containing the various card settings. All those files are read only, but not by users, They are also owned by root.
Here is mine if you want to compare Code:
total 0 |
I'm beginining to think there is a bug. Someone else posted this on sourceforge as a bug.
All other iwconfig commands work, it just wont accept the following: iwconfig wlan0 key open 1234567890. CK |
Hey all
I formated and installed mandrake 10, just to see if i could get'er up in there, i tried uninstallng the ndiswrapper that was pressent but... I guess i dont know where it is to uninstall it... i tried : "urpme ndiswrapper" but i guess that only gets it if the program was installed via the RPM manager. all i know was that i wasnt able to start the ndiswrapper, or show anysigns of it being installed, but i know it was in there somewhere... anyhow... I got it to the point where it wouldnt hang but no luck getting wlan0 to show up.. even after i installed the driver in the ndiswrapper and modprobed it. mep.. waht can you do... so i, a quiter, went crawling back to Fedora :( cck23, when i was doing my iwconfig settings, for the key, i just used iwconfig wlan0 key xxxxxxxxxxxxxxxxxxxxx and that worked fine, it didnt need the open in there to figure out the network key type, i think specifying the essid and channel (which are the only 2 settings i do before iwconfiging in the WEP key) it finds the network alright and figures out most the settings just needs they key. then i just start the card with "ifconfig wlan0 up" and then get an ip with "dhcpcd wlan0" (for some reason after putting in teh key and activating the card... i dont grab an IP automaticly.. so i have to go and get one manually. but it works.. and i'm using linux on this card right now) Still having my first issue though about getting the card to work with ifup... other wise that error. you'd suggested quote:/sbin/ifup: line 60: 2440 Segmentation fault Obviously not good. Try setting the commands up in /etc/rc.d/rc.local. any suggestions as to what i should do in there... (i'm very new :) ) like a lines i should add. is that like a startup file? could i just enter then commands i normally issue to bring the cardup : modprobe ndiswrapper iwconfig wlan0 esside XXXX iwconfig wlan0 channel 7 iwconfig wlan0 key XXXXXXXXXXXX ifconfig wlan0 up dhcpcd wlan0 that gets me online.. but i would LOVE to have a script to it automaticly on startup |
Quote:
|
Hmm, I have now discovered that the problem is to do with setting the wep key. I used to be able to set it, but now i just get the error:
Error for wireless request "Set Encode" (8B2A) : SET failed on device wlan0 ; Operation not permitted. As a result, I cannot join wep enabled networks but I can join sucessfully wireless networks without wep. Any ideas please? There is only one other fly in the ointment and that's when I run the ndiswrapper -l command which gives me: Can't use string ("") as an ARRAY ref while "strict refs" in use at /usr/sbin/ndiswrapper line 324, <LS2> line 1. Though I dont know if this is a red herring. I would love any help with being able to set the wep key. CK |
OK, something must have changed on your system. Have you been playing around with the system at all? I suppose the other approach would be to recompile and re-install ndiswrapper. If you weren't getting those errors before it could be that something has become corrupted.
By the way, you are root when running iwconfig, aren't you? |
Yes - I thought something may have changed , though I do not know what. It was working one night and the following morning it refused to accept my wep key commands. If something changed, I can't think what.
At first i thought there were perhaps some 'stale' /proc stopping me from writting config info to the card...no luck there. I have now given up trying to get the card to work now. I have logged a support request with sourceforge, lets see what that brings up, fingers crossed. CK |
I've had luck with just the following, as far as setting up for WEP
iwconfig eth0 key 123456789 of course, using your own encryption key. I would suppose that wlan0 would work for you also...? Just my 2cents. Jerry |
All times are GMT -5. The time now is 08:10 AM. |