how to get scanned network strength over dbus
KeithG <[email protected]> Sat, 12 Apr 2025 13:48:09 -0500
| Newsgroups | dev.linux.lists.iwd |
|---|---|
| Message-ID | <CAG17S_NCdQ39dBaKtNdiF5yWcX=sgpppPxqhifM+Oik4o=s==A@mail.gmail.com> |
I am trying to get a listing of ssid Dbm values for my UI. I an trying
to write a python script to do that and ran across the ones in the iwd
directrory
https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/test
I copied get-diagnostics and ran it and it works for the conneced
network. How do I get the dBm values for all scanned networks?
# python3 get-diagnostics.py /net/connman/iwd/0/3
ConnectedBss : a6:2e:48:fd:9e:73
RSSI : -57 dBm
TxBitrate : 292500 Kbps
RxBitrate : 292500 Kbps
but I want this for all the scanned networks... Is this possible
across the dBus?
if I disconnect the network and try again, I get this:
# python3 get-diagnostics.py /net/connman/iwd/0/3
Traceback (most recent call last):
File "/root/bob/get-diagnostics.py", line 27, in <module>
diagnostics = device.GetDiagnostics()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
return self._proxy_method(*args, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 634,
in call_blocking
reply_message = self.send_message_with_reply_and_block(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotFound: No
matching method found
I get something similar if I put the ascii name of the network there as well:
# python3 get-diagnostics.py /net/connman/iwd/0/3/73706735_psk
Is there a way?
Keith