wpa_supplicant.: Simulating handoff between wifi's access points.
Carlos Patricio Amigo Haering
Wed Dec 19 12:05:25 PST 2012
Thank you for the reply Dan, your tips will be very useful, especially
about the roaming.
I'll upgrade my Ubuntu for use the "nl80211" for sure because i need
the best roaming's simulation as possible. Meanwhile i'm trying to learn
how use the supplicant but i'm still having problems in the simple task
of connect the client to the AP.
I did some changes because i couldn't do 'ifup my_static_lan'. This
give me several errors: "my_static_lan: ERROR while getting interface
flags: No such device" and "SIOCSIFNETMASK: No such device".
# cat /etc/wpa_supplicant/wpa_supplicant.conf
# cat /etc/network/interfaces
iface lo inet loopback
iface wlan0 inet static
# wpa_supplicant -B -Dwext -i wlan0 -c
# ifup wlan0
ssh start/running, process 13151
# ip addr show wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state
DORMANT qlen 1000
link/ether 00:1b:77:15:7d:d1 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.11/24 brd 192.168.1.255 scope global wlan0
inet6 fe80::21b:77ff:fe15:7dd1/64 scope link
valid_lft forever preferred_lft forever
# ping -c3 192.168.1.13 (trying to ping a iphone who is connected to
the same AP)
PING 192.168.1.13 (192.168.1.13) 56(84) bytes of data.
From 192.168.1.11 icmp_seq=1 Destination Host Unreachable
From 192.168.1.11 icmp_seq=2 Destination Host Unreachable
From 192.168.1.11 icmp_seq=3 Destination Host Unreachable
--- 192.168.1.13 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time
Now i have IP but still doesn't work. I don't know where is the
problem, i don't know if i'm doing something wrong or i'm having
problems because all is deprecated (my ubuntu and wext).
Note: I connect without problems two smartphones ( android and iOS)
using static IP to the AP and they can ping each other.
Thanks in advance.
El 2012-12-18 18:39, Dan Williams escribi?:
> On Tue, 2012-12-18 at 17:03 -0300, Carlos Patricio Amigo Haering
>> Hi everybody,
>> I'm working on a seamless handover but i don't want to walk long
>> distances with the client to trigger the handover so i need to
>> it. Basically i have two AP with the same SSID and different MAC and
>> want to disconnect a client from one of them to connect it to the
>> one. First i tried with iwconfig(iwconfig wlan0 ap <mac>) but this
>> not do nothing, apparently this tool it's deprecated.
>> Reading and asking, somebody told me about wpa_supplicant and i've
>> looking for some good tutorial but all of them are a little bit
>> and normally uses dhcp and my AP doesn't have dhcp server. Anyway
>> made something using a mix of info of internet but without good
>> indeed i can't connect the client to a AP yet. I hope that you help
>> to figure out what i'm doing wrong.
>> I'm using Ubuntu 10.10 with kernel 2.6.35-22-generic and a network
>> controller: Intel Corporation PRO/Wireless 4945ABG.
>> # ifconfig wlan0 down
>> # ifconfig wlan0 up
>> # iw wlan0 scan
>> BSS 20:aa:4b:48:7e:ca (on wlan0)
>> TSF: 3914550832 usec (0d, 01:05:14)
>> freq: 2462
>> beacon interval: 100
>> capability: ESS Privacy ShortSlotTime (0x0411)
>> signal: -15.00 dBm
>> last seen: 1500 ms ago
>> SSID: OF
>> Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
>> DS Parameter set: channel 11
>> ERP: Barker_Preamble_Mode
>> Extended supported rates: 24.0 36.0 48.0 54.0
>> RSN: * Version: 1
>> * Group cipher: CCMP
>> * Pairwise ciphers: CCMP
>> * Authentication suites: PSK
>> * Capabilities: 16-PTKSA-RC (0x000c)
>> WMM: * Parameter version 1
>> * BE: CW 15-1023, AIFSN 3
>> * BK: CW 15-1023, AIFSN 7
>> * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
>> * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
>> # wpa_supplicant -v
>> wpa_supplicant v0.6.10
>> Copyright (c) 2003-2009, Jouni Malinen <j at w1.fi> and contributors.
>> # cat /etc/wpa_supplicant/wpa_supplicant.conf
>> group=CCMP TKIP
>> pairwise=CCMP TKIP
>> Note: The psk= was the output of wpa_passphrase <ssid> <password>.
> Note that you can just put the passphrase here, in quotes:
> psk="my wifi network passphrase"
> and the supplicant will do the right thing.
>> # cat /etc/network/interfaces
>> auto lo
>> iface lo inet loopback
>> wpa-driver wext
>> wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
> With Ubuntu 10.10, you may want to continue using wext. However, if
> ever upgrade to newer versions, you'll most definitely want to use
> "nl80211" supplicant driver instead. wext, like iwconfig, is
> and you'll get better results from nl80211. These are just the
> API for wifi control that the supplicant uses to tell the wifi device
> what to do, and nl80211 is more flexible and better featured. It
> typically works better for roaming between access points.
>> iface my_static_lan inet static
>> address 192.168.1.11
>> netmask 255.255.255.0
>> network 192.168.1.0
>> broadcast 192.168.1.255
>> # wpa_supplicant -B -Dwext -i wlan0 -c
> As above, if you ever update to after 10.10, you'll want "-Dnl80211"
>> # ip addr show wlan0
>> 3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq
>> DOWN qlen 1000
>> link/ether 00:1b:77:15:7d:d1 brd ff:ff:ff:ff:ff:ff
>> inet6 fe80::21b:77ff:fe15:7dd1/64 scope link
>> valid_lft forever preferred_lft forever
> The supplicant only handles the wifi bits. Something else handles
> actual IP addressing. So if you just run wpa_supplicant, the
> will connect to the wifi and you'll have no IP address. You then
> to kick off whatever tool gets the IP address. Not specifically sure
> how that's supposed to work on Ubuntu, but it could be just "ifup
> my_static_lan" or something like that.
> Next if you're about to simulate roaming, look at the wpa_cli tool.
> want the "roam" command which lets you tell the supplicant to roam to
> access point of your choosing.
>> (Doesn't seem connected.)
>> # ping 192.168.1.13 (pinging a iphone connected to the same AP)
>> connect: Network is unreachable
>> As you see i don't have any error but the client is not associated
>> the AP. I really appreciate a little help.
>> thanks in advance.
>> HostAP mailing list
>> HostAP at lists.shmoo.com
More information about the Hostap