Describe the issue
I was a bit confused that the value of signal variable of network section is not good when I have a good WiFi reception.
For example, when the output from iwconfig is
Link Quality=62/70 Signal level=-48 dBm
I expect signal to be consistent with this output like showing 88 (from 62 * 10 / 7) but the real value is 57 which indicates a not so good reception intuitively.
In the code, I found signal is calculated based on a range from -90 to -20. (code)
I believe there was a reason for this. But have things changed because of the transition to libnl and now the signal range is between -110 to -40? (some discussion, code). It seems the Link Quality of iwconfig is simply calculated based on this (62 = -48 + 110).
Expected behavior:
WiFi signal value be consistent with other tools, for example, iwconfig.
Actual behavior:
The signal is not consistent with other tools.
Was it working before?
N/A
To Reproduce
A minimal but complete config with which the problem occurs:
[bar/primary_bar]
modules-right = wlan
[module/wlan]
type = internal/network
interface = ${env:WIFI:}
interval = 1
format-connected = <label-connected>
label-connected = %signal%
Polybar Log
N/A
Screenshots
N/A
Environment:
- WM: N/A
- Distro: N/A
- Output of
polybar -vvv:
$ polybar -vvv
polybar 3.3.1
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard
X extensions: +randr (+monitors) -render -damage -sync +composite +xkb +xrm +xcursor
Build type: RelWithDebInfo
Compiler: /usr/bin/clang++
Compiler flags: -Wall -Wextra -Werror -pedantic -pedantic-errors -Wno-error=parentheses-equality -Wno-zero-length-array
Linker flags:
Additional context
N/A
Describe the issue
I was a bit confused that the value of
signalvariable ofnetworksection is not good when I have a good WiFi reception.For example, when the output from
iwconfigisI expect
signalto be consistent with this output like showing88(from 62 * 10 / 7)but the real value is57which indicates a not so good reception intuitively.In the code, I found
signalis calculated based on a range from-90to-20. (code)I believe there was a reason for this. But have things changed because of the transition to libnl and now the signal range is between
-110to-40? (some discussion, code). It seems theLink Qualityofiwconfigis simply calculated based on this(62 = -48 + 110).Expected behavior:
WiFi signal value be consistent with other tools, for example, iwconfig.
Actual behavior:
The
signalis not consistent with other tools.Was it working before?
N/A
To Reproduce
A minimal but complete config with which the problem occurs:
Polybar Log
N/A
Screenshots
N/A
Environment:
polybar -vvv:Additional context
N/A