[collectd] Patch to make wireless plugin compatible to more drivers.

Florian Forster octo at verplant.org
Sat Jun 7 20:16:12 CEST 2008

Hi JoW,

On Fri, Jun 06, 2008 at 02:20:16AM +0200, xm at leipzig.freifunk.net wrote:
> I currently develop an embedded statistics application and web
> interface for OpenWrt Kamikaze based on Collectd and RRDTool.

oh, cool :)

> While working with the wireless plugin I noticed some
> incompatibilities with different drivers, namely the Broadcom
> proprietary driver and madwifi.

The problem is as follows: Linux used to have an unsigned 8bit integer
for each value which each driver could use as it pleased.  However, they
realized that this was an idiotic thing to do, so they switched to dBm.
However, apparently no one felt like updating all wireless drivers. So
they introduced a hack: A new bit in the structure now indicates whether
the byte contains an arbitrary number or a value in dBm +256 (because of
the unsignedness ;).

>    Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
>     face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 18
>       wl0: 0000    2.  179.  163.       0      0   8040    723      0        0

Obviously the Broadcom developers didn't do their homework well: They
got the values right, but forgot to set those flags. So the most elegant
thing would be for you to complain to them and for them to fix it by
setting those flags ;)

>   With the Broadcom proprietary driver you get the actual signal and noise
>   dbm units by substracting 255 from the values in /proc:

The kernel subtracts 0x100 == 256 instead of 255. Could you update your
patch to do that, too? I'll then gladly apply it to the 4.3 branch, so
that it'll end up in the next patch release.

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080607/e8d4fb5e/attachment.pgp 

More information about the collectd mailing list