Skip to content

Commit 8f17d80

Browse files
committed
Add an example that shows all visible SSID's
Based on a StackOverflow question
1 parent 3c0ae35 commit 8f17d80

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/ssids.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
Display all visible SSIDs
3+
"""
4+
5+
import NetworkManager
6+
7+
for dev in NetworkManager.NetworkManager.GetDevices():
8+
if dev.DeviceType != NetworkManager.NM_DEVICE_TYPE_WIFI:
9+
continue
10+
for ap in dev.SpecificDevice().GetAccessPoints():
11+
print '%-30s %dMHz %d%%' % (ap.Ssid, ap.Frequency, ap.Strength)

0 commit comments

Comments
 (0)