- Package:
- wireless-tools
- Source:
- wireless-tools
- Description:
- Tools for manipulating Linux Wireless Extensions
- Submitter:
- GloW
- Date:
- 2012-11-29 17:03:05 UTC
- Severity:
- important
i try to connect to a wep protected wireless access point.
with the folowing configuration :
auto wlan0
iface wlan0 inet dhcp
wireless-essid Intrawep
wireless-key 9638520741
wireless-mode managed
wireless-enc on
wireless-ap 00:0B:3B:3F:26:00
$ifup wlan0
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/00:24:8c:42:86:db
Sending on LPF/wlan0/00:24:8c:42:86:db
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
NO DHCPOFFERS recieved
No working leases in persistant databases - sleepeng
$iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"Intrawep"
Mode:Managed Access Point: Not-Associated Tx-Power=27 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:9638-5207-41
Power Management:off
but if I configure this way :
auto wlan0
iface wlan0 inet manual
$iwconfig wlan0 key '9638520741' mode managed essid 'Intrawep' enc on ap 00:0B:3B:3F:26:00
$dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/00:24:8c:42:86:db
Sending on LPF/wlan0/00:24:8c:42:86:db
Sending on Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.19 -- renewal in 34338 seconds.
$iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"Intrawep"
Mode:Managed Frequency:2.452 GHz Access Point: 00:0B:3B:3F:26:00
Bit Rate=36 Mb/s Tx-Power=27 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:9638-5207-41
Power Management:off
Link Quality=52/70 Signal level=-58 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
I see two differences here :
ifup begin by a DHCPDISCOVER
dhclient use DHCPDISCOVER only if DHCPREQUEST didn't succeed
but DHCPDISCOVER should work too
The second difference is the configuration of wlan0 wich seems to be incomplete,
mainly ap not configured
and other option wich i do not know if they are important or not.
i guess the problem must come from the pre-up script wireless-tools, i have still not investigated further.
please tell me if you experience the same problem, if so it is a serious problem in this package.
It work with the following configuration : auto wlan0 iface wlan0 inet dhcp pre-up ! ifconfig eth0 | grep 'inet addr' pre-up ifconfig wlan0 up;iwlist wlan0 scanning;sleep 2; pre-down ifconfig -v wlan0 down wireless-essid Intrawep wireless-key 9638520741 somehow it appears that to be associated with any access points i need to : 1. Know the access point mac adress trough a call to iwlist scanning, this call need the interface to be up first. 2. I need to wait two seconds to allow...ifup? to "receive" this information so it can be used. I guess it is not a bug in wireless tools so , but it make wireless-tools pretty unusable in /etc/network/interfaces. I add an hint for anybody with the same problem, if you seem to need multiple call (twice in my case) to ifup to be able to associate with any access points, it only meant that you need to WAIT, nothing else, before calling ifup.