Jump to content

"iwconfig wlan0 essid" doesn't work? [solved]


Guest emptysquare
 Share

Recommended Posts

Guest emptysquare

Below you'll find a long listing of a bash session. The short version is this: I have my wireless card almost working, but my "iwconfig" commands have no effect. I can't change the essid, WEP key, or mode. Perhaps as a result, dhclient doesn't get any leases.

 

Mandrake 10.1 official on a Toshiba Portégé 7020CT, D-Link DWL-650 card.

 

[root@jdavislaptop wlan]# ndiswrapper -l
Installed ndis drivers:
netr33x	driver present, hardware present 
[root@jdavislaptop wlan]# iwlist wlan0 scan
wlan0     Scan completed :
         Cell 01 - Address: 00:06:25:24:D7:D3
                   ESSID:"WGENLAN"
                   Protocol:IEEE 802.11b
                   Mode:Managed
                   Frequency:2.437GHz
                   Quality:0/100  Signal level:-49 dBm  Noise level:-256 dBm
                   Encryption key:on
                   Bit Rate:1Mb/s
                   Bit Rate:2Mb/s
                   Bit Rate:5.5Mb/s
                   Bit Rate:11Mb/s
                   Bit Rate:33.5Mb/s
                   Bit Rate:39.5Mb/s
                   Bit Rate:38Mb/s
                   Bit Rate:42.5Mb/s
                   Bit Rate:38.5Mb/s
                   Bit Rate:39Mb/s
                   Bit Rate:41.5Mb/s
                   Extra:bcn_int=100
                   Extra:atim=0
[root@jdavislaptop wlan]# iwconfig wlan0 essid "WGENLAN"
[root@jdavislaptop wlan]# iwconfig wlan0 mode managed
[root@jdavislaptop wlan]# iwconfig wlan0 key restricted XXXX-XXXX-XX
[root@jdavislaptop wlan]# iwconfig wlan0
wlan0     IEEE 802.11b  ESSID:off/any  Nickname:"jdavislaptop.wgenhq.net"
         Mode:Auto  Frequency:2.437GHz  Access Point: 00:00:00:00:00:00  
         Bit Rate=11Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
         RTS thr=2432 B   Fragment thr=2432 B   
         Encryption key:off
         Power Management:off
         Link Quality:100/100  Signal level:-59 dBm  Noise level:-256 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[root@jdavislaptop wlan]# ifconfig wlan0 up
[root@jdavislaptop wlan]# iwconfig wlan0
wlan0     IEEE 802.11b  ESSID:off/any  Nickname:"jdavislaptop.wgenhq.net"
         Mode:Auto  Frequency:2.437GHz  Access Point: 00:00:00:00:00:00  
         Bit Rate=11Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
         RTS thr=2432 B   Fragment thr=2432 B   
         Encryption key:off
         Power Management:off
         Link Quality:100/100  Signal level:-59 dBm  Noise level:-256 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[root@jdavislaptop wlan]# dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/wlan0/00:05:5d:96:4f:3d
Sending on   LPF/wlan0/00:05:5d:96:4f:3d
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Link to comment
Share on other sites

iwconfig wlan0 key "restricted XXXX-XXXX-XX"

 

Try that. Also try:

 

iwconfig wlan0 ap 00:06:25:24:D7:D3

 

although you may not have to after adding the quotes around "restricted XXXX-XXXX-XX"

 

Don't know why it doesn't give you an error for the key command, though.

Link to comment
Share on other sites

Have you tried putting the necessary configs in a file instead? For this interface it would reside at

 

/etc/sysconfig/network-scripts/ifcfg-wlan0

 

(if it's not there you can create it)

 

Contents should be something like this:

 

DEVICE=wlan0

BOOTPROTO=dhcp

HWADDR=<your wifi card's MAC address>

ONBOOT=<yes/no, up to you>

WIRELESS_ESSID=WGENLAN

WIRELESS_MODE=Managed

WIRELESS_ENC_KEY=XXXXXXXXXXXXXXXXX <I don't use quotes for mine>

MII_NOT_SUPPORTED=yes

WIRELESS_HOSTNAME=jdavislaptop.wgenhq.net

NEEDHOSTNAME=yes

 

There might be something missing, but I'm not on my Linux right now. Will check later...

Link to comment
Share on other sites

Have you tried putting the necessary configs in a file instead? For this interface it would reside at

 

/etc/sysconfig/network-scripts/ifcfg-wlan0

 

(if it's not there you can create it)

 

Contents should be something like this:

 

<<snip>>

 

WIRELESS_ENC_KEY=XXXXXXXXXXXXXXXXX <I don't use quotes for mine>

 

<<snip>>

 

You also don't have an encryption key with a space in it like this:

 

restricted XXXX-XXXX-XX

Link to comment
Share on other sites

Guest emptysquare

Hey, guys. Thanks for all your replies, I've tried them all: putting the info my config file, entering the WEP key with no spaces or hyphens. Still, I can't change my wlan0 configuration. Is this maybe a driver problem? --maybe the driver's misconfigured, so iwconfig can't successfully change parameters? I'm using ndiswrapper with the drivers off the CD that came with the DWL-650.

Jesse

Link to comment
Share on other sites

Guest emptysquare

Whoopee!! It works now. My sysadmin told me to do

iwconfig wlan0 key s:XXXXXXXXXXXXX

and now it works.

 

What I hadn't known before is that setting parameters with iwconfig actually tries to connect to the network immediately. So, if I put in the wrong key, it has no effect because the driver tries & fails to connect with that key right now. Doing

iwconfig wlan0

gives me the state of the network. So now I understand its behavior.

 

Thanks for your help, guys! I'm now happily downloading & configuring Samba.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...