From 3890c691c2710d3e2ad619d0726afef7684e89a4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 10 Nov 2011 22:35:56 +0000 Subject: [PATCH] libiwinfo: show noise and snr in assoclist --- contrib/package/iwinfo/src/iwinfo.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/package/iwinfo/src/iwinfo.lua b/contrib/package/iwinfo/src/iwinfo.lua index 4a982dd99..811022052 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") -- 2.25.1