BSSID in vicious.widgets.wifiiw
This commit is contained in:
parent
b8afc3aafc
commit
ca075d0c8e
|
@ -538,7 +538,7 @@ vicious.widgets.wifi, but uses `iw` instead of `iwconfig`).
|
|||
Supported platforms: GNU/Linux.
|
||||
|
||||
* Argument: the network interface, e.g. `"wlan0"`
|
||||
* Returns a table with string keys: `${ssid}`, `${mode}`, `${chan}`,
|
||||
* Returns a table with string keys: `${bssid}`, `${ssid}`, `${mode}`, `${chan}`,
|
||||
`${rate}` (Mb/s), `${freq}` (MHz), `${linp}` (link quality in percent),
|
||||
`${txpw}` (transmission power, in dBm) and `${sign}` (signal level, in dBm)
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ function wifiiw_linux.async(format, warg, callback)
|
|||
local winfo = {}
|
||||
|
||||
local function parse_link(stdout)
|
||||
winfo["{bssid}"] = stdout:match"Connected to ([%x:]*)" or "N/A"
|
||||
winfo["{ssid}"] = stdout:match"SSID: ([^\n]*)" or "N/A"
|
||||
winfo["{freq}"] = tonumber(stdout:match"freq: (%d+)" or 0)
|
||||
winfo["{sign}"] = -- Signal level can be negative; w/o unit (dBm)
|
||||
|
|
Loading…
Reference in New Issue