Re: How to get the ESSID of the active wifi network?
- From: Jonathan Haug <jonathanhaug wolke7 net>
- To: networkmanager-list gnome org
- Subject: Re: How to get the ESSID of the active wifi network?
- Date: Wed, 23 Mar 2011 06:57:26 +0100
> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]