Re: how to get scanned network strength over dbus

KeithG <[email protected]> Sat, 12 Apr 2025 15:59:04 -0500
Newsgroups dev.linux.lists.iwd
Message-ID <CAG17S_MPOSsmVoPaLNoOvANLEukG5THJsx9gVaP0xHpXYGnwFA@mail.gmail.com>
Denis,

Thanks for the help, but I figured it out. The script in the directory
'list-devices' illustrated how to do it.

aside:
Our UI is dependent on some of the output and format of some of the
connmanctl commands.
We wanted to remove that component and I was able to construct a
python script that mimics
'connmanctl services' and 'connmanctl services <service>'

This was able to get us going. I noted that the Pi boots significantly
faster without connman. We now use
systemd-networkd and iwd and have a python script working to start an
ap0 if the wlan0 disconnects
and then shuts it down if iwd reconnects to a known network.

Keith

On Sat, Apr 12, 2025 at 3:23 PM Denis Kenzior <[email protected]> wrote:
>
> Hi Keith,
>
> On 4/12/25 1:48 PM, KeithG wrote:
> > 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
>
> diagnostics is for the connected BSS (not network per se, there may be multiple
> BSSes in a network).
>
> > 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 you don't need to know the signal strength of individual BSSes, then
>                  array(on) GetOrderedNetworks()
>
> is what you want.  See doc/station-api.txt
>
>
> Regards,
> -Denis