mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Add wifi scan page to networks module.
This commit is contained in:
1 parent
9b201a2daf
commit
c0cd01221e
4 files changed
+64
No files matched your search
@@ -235,3 +235,14 @@ def delete_connection(name):
|
||||
_('Failed to delete connection %s: '
|
||||
'Connection not found.') % name)
|
||||
conn.Delete()
|
||||
|
||||
|
||||
def wifi_scan():
|
||||
aps = []
|
||||
for dev in NetworkManager.NetworkManager.GetDevices():
|
||||
if dev.DeviceType != NetworkManager.NM_DEVICE_TYPE_WIFI:
|
||||
continue
|
||||
for ap in dev.SpecificDevice().GetAccessPoints():
|
||||
aps.append({'ssid': ap.Ssid,
|
||||
'strength': ord(ap.Strength)})
|
||||
return aps
|
||||
Reference in new issue
Block a user