[Pkg-xfce-devel] Bug#527603: shown value for Link Quality is wrong
Hamish
hamish_b at yahoo.com
Fri Feb 25 13:05:28 UTC 2011
Package: xfce4-wavelan-plugin
Version: 0.5.5-3+b1
Severity: normal
Hi,
I put together a lovely detailed response to this bug but something went wrong and
it never made it into the BTS. and now I have to write it again and I have to
write it fast so it won't be as good. kind of a bummer.
(it never went beep-beep-beep though)
anyway- yes, I see the same thing from a poor connection at the opposite end of
the building where the signal is just on the threshold of dropping out (and often
does). Yet wavelan reports green+85% signal most of the time.
looking in the latest .orig.tar.gz code, I see in vi_linux.c a comment about
thanks to a google search and such for the method, but no other citation. I think
the authour has applied that wrong.
what is used is like (int)rint( log(qual) / log(max) * 100.), but I think the
correct calc would be without the two log()s. I've patched the deb-src locally and
rebuilt the package and now it matches what /proc/net/wireless and other X-widgets
like wicd-gtk report. the signal is yellow/red and at 40% like it should be!
I think what happened is that the author is reading the "link" quality metric,
which would appear to be a linear ratio (0-100%), but applying a method intended
for the "level" quality metric which comes after and is measured in dBm, which
is of course a logarithmic scale.
but even for dBm to compare the ratio of two values that you'd want to un-log()
them first, not re-log() them. so compare the ratio of 10^qual / 10^max. but
that's mostly academic as I think we don't even touch the dBm level in the
wavelan software.
in summary, to fix: remove the log()s, keep the rest.
regards,
Hamish
-- System Information:
Debian Release: 6.0
APT prefers stable
APT policy: (990, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/6 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
More information about the Pkg-xfce-devel
mailing list