On Tue, 2009-03-10 at 18:50 -0700, Kevron Rees wrote: > > On Mon, 2009-03-09 at 04:09 -0700, Kevron Rees wrote: > > > > Answering myself, since I got no response here, ActivateConnection > > > > requires > > > that the connection you want to activate has been connected to in the > > > past. > > Am > > > I correct on this? You basically have to get the connection object from > > > the > > > org.freedesktop.NetworkManagerSettings ListConnections() method. From > > > that > > > list, you have to find the specific connection to use. You do so by > > > looking > > in > > > that path and the org.freedesktop.NetworkManagerSettings.Connection > > > interface > > > using the "GetSettings()" method. > > > > > > > > Correct me if i'm wrong, but if this is a new access point, you cannot > > connect > > > to it via dbus? Wouldn't a simpler: > > > > > > > > ActivateConnection(o: device, o: specific_object_to_connect_to) > > > > > > I responded on Saturday: > > > > > > http://mail.gnome.org/archives/networkmanager-list/2009-March/msg00082.html > > > > > > Let me know if you have any further questions! > > > > > > Dan > > > Thanks Dan! I didn't see the reply on Saturday. My mistake. Your example > is > very helpful. Is it possible to use a blank path ("/") as the connection if > this is a new connection and no settings are available yet?
Not quite. *Every* call to Activate requires a connection in the settings service. If you don't have a connection defined, a number of things won't work or get ugly, since there's no overall tracking object associated with that request. The Connection provides the human-readable name for that request like "Home" or "Work", plus a UUID that other processes can use to perform actions when the connection succeeds or fails. The normal process of connecting to a new AP would usually be to create a connection for that AP in the settings service, then request that NM activate the newly created connection. Dan _______________________________________________ NetworkManager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
