RE: networkmanager control issue
- From: <Edward_Doong wistron com>
- To: <dcbw redhat com>
- Cc: networkmanager-list gnome org
- Subject: RE: networkmanager control issue
- Date: Thu, 18 Mar 2010 10:41:35 +0800
Dear Dan:
Thanks for your reply.
1. I had look over this spec. in few days.
Now, I can check my system network state. (
org.freedesktop.NetworkManager )
And I will try to get AP list from D-Bus. ( when I click icon that
will scan AP. Not always scan )
2. Yes, I will register another D-Bus that communication with UI.
So, my D-Bus will communication between UI & NetworkManager.
Because I want that UI just only have AP & PW for type.
Other networksecret, etc... don't choice by UI.
And is it "Feasible"?
BTW, I will change python language to C language. ( That let me
"crazy" )
Thanks
Edward
On Tue, 2010-03-16 at 10:52 +0800,
> Dear,
> I study network-manager 0.8 first time by myself.
> And I meet some issue. Now I use python & gtk+ language.
> I want to control all network interfaces in my window.
> What do I add D-bus script in my language,
> Like this :
> First window I can scan AP & choice.
NetworkManager periodically scans for you, though we're looking into
making a scan request call via D-Bus if you want updated AP lists more
often than every 2 minutes, which I suspect you'd be interested in.
You can get the list of all APs the devices sees via D-Bus; see the NM
D-Bus API spec here:
http://projects.gnome.org/NetworkManager/developers/spec-08.html
This allows you to ask NetworkManager for the AP list for a specific
wifi device and get each AP's details like signal strength and
encryption type.
> Second window I can type password.
NetworkManager doesn't quite operate like that; instead you have "saved
connections" (representing all the parameters needed to connect to a
specific network) that the user-interface applet provides to
NetworkManager via D-Bus. NM will only connect to APs that are
specified by these "saved connections". How you store that saved
connection is up to your applet; the GNOME nm-applet saves them in
GConf, the KDE networkmanager applet saves them in other ways. The
programs that provide this connection data to NM are called "settings
services".
So when you want to connect, your applet does the following:
1) do I have a saved connection that matches up with this access point?
If so, tell NM to connect to the AP using this saved connection.
2) If not, create a saved connection, tell NetworkManager that you've
created a new saved connection via D-Bus (see the system settings
interface documentation [1]), then tell NM that you want to connect to
the AP using that saved connection.
3) When the D-Bus ActivateConnection() call returns, it'll send an
"ActiveConnection" object back to you, which you can use to track the
status of the in-progress connection to the access point, and you can
show that progress in the UI.
If you want any other help or clarification, let me know.
Dan
[1]
http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.fre
edesktop.NetworkManagerSettings
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]