[pkg-wpa-devel] Re: Patch: Support for mapping scripts,
e.g. guessnet
Felix Homann
fexpop at onlinehome.de
Mon Aug 7 12:55:25 UTC 2006
Hi Kel,
On Monday 07 August 2006 14:15, Kel Modderman wrote:
> On Monday 07 August 2006 21:24, Felix Homann wrote:
>
> I cannot promise these as environmental vars, that would require Jouni to
> accept a patch, and the very reason the id_str was added was that SSID
> could not be used as a valid mapping in many cases because it may contain
> weird characters that cannot be used by networking tools.
Ah, I see. Then just forget about it, I'll use wpa_cli as I did before. It
also has the advantage that I don't need to modify the patch, I can just ask
for reconsideration.
> We can however, cludge around this by calling wpa_cli back on itself like:
>
> wpa_cli status | sed -n -e 's/^ssid=//p'
I'm using this:
wpa_cli -i"$IFACE" status | grep ^ssid
If you're interested I've attached the script I've included in my guessnet
patch. You can use as a guessnet test with one of the following lines in an
iface stanza:
test command test-command-wpacli bssid 01:02:03:04:05 ssid Network Name
test command test-command-wpacli bssid 01:02:03:04:0a
test command test-command-wpacli ssid Network Name
Letters in the BSSID have to be lower case, blanks in the SSID are allowed,
the BSSID has to preseed the ssid if both are present. You'll also have to
specify the path to test-command-wpacli.
If the patch would be accepted it could be called without "command".
> > This would also allow for a very simple script mapping by ssid: echo
> > $SSID.
>
> I need a bit more help to understand where this will fit into wpa_action.
It's not that important. I was thinking of
something like
========
...
wpa-mapping-script ssid-mapping.sh
iface ssid inet dhcp
...
=========
and
============
#!/bin/sh
# this is ssid-mapping.sh
echo $WPA_SSID
============
Just a bit of playing around ..
Kind regards,
Felix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-command-wpacli
Type: application/x-shellscript
Size: 1685 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-wpa-devel/attachments/20060807/631e599b/test-command-wpacli.bin
More information about the Pkg-wpa-devel
mailing list