I'm writing a small little app that I want to submit to the Ubuntu App Review board, and one thing I'd like to do is for it to show the names of the detected Wireless SSIDs in a combo box. It's a PyGI app.
Has anyone got any pointers on how I can get those SSIDs from the system, preferably through a Python API? From dbus? From NetworkManager?
You can do this easily from NetworkManager's pygi bindings:
Or from DBus directly, see http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/show-bssids.py
If you're inclined to just quickly script this in shell; an easy way to ask NetworkManager for this is to use:
Or use iwlist scan, or better: iw dev wlan0 scan (or ... scan dump), after installing the iw package.
One option is to run
iwlist scan
on the command line, but it has to be run as root