RE: How to get the ESSID of the active wifi network?

2011-03-22 Thread Jos Collin-ERS,HCLTech

> But before that I need another command to get the correct Devices
> number, i.e. it's /Devices/0 in my case.

Yes, you have to find the device object path for your case. You can start with 
the following two options.
1. Use GetDevices, find the appropriate wireless device and then call 
ActiveAccessPoint on that device.

2. Get the ActiveConnections property. Get the devices that are part of this 
active connection (Devices property). You will get the wireless device object 
path. Then call ActiveAccessPoint on that device and get the Ssid property.

Please understand that Ssid is not a property of a network interface/device in 
your computer. It is not so complicated. Please find the python samples.

http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python


Regards,
Jos Collin


> and:
> dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager
> /org/freedesktop/NetworkManager/AccessPoint/7
> org.freedesktop.DBus.Properties.Get string:org.freedesktop.NetworkManager
> string:ssid
>
> you'll get
> method return sender=:1.264 -> dest=:1.291 reply_serial=2
>variant   array of bytes "THE_SSID"
>

And after that I have to convert the array of bytes into a simple
string.

Man, I didn't excpect it such complicated. :)

Maybe I should stick with nm-tool and a bit of grep.
(iwlist or iwgetid isn't working for me, that's why I thought d-bus
could be my hero)
Thanks anyway for all your help, this is a great community!

Jonathan

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list

::DISCLAIMER::
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

---
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to get the ESSID of the active wifi network?

2011-03-22 Thread Jonathan Haug

> Use:
> dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager 
> /org/freedesktop/NetworkManager/Devices/1 org.freedesktop.DBus.Properties.Get 
> string:org.freedesktop.NetworkManager string:ActiveAccessPoint
> 

But before that I need another command to get the correct Devices
number, i.e. it's /Devices/0 in my case.


> and:
> dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager 
> /org/freedesktop/NetworkManager/AccessPoint/7
> org.freedesktop.DBus.Properties.Get string:org.freedesktop.NetworkManager 
> string:ssid
> 
> you'll get
> method return sender=:1.264 -> dest=:1.291 reply_serial=2
>variant   array of bytes "THE_SSID"
> 

And after that I have to convert the array of bytes into a simple
string.

Man, I didn't excpect it such complicated. :)

Maybe I should stick with nm-tool and a bit of grep.
(iwlist or iwgetid isn't working for me, that's why I thought d-bus
could be my hero)
Thanks anyway for all your help, this is a great community!

Jonathan

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Automatically restart OpenVPN Service

2011-03-22 Thread Kaushal Shriyan
Hi,

is there a way to automatically restart the openvpn session while i switch
to and fro from Wireless to Wired Network on Ubuntu Desktop 10.10 ?

Thanks

Kaushal
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Updated APN for El Salvador's Movistar

2011-03-22 Thread Jirka Klimes
On Tuesday 22 of March 2011 03:51:38 Mathieu Trudel-Lapierre wrote:
> Hi,
> 
> There was a report today on IRC, apparently there is a different APN
> to use for Movistar in El Salvador. This seems to agree with a quick
> search I did to verify the data. See the patch below.
> 
> """
> * celvin (~celvinriv@unaffiliated/celvin) a rejoint #nm
>  Hello
>  The APN of Telefonica(Movistar) in the Country provider of El
> Salvador is wrong, the correct is internet.movistar.sv
>  the password and user is not needed, but the correct is
> "movistarsv"  "movistarsv"
> * celvin est parti (Quit: Leaving.)
> """
> 
> Mathieu Trudel-Lapierre 
> Freenode: cyphermox, Jabber: mathieu...@gmail.com
> 4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
> 
> ---
> 
> diff --git a/serviceproviders.xml b/serviceproviders.xml
> index 5f5f222..2b0eeef 100644
> --- a/serviceproviders.xml
> +++ b/serviceproviders.xml
> @@ -5977,7 +5977,7 @@ conceived.
> movistar
> 
> 
> -   
> +   
> movistarsv
> movistarsv
> 
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list

Pushed:
22ce9e4d9a289d5c619458cf66c7fdf247b8aa80

Thanks!

Jirka
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to get the ESSID of the active wifi network?

2011-03-22 Thread Jirka Klimes
On Tuesday 22 of March 2011 13:59:47 Jos Collin-ERS,HCLTech wrote:
> Hello,
> 
> I believe that "the current network" is the one which is Active.
> 
> Replace /org/freedesktop/NetworkManager/Devices/eth1 with the object path
> of the ActiveAccessPoint. Then get the Ssid property of that
> ActiveAccessPoint.
> 
> Regards,
> Jos Collin
>

Yeah, correct.

Use:
dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager 
/org/freedesktop/NetworkManager/Devices/1 org.freedesktop.DBus.Properties.Get 
string:org.freedesktop.NetworkManager string:ActiveAccessPoint

You'll get:
method return sender=:1.264 -> dest=:1.290 reply_serial=2
   variant   object path "/org/freedesktop/NetworkManager/AccessPoint/7"

and:
dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager 
/org/freedesktop/NetworkManager/AccessPoint/7
org.freedesktop.DBus.Properties.Get string:org.freedesktop.NetworkManager 
string:ssid

you'll get
method return sender=:1.264 -> dest=:1.291 reply_serial=2
   variant   array of bytes "THE_SSID"

Jirka

PS: devices are not marked as eth1, etc., but with D-Bus paths 
/org/freedesktop/NetworkManager/Devices/

> ___
> From: networkmanager-list-boun...@gnome.org
> [networkmanager-list-boun...@gnome.org] On Behalf Of Jonathan Haug
> [jonathanh...@wolke7.net] Sent: Tuesday, March 22, 2011 5:38 PM
> To: networkmanager-list@gnome.org
> Subject: How to get the ESSID of the active wifi network?
> 
> Hi there,
> 
> I'm looking for a bash command to get the ESSID of the current network
> via d-bus.
> 
> I tried
> 
> dbus-send --system --dest=org.freedesktop.NetworkManager
> --print-reply /org/freedesktop/NetworkManager/Devices/eth1
> org.freedesktop.NetworkManager.getActiveNetwork
> 
> but this one seems a bit outdate. Im using Network Manager 0.8.1.
> 
> Any help for me?
> 
> Thanks in advance
> 
> Jonathan

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


RE: How to get the ESSID of the active wifi network?

2011-03-22 Thread Jos Collin-ERS,HCLTech
Hello,

I believe that "the current network" is the one which is Active.

Replace /org/freedesktop/NetworkManager/Devices/eth1 with the object path of 
the ActiveAccessPoint. Then get the Ssid property of that ActiveAccessPoint.

Regards,
Jos Collin

From: networkmanager-list-boun...@gnome.org 
[networkmanager-list-boun...@gnome.org] On Behalf Of Jonathan Haug 
[jonathanh...@wolke7.net]
Sent: Tuesday, March 22, 2011 5:38 PM
To: networkmanager-list@gnome.org
Subject: How to get the ESSID of the active wifi network?

Hi there,

I'm looking for a bash command to get the ESSID of the current network
via d-bus.

I tried

dbus-send --system --dest=org.freedesktop.NetworkManager
--print-reply /org/freedesktop/NetworkManager/Devices/eth1
org.freedesktop.NetworkManager.getActiveNetwork

but this one seems a bit outdate. Im using Network Manager 0.8.1.

Any help for me?

Thanks in advance

Jonathan

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list

::DISCLAIMER::
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

---
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


How to get the ESSID of the active wifi network?

2011-03-22 Thread Jonathan Haug
Hi there,

I'm looking for a bash command to get the ESSID of the current network
via d-bus.

I tried

dbus-send --system --dest=org.freedesktop.NetworkManager
--print-reply /org/freedesktop/NetworkManager/Devices/eth1
org.freedesktop.NetworkManager.getActiveNetwork

but this one seems a bit outdate. Im using Network Manager 0.8.1.

Any help for me?

Thanks in advance 

Jonathan

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How do I create a new wifi connection with nmcli?

2011-03-22 Thread Jirka Klimes
On Sunday 20 of March 2011 19:07:52 Leonardo Ferreira Fontenelle wrote:
> Em Dom, 2011-03-20 às 13:45 -0300, José Queiroz escreveu:
> > AFAIK,  there's no way to ***create*** a connection in nmcli, only to
> > ***activate*** or ***deactivate*** it.
> 
> Thanks!
> 
> Enhancement requested:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=645318
> 
> Cheers,

Actually, the support is planned to be added for some time. But it is a bit 
problematic for 0.8.x, because of user connections.

With 0.9 everything is simplified, and this usecase is much easier due to 
AddAndActivateConnection() D-Bus call.

Nevertheless, thanks for the report.

Jirka
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list