开发者

How to find out the wireless authentication mode?

I'm trying to get the authentication mode (WPA/WEP) on all the available AccessPoints via DBUS API(in Linux). NetworkManager API 开发者_运维知识库describes a property WPAFLAGS but I don't get anything out of it (I get Null Flag everytime). D-Feet DBUS debugger also doesn't show anything. Am I missing something, or is the API broken?


Looks like you are doing something wrong:

$ dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/AccessPoint/995 org.freedesktop.DBus.Properties.Get string:'org.freedesktop.NetworkManager.AccessPoint' string:'WpaFlags'
method return sender=:1.1188 -> dest=:1.2189 reply_serial=2
   variant       uint32 324
$ dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/AccessPoint/994 org.freedesktop.DBus.Properties.Get string:'org.freedesktop.NetworkManager.AccessPoint' string:'WpaFlags'
method return sender=:1.1188 -> dest=:1.2190 reply_serial=2
   variant       uint32 332
$ dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/AccessPoint/991 org.freedesktop.DBus.Properties.Get string:'org.freedesktop.NetworkManager.AccessPoint' string:'WpaFlags'
method return sender=:1.1188 -> dest=:1.2191 reply_serial=2
   variant       uint32 276


What you posted returns:

dbus-send: Data item "method" is badly formed

I believe question was about:

interface.Get("org.freedesktop.NetworkManager.AccessPoint", "WpaFlags")

and it always returns 0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜