New DBus API proposal - supplemental.

Nicola Mfb nicola.mfb
Sat Jul 11 19:22:11 PDT 2009

2009/7/12 Witold Sowa <witold.sowa at>:
> Hi,
> I received an email from supplicant user, asking how he could obtain which
> network and which BSSID supplicant is currently connected with. I realized that
> we cannot achieve it with old API or with the new one, but I think it would
> quite useful to have access to that information.
> I propose, that we could add two additional properties to the new API:
> I: fi.w1.wpa_supplicant1.Interface
> P: CurrentNetwork (read-only) -> o
> P: CurrentBSS (read-only) -> o
> or alternatively we could add a boolean property like "CurrentlyAssociated" to
> fi.w1.wpa_supplicant1.Interface.BSS and fi.w1.wpa_supplicant1.Interface.Network
> interfaces.
> wpa_supplicant structure already contains appropriate information (current_ssid
> and bssid fields), so implementation would be quite easy.
> What do you think about it?
> Witek.

Witold just invited me to join the mailing list to discuss about this
topic, I'm sorry if I will be not precise but I never digged in
wpa_supplicant deeply before.
I'm writing some sort of WiFi manager that drives wpa_supplicant with
dbus calls.
My application manages a set of "profiles" that are a custom name for
the network e.g. "Home network" plus a set of wpa_supplicant network
options and finally some sort of ip settings, eg. dhcp or static ip
and so on.
When the application starts it adds, sets and enables all the
configured network, so wpa_supplicant initiates scanning and when one
of them is available it associates and "completes".
I receive the status change dbus signal that alert me that a
connection was established but I have the problem I cannot recognize
the profile that was used (or at least the network dbus path from
which I can determinate the profile).
So I do not know if I have to start dhcp client or configure a static
ip and start the customized script I want for the network profile.

As a workaround I'm using ioctl calls to get the current sid or
current bssid and just "guess" the network profile I'm using.
But this informations is not sufficient, as I may have different
network profiles with the same sid. I know I may use the bssid to
distinguish them but in some cases it's not practicable. For example
my campus wds network uses the same sid over hundreds of AP.

So it may be nice to have some sort of CurrentlyAssociated properties
as suggested by Witold with the relative async dbus signal, and some
commodities methods to retrieve signal strenght, bssid, and other
properties to avoid using rtnetlink or ioctl.

P.s. using then standard legacy iface and tools it's possible to know
the connected network using the id_str property, this should be
exported in some way to the dbus iface.

Best Regards


More information about the Hostap mailing list