-
Notifications
You must be signed in to change notification settings - Fork 0
/
listaps.lua
31 lines (27 loc) · 951 Bytes
/
listaps.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-----------------------------------------------
--- Set Variables ---
-----------------------------------------------
--- AP Search Params ---
ap_list_cfg={}
--- Enter SSID, use nil to list all SSIDs ---
ap_list_cfg.ssid=nil
--- Enter BSSID, use nil to list all SSIDs ---
ap_list_cfg.bssid=nil
--- Enter Channel ID, use 0 to list all channels ---
ap_list_cfg.channel=0
--- Use 0 to skip hidden networks, use 1 to list them ---
ap_list_cfg.show_hidden=1
--- AP Table Format ---
--- 1 for Output table format - (BSSID : SSID, RSSI, AUTHMODE, CHANNEL)
--- 0 for Output table format - (SSID : AUTHMODE, RSSI, BSSID, CHANNEL)
ap_list_table_format = 1
-----------------------------------------------
--- Print Output ---
function print_AP_List(ap_table)
for p,q in pairs(ap_table) do
print(p.." : "..q)
end
end
--- Call Get AP Method ---
wifi.sta.getap(ap_list_cfg,ap_list_table_format, print_AP_List)
-----------------------------------------------