Closed pony1k closed 5 months ago
It seems to me it could be a problem related to how this specific device is mapped inside openwrt, more than a libremesh issue:
This device share the same vr9_tplink_tdw89x0.dtsi with vr9_tplink_tdw8980.dts
It seems it was firstly an error of the manufacturer, fixed in: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=ec21c9821c5c8cb2ce7af68dbd497fe9c9c60667
Remanaged then in: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=4c8dd973ef8e76f9fc622f0baab981769c89b601 "Instead of disabling the drivers logic which would add the affected band and channels. It now disables all channels which are not within the specified frequency range."
Double check also these if you can: This is the history of the dtsi (after the renaming to soc_vendor_device): https://git.openwrt.org/?p=openwrt/openwrt.git;a=history;f=target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi;h=5b7c10bb9dd49b5a3959a8818015bee06ea93da4;hb=HEAD
This the history (before renaming to soc_vendor_device ) https://git.openwrt.org/?p=openwrt/openwrt.git;a=history;f=target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi;h=eabbc0257f92d8f37665cb7277295dff9a9fd98f;hb=de6dd7a8db1c073734113156668bca6792dc123d
So for me from it could be considered a normal behaviour in openwrt,
From the libremesh side, I would try to prevent libremesh from trying to configure both a 2.4GHz radio and a 5ghz radio
And I would try deselecting all 5ghz related configs from /etc/config/lime-default
and see if the 2.4GHz is up
# config lime-wifi-band '5ghz'
# list channel '48'
# list channel '157'
# option htmode 'HT40'
# option distance '10000'
# option adhoc_mcast_rate '6000'
# option ieee80211s_mcast_rate '6000'
Let us know if it is of any help
In /lib/wifi/mac80211.sh
(provided by kmod-cfg80211
), there is a function __get_band_defaults()
which is used by OpenWrt to correctly detect the wifi band of a phy. It just looks at the lines Band <x>
in the output of iw phy <phyname> info
, where <x>
is 1
for 2g and 2
for 5g. It ignores bands without enabled channels. Maybe LibreMesh could do the same?
Wow sounds good! We could "source" (execute) that file and use its function. No idea if this is easy to do in Lua...
In
/lib/wifi/mac80211.sh
(provided bykmod-cfg80211
), there is a function__get_band_defaults()
which is used by OpenWrt to correctly detect the wifi band of a phy. It just looks at the linesBand <x>
in the output ofiw phy <phyname> info
, where<x>
is1
for 2g and2
for 5g. It ignores bands without enabled channels. Maybe LibreMesh could do the same?
It seems wireless.is5Ghz
should be re-implemented on top of that function, @pony1k would you mind to make a PR for that?
;)
It seems
wireless.is5Ghz
should be re-implemented on top of that function
This would work for all radios except broadcom radios. As far as I understand, broadcom radios are not compatible with cfg80211 subsystem. For those radios /lib/wifi/broadcom.sh is used instead of /lib/wifi/mac80211.sh.
The best solution I can think of right now is to just look at the option band ...
in the config wifi-iface ...
, which is populated with the the value returned by __get_band_defaults()
.
edit
option band
is not reliable. OpenWrt 19 doesn't have it. broadcom.sh
doesn't produce it.
@pony1k are broadcom radios useful in libremesh usecases anyway? AFAIU they could be someway useful just in AP or Station mode, am I wrong?
TP-LINK TD-W8970
is a 2GHz only device, but lime-config configures the radio as 5GHz, which does not work. The cause of the problem is that inwireless.lua
the functionreturns
true
forradio0
. I investigated on why this is, like so:Interestingly it returns
true
fora
. Also interesting is the output ofiw phy phy0 info
:It looks like it supports 5Ghz, but is somehow 'disabled'. OpenWrt version is
22.03.5
. A workaround is to configure a 2.4GHz channel for the 5GHz band.