diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-10 22:35:56 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-10 22:35:56 +0000 |
commit | 3890c691c2710d3e2ad619d0726afef7684e89a4 (patch) | |
tree | ffe37cd80e1f1230dcf3f7d15be7bcb0cb22198b /contrib/package/iwinfo/src/iwinfo.lua | |
parent | c67d7b2a435d392afacc49f7d9f3e08a240e98b2 (diff) |
libiwinfo: show noise and snr in assoclist
Diffstat (limited to 'contrib/package/iwinfo/src/iwinfo.lua')
-rwxr-xr-x | contrib/package/iwinfo/src/iwinfo.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/package/iwinfo/src/iwinfo.lua b/contrib/package/iwinfo/src/iwinfo.lua index 4a982dd994..811022052b 100755 --- a/contrib/package/iwinfo/src/iwinfo.lua +++ b/contrib/package/iwinfo/src/iwinfo.lua @@ -140,11 +140,13 @@ end function print_assoclist(api, dev) local iw = iwinfo[api] local al = iw.assoclist(dev) + local ns = iw.noise(dev) local ai, ae if al and next(al) then for ai, ae in pairs(al) do - printf("%s %s dBm", ai, s(ae.signal)) + printf("%s %s dBm / %d dBm (SNR %d)", + ai, s(ae.signal), ns, n(ae.signal) - ns) end else print("No client connected or no information available") |