Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-mod-dashboard: incorrect RSSI percentage #7355

Closed
1 task done
DragonBluep opened this issue Oct 26, 2024 · 4 comments
Closed
1 task done

luci-mod-dashboard: incorrect RSSI percentage #7355

DragonBluep opened this issue Oct 26, 2024 · 4 comments

Comments

@DragonBluep
Copy link

DragonBluep commented Oct 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

screenshots or captures

image

Actual behaviour

We are using this formula to calculate the RSSI value:

var q = 100 * ((bss.signal - bss.noise) / (-30 - bss.noise));

But some driver (e.g. mt76x02, rt2x00) doesn‘t support noise strength report. This will cause a wrong RSSI percentage.

phy0-ap0  ESSID: "PhantomXT-5G"
          Access Point: 
          Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 24 dBm  Link Quality: 43/70
          Signal: -67 dBm  Noise: unknown
          Bit Rate: 523.2 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: 14C3:7662 14C3:7662 [MediaTek MT76x2E]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy1-ap0  ESSID: "PhantomXT"
          Access Point: 
          Mode: Master  Channel: 1 (2.412 GHz)  HT Mode: HT40
          Center Channel 1: 3 2: unknown
          Tx-Power: 30 dBm  Link Quality: 44/70
          Signal: -66 dBm  Noise: unknown
          Bit Rate: 111.1 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [MediaTek MT7620]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

Expected behaviour

Do not show RSSI percentage or using some new formula to estimate the RSSI when noise is not supported. e.g. Assume noise is - 100 dBm.

Steps to reproduce

No need.

Additional Information

NAME="OpenWrt"
VERSION="SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt SNAPSHOT"
VERSION_ID="snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r0-0a289bf3"
OPENWRT_BOARD="ramips/mt7620"
OPENWRT_ARCH="mipsel_24kc"
OPENWRT_TAINTS="no-all busybox"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt SNAPSHOT r0-0a289bf3"
OPENWRT_BUILD_DATE="1729816766"

What browsers do you see the problem on?

Microsoft Edge

Relevant log output

No response

@DragonBluep
Copy link
Author

ping @systemcrash

@DragonBluep
Copy link
Author

And I suggest using -40 instead of -30 as the base offset. Usually -40dBm is already a very good signal. Maybe we also need to check if q > 100, then q = 100.

@DragonBluep
Copy link
Author

Another small issue about luci-mod-dashboard. The string "Transferred" can not be translated into the local language.
2024-10-26 130538

@systemcrash
Copy link
Contributor

So in the absence of a detected noise-floor, we default to an artificial noise floor of e.g. -90dBm. That should even out the calculations.

-40 is a reasonable suggestion, although -30 is the established practical, which would avoid weird numbers like %110 if you're right next to the SSID and cross the antennae over.

Ramon00 pushed a commit to Ramon00/luci that referenced this issue Oct 31, 2024
Closes openwrt#7355

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants