After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 119472 - link quality computation ?
link quality computation ?
Status: RESOLVED WONTFIX
Product: gnome-netstatus
Classification: Deprecated
Component: general
0.9
Other Linux
: Normal normal
: ---
Assigned To: Mark McLoughlin
gnome-applets Maintainers
gnome[unmaintained]
: 143560 150903 162728 325952 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-08-09 11:13 UTC by Fabrice Bellet
Modified: 2011-07-10 02:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
proposed patch to handle max_qual/avg_qual (4.06 KB, patch)
2004-07-05 10:59 UTC, Fabrice Bellet
none Details | Review
add wireless link range in gnome-netstatus-2.9.4 (8.31 KB, patch)
2005-02-23 16:01 UTC, Fabrice Bellet
none Details | Review

Description Fabrice Bellet 2003-08-09 11:13:55 UTC
Hello,

Is there a documented reason to the way the link quality is computed ?
(log (link) / log (92)) * 100.0 ?

Shouldn't avg_qual and max_qual from wireless.h be used instead ?
Comment 1 Seth Hadley 2004-05-08 04:13:38 UTC
92 seems to be a general recognized number for the max link by the companies but
nothing more.

I have a Netgear WG511, and its link quality at 100% is around 250, which makes
this applet stuck on CLAMP (+100%), and therefore I patch the formula myself.

If there is an avg_qual and max_qual, I hope it is considered.
Comment 2 Dennis Smit 2004-06-17 21:48:18 UTC
We'd love to use the avg_qual and max_qual values from wireless.h, however
I personally don't own a laptop, neither a wireless card so I since I won't
be able to test it I'm not going to start on it either. Fabrice do you
think you could possibly make a patch for this ?
Comment 3 Fabrice Bellet 2004-07-05 10:59:46 UTC
Created attachment 29231 [details] [review]
proposed patch to handle max_qual/avg_qual

Hello,

this patch adds a dependency with libiw from the wireless-tools. It computes a
percentage on the two distinct intervals [0 .. avg_qual] and [avg_qual ..
max_qual]. This idea is that the applet gives a 50% when the signal quality
equals avg_qual.

Note that _not_ all wireless drivers provide avg_qual. I tested on my prism2.5
card, with latest linux-wlan-ng driver : the avg value is 90, and the max value
is 92, the min is implicitely 0. So the range is rather distorded. I checked in
the linux-wlan-ng source code, and only max_qual is defined (with the expected
value of 92). I don't know where the value of 90 comes from. This one should
probably be considered as very unreliable.

So, another possibility is to just care about the max_qual value, and to simply
replace log(92) by log(max_link). Opinions ?

BTW, why use a log() to compute a percentage ? Is the signal quality supposed
to be in an exponential form ?
Comment 4 Mark McLoughlin 2004-08-04 09:12:17 UTC
*** Bug 143560 has been marked as a duplicate of this bug. ***
Comment 5 Mark McLoughlin 2004-08-04 10:56:49 UTC
Here's an interesting link on this topic:

http://www.wildpackets.com/elements/whitepapers/Converting_Signal_Strength.pdf

As far as I can make out, the current calculation is bogus and the link level is
meaningless without the max_qual figure. However, looking at the code for
various wireless cards they don't seem to report it at all.

This is a giant mess, I'm not sure what to make of it all yet :/
Comment 6 Luis Villa 2004-08-04 15:44:55 UTC
Mark- you might want to poke Joe Shaw and Robert Love on this; they've both
played around with this issue a bit lately.
Comment 7 Joe Shaw 2004-08-04 16:06:33 UTC
Mark: you've got it pretty much right.  In my experience with a handful of
drivers it's generally pretty safe to assume around 92 for max_qual.  The
drivers that work at all seem to hover around that range.  But a lot of drivers
are just broken and report wildly varying numbers or, more commonly, 0.

Like everything in the Linux wireless stack, it is a giant mess.
Comment 8 Jean Tourrilhes 2004-10-08 01:27:03 UTC
Hi everybody,

Sorry to jump in the middle of the discussion ;-)

IMHO, the patch Fabrice Bellet is the way forward and the only sane solution in
the long term. Maybe you could ignore avg_qual at least until things settle.

I personally see the problem as a chicken and egg problem. User space
applications don't use max_qual/avg_qual, therefore driver authors can't test
and don't bother with it, and consequently user space programmers can't rely on it.

I also would like to see it as a two way street. Driver authors don't know
a-priori what values would work best, especially for avg_qual. So, you guys
should tell the driver guys what you want to make your applet work.

It's actually fairly simple, the infrastructure is all there, we just need to
plug the numbers. Take your favorite wireless driver, go around the coverage
area, and check the qual indicator. Then, figure out what is the max and the
average. Then, send a patch to the driver author (the patch is absolutely
trivial). Bug him until he applies your patch in his driver. Repeat with the
next driver.

(For Mark) concerning Signal Strength conversion : This is exactly why the API
defines both a synthetic value (qual - 0->max) and absolute values (level&noise,
in dBm). With dBm, you can compare cards directly to each other without the need
for the max (well, this assume that dBm calculation is done properly in the
driver). On the other hand, qual was never supposed to be related to dBm, but
you can convert it to % using the max_qual. So, the current API offer both
solutions.

Jean
Comment 9 Danielle Madeley 2004-10-30 10:01:21 UTC
I'm pretty sure Fedora have now deprecated this applet in preference to
gnome-netstatus applet, I would like to follow suite in GNOME itself. There is
no need for two wireless monitoring applets (really, gnome-netstatus doesn't
need to be a separate module, but that's a different problem).

How does gnome-netstatus deal with this problem?
Comment 10 Mark McLoughlin 2004-11-10 08:56:21 UTC
gnome-netstatus uses the same formula and, hence, has the same problem
Comment 11 Danielle Madeley 2005-01-09 06:16:07 UTC
Since we are no longer shipping wireless-applet, I'm going to move this to
gnome-netstatus. I was hoping to get more wireless love into g-netstatus this
release cycle, but it's just not going to happen.
Comment 12 Fabrice Bellet 2005-02-23 16:01:39 UTC
Created attachment 37840 [details] [review]
add wireless link range in gnome-netstatus-2.9.4

. With this patch, the range is asked only one time in
netstatus_iface_monitor_timeout(), when iface->priv->is_wireless becomes TRUE.
. The standard range [0..92] is applied, if the avg value is zero, and the max
value is okay (eg, madwifi driver). A more adaptive possibility would be to
fall back to avg=max/2 in this case.
. A more simple patch could also consist in querying the range each time
netstatus_sysdeps_read_iface_wireless_details() is called. Cleaner code, but
more ioctl() intensive :-(
Comment 13 Mark McLoughlin 2005-03-14 15:01:14 UTC
*** Bug 150903 has been marked as a duplicate of this bug. ***
Comment 14 Daniel Holbach 2006-03-31 16:43:38 UTC
*** Bug 325952 has been marked as a duplicate of this bug. ***
Comment 15 Ali Ijaz Sheikh 2006-03-31 18:09:07 UTC
*** Bug 162728 has been marked as a duplicate of this bug. ***
Comment 16 Akhil Laddha 2011-07-10 02:43:46 UTC
gnome-netstatus development has been stalled [1]. Maintainers don't have
future development plan so i am closing the bugs as WONTFIX.

[1] http://mail.gnome.org/archives/desktop-devel-list/2011-June/msg00073.html