BSSID string in wifiiw_linux module
This commit is contained in:
parent
cf81341fc9
commit
fe593a480e
|
@ -42,6 +42,8 @@ local function worker(format, warg)
|
||||||
return winfo
|
return winfo
|
||||||
end
|
end
|
||||||
-- string match is simple in most cases, because iw uses a new line for every info
|
-- string match is simple in most cases, because iw uses a new line for every info
|
||||||
|
winfo["{bssid}"] = -- BSSID has hex digits and colons
|
||||||
|
string.match(iwresult, "Connected to ([%x:]*)") or "N/A"
|
||||||
winfo["{ssid}"] = -- SSID can have almost anything in it until new line
|
winfo["{ssid}"] = -- SSID can have almost anything in it until new line
|
||||||
string.match(iwresult, "SSID: ([^\n]*)") or "N/A"
|
string.match(iwresult, "SSID: ([^\n]*)") or "N/A"
|
||||||
winfo["{mode}"] = -- everything after 'type ' until new line
|
winfo["{mode}"] = -- everything after 'type ' until new line
|
||||||
|
|
Loading…
Reference in New Issue