Re: NM's DBus ActivateConnection clarification

On Fri, 2009-03-06 at 17:15 -0800, Kevron Rees wrote:
> per :
> ActivateConnection ( s: service_name, o: connection, o: device, o: specific_object )
> Can anyone give me an example of it's usage to connect a wireless device to an access point?  I know how to get the device object path, I know that the specific_object is the access point object path.  I'm confused however how to get the connection object path, and what the service_name should be.

The AP's object path (sent in 'specific_object') can be retrieved from
the list of AP object paths known to the wifi device, which is returned
from the GetAccessPoints() dbus method.  That method returns a list of
access point object paths, from which you can pick the specific AP you'd
like to connect to.  That AP should be compatible with the Connection
you send in 'connection' as well.  If you don't have a specific AP in
mind, pass "/" to indicate "none" (D-Bus doesn't have a concept of NULL,
so "/" fills that role for NetworkManager).

Connections are packages of all the config settings that are necessary
to describe the configuration of a specific network.  Everything that NM
connections to needs a Connection.  Connections can have names like
"Work" or "Home Wifi" or "T-Mobile".  Many of the settings (or most in
some cases) can be left as default and NM will ask for information when
it requires it.

Connections are provided to NetworkManager by a "settings service", of
which there are two:  the user settings service (usually nm-applet or
knetworkmanager or something else that runs in the users' session) and
the system settings service, which runs as root and stores persistent
connections that can be used at bootup and before login.  Most
embedded-type or MID/UMPC devices would want to use system settings
instead of user settings, because they generally don't do multiple

When you ask NM to connect to something, you pass it the D-Bus service
name of the settings service that provides the connection, and the
object path of that connection.  When connecting, NM then gets the
details it needs directly from that settings service.  nm-applet doesn't
store all the system Connections; instead it asks the system settings
service for them via D-Bus and displays them in the GUI menu just like
user-created Connections.

So a normal call by the applet to tell NM to connect to a system
Connection provided by system settings service would look something

ActivateConnection ("org.freedesktop.NetworkManagerSystemSettings",


> A couple examples on it's usage would be a boon.
> Thanks,
> -Kev
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org

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