-
Notifications
You must be signed in to change notification settings - Fork 346
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
mt76 TX power not working in multiple chipsets (mt7610, mt7613, mt7615, mt7603) #633
Comments
I extracted stock firmware (Archer c2) and see that it doesn't use eeprom power values. It use values from file |
I think these values are from db.txt file and we have it already so we can use that file instead wrong places in eeprom which sometimes leads to too much txpower or too little. Values from wireless-regdb - db.txt are exactly the correct values for all countries and domains. |
I'm not sure reg-db.txt should be used. I mean, while it correctly specifies the maximum power allowed for a given region, it might be greater than the radio supports. I mean, let's say 30dBm is allowed for a given region/frequency. But the radio of a given device supports a maximum of 23dBm, for example. This way, will setting the TX power for this radio to 30dBm damage it? |
I think such devices would not be allowed the be imported in your country. |
That's not how things work in real life. Most manufacturers use a single hardware design for their devices which are sold globally. The TX power and other regulation constraints (such allowed frequencies and DFS channels) are limited by the firmware, not by the hardware. That's why there are "US" firmware, "EU" firmware and so on. BTW, that's beyond the point of this bug report. The issue reported here concerns MT76 driver and make it work according to the TX power which is allowed per region configured in OpenWRT. |
As I see, stock firmwares calculate power for 5G based on value MT_EE_5G_TARGET_POWER. And adjust tx power using SingleSKU_5G_FCC. |
I think these values is not from wireless-regdb. The wireless-regdb has only max power values for frequencies. But SingleSKU_5G_FCC has power table considering power per rate. |
This file from RE200. As you see, it has other values than Archer c2 |
To follow this ticket |
It is possible to specify own eeprom in openwrt for each device in dts file. see: #567 I also did some research about my tp link vr200v with mt7610e. power was low with default openwrt firmware. I managed to edit the right vals in eprom to use the correct txpower. Works good, but this is a hack and no fix since we cannot enable one power limit for all mt76 devices and patching dts file for every device is also not the right way. |
It is impossible for some devices. As I understand, dts info stored in uboot (correct me if I'm wrong). For example, we can't replace uboot for archer c2. It should be original for this device. As I wrote, stock router doesn't use values from eeprom. It use values from the SingleSKU_5G_FCC file, placed in /etc/ and value MT_EE_5G_TARGET_POWER from eeprom as upper txpower limit. |
SingleSKU does not override EEPROM, it only limits the txpower. |
In mediatek driver for the txpower they use EEPROM_MT76x0_5G_TARGET_POWER for 5G
In the mt76 we get the txpower from eeprom MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE when tssi is disabled -
In archer c2 eeprom offset MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE = 0x76
and value EEPROM_MT76x0_5G_TARGET_POWER = 0x1c As you can see EEPROM_MT76x0_5G_TARGET_POWER is bigger then any values from MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE. In result we have lower power with mt76. Yes, SingleSKU does not override EEPROM and it is used for limits power per rate. As I understand, incorrect power per rate is not good and we need to use oem SingleSKU values for calculate correct power per rate. Is it right? |
Maybe I haven't been clear. The mediatek driver set only one byte of TX_ALC_CFG_0 from MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE in MT76x0_ChipSwitchChannel
Higher byte set to 0. It is not clear for me. Why? Or maybe I see wrong sources) I got it here https://github.com/zaccareal/openwrt-archer-c2/blob/master/package/mediatek/drivers/mt7610e/src/chips/mt76x0.c |
same issue for me too on my tplink archer c20 v4 any way I can fix this? |
@Devmax21 I am on the same boat and would like to thank you for sharing your findings. I have a TP-Link RE220v2 with OpenWrt 21.02.1 r16325 installed and my tests show OpenWRT's MTK driver sets TX power large enough for the U-NII-3 band channels (149-165); however, it sets extremely low TX power for U-NII-1 and U-NII-2A band ones. In just apart 5 meters away from each other and I can see the connection becomes unstable. I tried both channel 36 and 64, and they are barely usable. Because at least the TX power for U-NII-3 band seems to be large enough, perhaps we can take a look on that part and decide how to fix the mid/lower band TX power. |
If I am reading correctly, most comments in this discussion are related to eeprom.c and the options to make it read the correct TX power limits for various mt76 devices. While this is an actual defect and it must be fixed for multiple devices (as I mentioned I have this issue with a RE200 v2 device), I would like to bring the attention to the fact that there is other issue at play here. For example, even if reading the TX power is fixed, it may not work since the code to set the TX power seems also not be working. I did some thorough tests with the Archer C6 v3.2, the results are here: https://forum.openwrt.org/t/mediatek-mt76-ignoring-wi-fi-tx-power-configuration/106788 As you will be able to see, I was trying to reduce the TX power to troubleshoot some overlapping areas and to improve 802.11r. However changing the TX power has no effect at all. So just fixing the TX power reading in eeprom.c might not fix this issue at all if the driver cannot configure the radio with intended TX power. |
mark. |
I got access to console via telnet on Archer c2 with stock firmware and see that power values looks almost the same as on mt76 Stock -
mt76 - use delta from EEPROM (-1)
I tried to set the second byte for power in MT_TX_ALC_CFG to 0 and nothing changed. As I understand power value in MT_TX_ALC_CFG changing power with step 1dB (I didn't find manual for mt7610 but I saw in manual for other similar mtk chip that step is 0.5 dB). But in the mt76 expected 0.5 dB.
This patch only for mt76x0. I think that the fix a similar for other chipsets, but I don't have other routers for testing. |
I think the values in eeprom is correct. But we can increase the values and get tx power upper 23dB) |
MT7610E-EEPROMContentv06.pdf |
I also cannot detect 5Ghz antenna on my Totolink x5000r (MT7621/MT7915e), but it looks also like a power issue since everything else seems to be working. Using openwrt snapshot from ~1w ago. |
Experiencing the same issue on TP-Link RE200 v1 (MediaTek MT7610E) on OpenWrt 21.02.1 r16325-88151b8303. Tx-Power limited to 9 dBm on 5 GHz, BSSID undetectable from other devices. |
Hello guys, I have also experienced the same problem with Wavlink AP, which has MediaTek MT7610E and MediaTek MT7688AN. Both 5Ghz and 2.4Ghz radios are with a similar issue. |
Same issue also for me with a TP-Link TL-WR902AC v3, which is using a MT7610EN. Maximum Transmit power listed is 11dBm Using OpenWrt 21.02.1 r16325-88151b8303 |
This problem also affects WR902ac router. No matter what country is selected, maximum transmit power for 5 GHz radio is 12 dBm. |
One solution for my router(7603e) is to modify eeprom, making my 2.4g work fine at 30dBm. |
Hello @asiaon123, could you explain how you modified the eeprom in more details, maybe share the code? It would really help me and probably others, a lot. Thank you very much in advance! |
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=8f782ed07dc23b64bb24f63ce31d939ee6afb5ad probably here |
@yesrab you are correct, I did not see it. finnally is in main !!! |
I just built updated source and no patch is required on TL-WR902AC v3. |
I did several tests on re200 / re220 / wr902ac .. 5Ghz seems to be working ,maybe we can close this ticket :) |
Weird, I never had issues on my Xiaomi 4a gigabit. (Mt7621 not affected?)
…On Thu, Dec 21, 2023, 16:33 cgm999 ***@***.***> wrote:
I did several tests on re200 / re220 / wr902ac .. 5Ghz seems to be working
,maybe we can close this ticket :)
—
Reply to this email directly, view it on GitHub
<#633 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZ4APIVIJQVBRWQ5SV5JU3YKRJEZAVCNFSM5JMV22FKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBWGY2TAMBVGQZQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Is this now in the latest build I can download without building it myself? Else can we leave this ticket open until that's the case? |
Latest snapshot fixes the 5Ghz for 7610 . No ideea about others like 7612 etc |
The bug still affects TP-Link Archer C6 v3 (mt7603e + mt7613ben). TX power is stuck at maximum and cannot be decreased. |
@cgm99 Why does the bug still occur on the latest firmware 23.05.2 (r23630-842932a63d) on TL-WR902AC v3? does replacing with |
@AbdulRahmannnnnn r23630-842932a63d doesn't include the fix. You've to use a snapshot and install luci or download updated source and compile by yourself. |
@MasterPIC I'm new to the world of networking and OpenWrt, sorry if my question is quite strange. Is there a firmware version of the TL-WR902AC that works fine without the need for binary patching or does this happen with all firmware versions? and can the |
@AbdulRahmannnnnn as @MasterPIC said,the current release 23.05.2 does not include the needed fix.
|
Thank you @cgm999 @MasterPIC for your answer, I have copied and pasted the file into the appropriate directory according to your instructions |
Binary patch the .ko file (is only for 7610 radio chip Then verify is showing same size and diff md5 If you see a diff md5 and same size.. copy the .ko to replace /rom Then reboot your device and hopefully 5Ghz will work. |
Release 23.05.3 available. |
Yea, looks like the mt76 from openwrt-23.05 is only having a very little number of commits vs mt76 main. At least with binary patching is really easy to make it work if you do not want to recompile. |
I have same issues with the latest snapshots and latest release on a Xiaomi
gigabit first realese.
Wifi randomly shuts down (no errors throw in log), it tries to enable
itself and crashes again. Manuely disable wifi and enable it again also
keeps saying no wifi active.
It works fine on 23.05.0. on snapshots or 23.5.3 it's throws me errors.
Did something change in the config file? Cause with factory image and
default settings it seems to work.
But hard to say as crashing usually appears after couple of days
…On Mon, Mar 25, 2024, 07:59 cgm999 ***@***.***> wrote:
Yea, looks like the mt76 from openwrt-23.05 is only having a very little
number of commits vs mt76 main. At least with binary patching is really
easy to make it work if you do not want to recompile.
—
Reply to this email directly, view it on GitHub
<#633 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZ4APOMPNXQQDGI56XOMJLYZ7DNFAVCNFSM5JMV22FKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBRG4ZTINJXHAZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@cgm999 does the binpatch work for mt7612e? I am on latest openwrt build. Router is Netgear R6120. |
@parthibx24 no.. is just for 7610E. Are you sure there are issues with your chip? In the latest snapshot (not in 23.05.XX) 7610E is fixed.. |
@cgm999 yeah mine only shows 3dbm in the ui |
It might be EEPROM/calibration partition issue (not correct data in it) |
I think the real question is if that txpower is really low.. did you tested from a station to see if is weak indeed? |
`Format and print ARG(s) according to FORMAT (a-la C printf) Usage: printf FORMAT [ARG]... Format and print ARG(s) according to FORMAT (a-la C printf) It seems there is a mistake in the code. Maybe you'll provide a hotfix for inside the CLI of the Openwrt-Routers. |
@suppenkasper0815 there is 1 long line (not several). Pls confirm that is what you are doing.. it should work. |
Hi all, The patch for 7610E is now in 23.05 openwrt since 8May : |
Still the same issue, even on the snapshot branch. Mac error and the device becomes inaccessible for some time. |
@aaron13223 what radio chip do you have and device? |
mb, should have added that earlier. It's MT7603E and the device is Xiaomi Mi Router 4a Gigabit Edition. The snapshot build immediately becomes unresponsive after enabling 5GHz wifi and the current 23.05.3 intermittently stops working for 5-15mins at a time but does start working after a reboot or after the said 5-15mins are over. The error is always the same "Mac error detected" |
For 7603E, I think you need to open a new bug with all details for devs to look at |
According to 23.05.5 release notes (specifically 56a84b3 mac80211: Fix wifi throughput) wifi throughput has been improved. Did someone test it? Any regression as for TX power? |
Just looking at the bug reports here and in the OpenWRT defects repository, it is clear that for various mt76 chipsets the TX power is simply not working.
I myself am experimenting two issues with OpenWRT and mt76 drivers:
Searching here in the mt76 repository about similar TX power issues, I've found multiple similar reports:
TP-LINK RE200 problem with the operation of the WLAN chipset. OpenWRT rel 21.02rc4 #606
MT7610E: TX-Power Values incorrect -> low range #604
MT76x0: Correct VHT MCS 8/9 tx power eeprom offset #577
MT7615dn: 5G max power is 6dBm #574
Xiaomi r3p mt7615N low tx power 2ghz 5ghz #539
Low transmission power on MT7610EN #530
mt7603e max tx power is only 8 dBm on HiWiFi HC5962 #525
low tx power with mt76x0e driver #484
Low-incorrect txpower on Mediatek 7628 (TP-Link 840 ver 6.0) #279
Various issues with 5Ghz MT7610E #227
low tx power m7610e #216
And some other more.
While as in the TP-Link Archer C6 v3 (mt7613) where TX Power is stuck at maximum allows it to be perfectly usable, on other devices such as TP-Link RE200 v2 (mt7610) wifi is unusable due to the very weak 5Ghz signal power.
So instead of opening more bug reports here for my TX Power issues with mt7613 and mt7610, I've decided summarize the existing bug reports about TX power here so perhaps we can concentrate the developers' focus on this single bug report.
The text was updated successfully, but these errors were encountered: