Re: airport and wlan scan
On 25 Mar, this message from christophe barbe echoed through cyberspace:
> This seems to add the scan feature to the airport driver. I have yet
> to find a place with multiple wlan.
>
> The output looks like:
>
> ~$ iwlist eth1 scan
> Warning: Driver for device eth1 has been compiled with version 14
> of Wireless Extension, while this program is using version 15.
> Some things may be broken...
>
> eth1 Scan completed :
> Cell 01 - Address: 00:30:56:18:72:5A
> ESSID:"philly"
> Mode:Managed
> Frequency:2.412GHz
> Quality:14/92 Signal level:-80 dBm Noise
> level:-95 dBm Encryption key:off
[snip]
>
> Also I have no idea how to use iwlist without ifup the interface. I
> guess it is possible to start the wireless card, scan the available
> wlan and if one is present going forward by calling dhclient, but I
> have no idea on how to do that.
Hmm, shouldn't be too hard... let's see....
First, ifconfig up the interface (don't use ifup - you don't want all
the fancy config...). Then, use iwlist, and get a list of available
ESSID's to identify nearby networks. Based on some user-defined
heuristics, chose one of the networks that matches a list of available
and preconfigured WLAN configs (which then contains stuff like
encryption keys...). Use that as the backend script to ifup's 'mapping'
configuration (see man 5 interfaces).
Cheers
Michel
PS That sounds good... I can use somethig like this :-) I only need to
find a way to ifup the non-auto eth0 interface when configuring WLAN
(auto eth1) fails... any ideas?
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email mlan@cpu.lu |
http://www.cpu.lu/~mlan | Learn Always. "
Reply to: