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-status: channel analysis shows more radios than expected on BPI R4 #7483

Open
1 task done
EPinci opened this issue Dec 18, 2024 · 10 comments
Open
1 task done

Comments

@EPinci
Copy link

EPinci commented Dec 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues

screenshots or captures

image

Actual behaviour

In OpenWRT 24.10-RC2+, using a BPI r4, the radio stack is not identified correctly in the status -> channel analisys page resulting in multiple detection of radios. Also channel analisys is misbehaving.

Expected behaviour

Expected behavior is 3 tabs, one per radio/band (as opposed to one per radio per band) as it was in earlier builds.
This started happening after the "option path" identifier has been changed for the BPI r4 radios.

Steps to reproduce

Just run a normal openwrt build on a BPI r4.

Additional Information

OpenWrt 24.10-SNAPSHOT r0-f0ff244 / LuCI openwrt-24.10 branch 24.351.75331~8b3c13f

What browsers do you see the problem on?

Microsoft Edge

Relevant log output

No response

@systemcrash
Copy link
Contributor

Could this be similarly related to symptoms we saw in #7482? What do you think @rmandrad ?

@EPinci
Copy link
Author

EPinci commented Dec 23, 2024

Repros also on 24.10.0-rc4.
Channel analisys does not show any data after scanning.

@hauke
Copy link
Member

hauke commented Dec 23, 2024

Which LuCI version are you using? Did you use the image from downloads.openwrt.org or did you use the image builder?
The Image builder might still use an older LuCI version.

For me it is working with this version:
Powered by LuCI openwrt-24.10 branch (24.357.59006~41cbd31) /[ OpenWrt 24.10-SNAPSHOT (r28210-654c9732dc)](https://openwrt.org/)

@EPinci
Copy link
Author

EPinci commented Dec 23, 2024

OpenWrt 24.10.0-rc4 r28211-d55754ce0d / LuCI openwrt-24.10 branch 24.357.59006~41cbd31 built from the branch.
Not working - empty channel graph.

@hauke
Copy link
Member

hauke commented Dec 23, 2024

hmm strange.

I used a Linksys E8450 (UBI) and accessed LuCi using Firefox.

@EPinci
Copy link
Author

EPinci commented Dec 23, 2024

On BPI r4, both Chrome and Edge, this is broken.

@rmandrad
Copy link
Contributor

I don't have 24.10 (using snapshot / my own build) however there have been changes both on mtk (by having a single physical device and "logical" radios using the following naming standard "phy.ap" and new ucode code that may be causing issues with luci (I actually noticed a new bug) however
@EPinci could you share your /etc/config/wifi ? otherwise use @hauke suggestion of using latest

@EPinci
Copy link
Author

EPinci commented Dec 24, 2024

My wireless config isn't super fancy:

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option radio '0'
        option band '2g'
        option channel '9'
        option htmode 'EHT20'
        option country 'IT'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'REDACTED'
        option encryption 'sae-mixed'
        option key 'REDACTED'
        option ocv '0'
        option ieee80211k '1'
        option ieee80211r '1'
        option mobility_domain 'REDACTED'
        option ft_over_ds '0'
        option bss_transition '1'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option radio '1'
        option band '5g'
        option channel 'auto'
        option htmode 'EHT160'
        option country 'IT'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'REDACTED'
        option encryption 'sae-mixed'
        option key 'REDACTED'
        option ocv '0'
        option ieee80211k '1'
        option ieee80211r '1'
        option mobility_domain 'REDACTED'
        option ft_over_ds '0'
        option bss_transition '1'

config wifi-device 'radio2'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option radio '2'
        option band '6g'
        option channel '81'
        option htmode 'EHT160'
        option country 'IT'
        option cell_density '0'

config wifi-iface 'default_radio2'
        option device 'radio2'
        option network 'lan'
        option mode 'ap'
        option ssid 'REDACTED'
        option encryption 'sae'
        option key 'REDACTED'
        option ocv '0'
        option ieee80211k '1'
        option ieee80211r '1'
        option mobility_domain 'REDACTED'
        option ft_over_ds '0'
        option bss_transition '1'

config wifi-iface 'guest'
        option device 'radio0'
        option mode 'ap'
        option ssid 'REDACTED'
        option encryption 'sae-mixed'
        option isolate '1'
        option key 'REDACTED'
        option network 'guest'
        option ocv '0'

also ToT of 24.10 doesn't seem to have any relevant commits on top of RC4 but I'll give it a try nevertheless...

@systemcrash systemcrash changed the title luci-mod-status: channel analisys showing too many radios luci-mod-status: channel analysis shows more radios than expected on BPI R4 Dec 24, 2024
@rmandrad
Copy link
Contributor

rmandrad commented Dec 24, 2024

so did some troubleshooting and I suspect the root cause is with iwinfo

the code is querying radio 0 via a rpc call to iwinfo

image

image

iwinfo radio0 info points to the 5Ghz radio (it should be the 2GHz radio)

the same for radio1
image

image

the same for the scan
image

so the rpc call should be against the interface like
iwinfo phy0.1-ap0 scan

radio0-2 always points to the 5GHz

@systemcrash
Copy link
Contributor

systemcrash commented Dec 24, 2024

Somewhere luci pulls this info. It gets the 'radios' here (radio0 etc), I think:

network.getWifiDevices().then(L.bind(function(data) {

which calls:

getWifiDevices: function() {
return initNetworkState().then(L.bind(function() {
var uciWifiDevices = uci.sections('wireless', 'wifi-device'),
rv = [];
for (var i = 0; i < uciWifiDevices.length; i++) {
var devname = uciWifiDevices[i]['.name'];
rv.push(this.instantiateWifiDevice(devname, _state.radios[devname] || {}));
}
return rv;
}, this));
},

So this depends entirely on what is already in /etc/config/wireless, per wifi-device.

Three radios, each capable of 3 spectra.

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

4 participants