Re: Multiple network to the same SSID with d-bus api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-06-12 at 23:14 +0200, Radoslaw Martyniszyn wrote:
> Hello,
> 
> In my application I would like to connect to a predefined AP 1
> (BSSID+SSID) or select any AP 2 with the same SSID in case default AP
> 1
> disappears or I cannot connect to it. I believe that could be
> achieved
> by the following config:
> 
> network={
>   ssid="theSameSSID"
>   bssid=00:11:22:33:44:55
>   psk="theSamePSK"
>   priority=1
> }
> 
> network={
>   ssid="theSameSSID"
>   psk="theSamePSK"
>   priority=0
> }
> 
> Could I use wpa_supplicant d-bus API to achieve above functionality?
> 
> I think I could achieve above functionality creating two instances of
> network fi.w1.wpa_supplicant1.Interface.AddNetwork. Network1 would
> contain SSID, BSSID, priority=1 while Network2 would
> contain SSID, priority=0. Next I would call
> fi.w1.wpa_supplicant1.Interface.SelectNetwork on Network1. Does my
> plan make any sense? Should wpa_supplicant connect to Network2
> automatically if there is no AP1? My initial test showed that
> wpa_supplicant do not connect to AP2 in case I turn off AP1, but I
> need to check that more deeply.

Yes, this is how it works.  You call AddNetwork and in response you
will get a unique D-Bus Object Path that represents the network.  The
Object Path is what you pass to the SelectNetwork and that allows you
to uniquely specify the network even if they have the same SSID.

If you do not select a specific network, the supplicant will auto-
select one for you.  It should respect the "priority" property.  But if
it's not, getting the "-dddt" output from the supplicant would be
useful.

Dan

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux