LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 07-01-2004, 10:54 AM   #1
cck23
Member
 
Registered: Jun 2004
Location: Surrey, UK
Distribution: Mandrake 10 Download
Posts: 73

Rep: Reputation: 16
iwconfig help


Hi

Some of you may already know that I have been posting in this forum for help on wireless network so sorry about sending another on, however...

I finally have it working but with the following workaround:

1. Boot up Mandrake Laptop with DLINK 650+ plugged in
2. Su -
3. iwconfig wlan0 key open 01233456789
4. If I type "iwlist wlan0 key" quickly i see:

Code:
# iwlist wlan0 key
wlan0     2 key sizes : 40, 104bits
          4 keys available :
                [1]: 0797-0067-06 (40 bits)
                [2]: off
                [3]: off
                [4]: off
          Current Transmit Key: [1]
          Security mode:open
So it's looking good BUT....wait a second or two later and it becomes

Code:
# iwlist wlan0 key
wlan0     2 key sizes : 40, 104bits14:45:32.066415    wlan0    Encryption key:****-****-**   Security mode:open
14:45:32.067797    wlan0    Encryption key:****-****-**   Security mode:open
14:45:32.068085    wlan0    ESSID:"ckwireless"
          4 keys available :
                [1]: off
                [2]: off
                [3]: off
                [4]: off
          Current Transmit Key: [1]
So the key has disappeared.... , the following might explain why....

If i use iwevents i notice the following when i first try to iwconfig the card:

14:45:32.067797 wlan0 Encryption key:****-****-** Security modepen
14:45:32.068085 wlan0 ESSID:"network"
14:45:34.138025 wlan0 Encryption keyff
14:45:34.138088 wlan0 ESSIDff/any

No Matter what i do now, the card wont work, as you see, two seconds after i did the iwconfig, something has reset what i did

If I pull the card and re-insert, I get the following:

14:45:46.230432 wlan0 Encryption key:****-****-** Security modepen

So, this time around, nothing has reset my iwconfig commands and now it works.

So my question after all that, is what could be setting essid to "any" and enc to "off".

Thanks

CK

Last edited by cck23; 07-01-2004 at 10:56 AM.
 
Old 07-03-2004, 12:09 PM   #2
jopnickcon
LQ Newbie
 
Registered: Jun 2004
Posts: 13

Rep: Reputation: 0
hey cck23

i'm back to help, not steal. I actually ended up going back to mandrake 10, and have been running into all the problems you seem to be running into. but i was able to get everything up and working here. i was having trouble with the key dropping a second later too. this is what i ended up doing.. ( and it worked, i'm not sure why, but my comptuer bootsup online now )

i ended up doing these commmands and then it would keep the key

modprobe ndiswrapper
iwconfig wlan0 essid Knutserver
iwconfig wlan0 channel 7
iwconfig wlan0 enc F09AACAC50936C58A93E153546
iwconfig wlan0 key F09AACAC50936C58A93E153546 ( iknow those lines seem redundant, but i got no errors AND it ended up keeping the key in there)
ifconfig wlan0 up
dhcpcd wlan0 <---- ( the dhcpcd command i had to go to install software under drakerpm and acutally install that package off the CD, the dhcpcd i got of the net didnt seem to work with mandrake, and that was the only way i could seem to get an ip w/o any issues, dhclient wasnt working)



vi /etc/rc.d/rc.local ---> and added the commands above but with thier directory extensions so that it woudl find them on boot to look like this:


#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.


/sbin/modprobe ndiswrapper
/sbin/iwconfig wlan0 essid Knutserver
/sbin/iwconfig wlan0 channel 7
/sbin/iwconfig wlan0 enc F09AACAC50936C58A93E153546
/sbin/iwconfig wlan0 key F09AACAC50936C58A93E153546
/sbin/ifconfig wlan0 up
/sbin/dhcpcd wlan0

[ -f /etc/sysconfig/msec ] && source /etc/sysconfig/msec
[ -z "$SECURE_LEVEL" ] && SECURE_LEVEL=3
[ -f /etc/sysconfig/init ] && source /etc/sysconfig/init
if [ $SECURE_LEVEL -lt 4 ]; then
[ -z "$REWRITEISSUE" ] && REWRITEISSUE=rewrite
if [ $SECURE_LEVEL -lt 3 ]; then
[ -z "$REWRITEISSUENET" ] && REWRITEISSUENET=rewrite
fi
fi

All that stuff under the last line /sbin/dhcpcd wlan0 was already in the file, i just left it there to show where i stuck my scripts

( one more word... the first time i ran dhcpcd, it got some wierd warning.. somthing about not being able to find an .exe? but it worked fine.. it gets the ip and holds it.. i've not dropped connnection 1x.. which is WAY more then i could say for windows netowrking)

Anyhow, let me know if that helps any

Jopnick
 
Old 07-03-2004, 05:11 PM   #3
cck23
Member
 
Registered: Jun 2004
Location: Surrey, UK
Distribution: Mandrake 10 Download
Posts: 73

Original Poster
Rep: Reputation: 16
Hi Jopnickon,

thanks for you kind email I did try your suggestions but unfortunately it didn't work for me, I still notice through using iwevents that something is switching enc/key to "off". One day I will find out what it is then i will let you know . Anyway, my workaround described above is OK for now, it's not great, but at least I get Linux on wireless which I am really happy about. When enough of us use linux maybe real drivers will be released, but then where is the fun and challenge in that

Seeya around Jop...
 
Old 07-03-2004, 05:59 PM   #4
crazibri
Member
 
Registered: Mar 2004
Location: Orange County, CA
Distribution: OS X, SuSE, RH, Debian, XP
Posts: 377

Rep: Reputation: 31
Hi,
Have you tried connecting to your router w/o the encryption setup at all? Do you have the same issue?

You can also check out your ifcfg-wlan0 to see what configuration is setup for when you do ifup wlan0.

I had to add a couple lines to that when I wanted to get my wlan0 working correctly for Suse9.1.

Let me know if that helps at all.
Good luck!
 
Old 07-05-2004, 04:51 AM   #5
cck23
Member
 
Registered: Jun 2004
Location: Surrey, UK
Distribution: Mandrake 10 Download
Posts: 73

Original Poster
Rep: Reputation: 16
hi All

I cracked it finally. in answer to your question Crazibri, i did have enc off at the router as a test and always knew that without enc it worked but obviously that isnt good so i was determined to get it working with enc on

Anyway, I found what was resetting my iwconfig commands as explained above in my first post of this thread:

On Mandrake 10 at least, the following

/etc/sysconfig/network-scripts/ifup-wireless

was being run whenever I ran iwconfig commands. The reason that key was being switched off and essid was being set to any was because at boot time, those variables (i.e. KEY and ESSID) did not exist. Well to get around that i added these variables to network file:

# cat /etc/sysconfig/network
NETWORKING=yes
KEY=1234567890
ESSID=ckwireless

Now if I automate the iwconfig commands by adding them to /etc/rc.local i get wireless whenever i go into linux, cooooooool

Im going to add these to WiKi
 
  


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
where does iwconfig get these? linuxhippy Slackware 2 04-18-2005 01:16 AM
iwconfig xcoaster1 Linux - Wireless Networking 15 04-03-2005 07:02 PM
iwconfig jp_ Linux - Wireless Networking 1 03-24-2005 12:59 AM
iwconfig help cucolin@ Linux - Wireless Networking 3 03-07-2005 12:59 PM
iwconfig help houston1981 Linux - Wireless Networking 3 12-09-2004 07:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 04:52 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