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

MT7612 - TX Power Issue + Solution #172

Closed
CR-Ryan opened this issue May 16, 2018 · 20 comments
Closed

MT7612 - TX Power Issue + Solution #172

CR-Ryan opened this issue May 16, 2018 · 20 comments

Comments

@CR-Ryan
Copy link

CR-Ryan commented May 16, 2018

We have had TX power issues on the 7612 for ages - and no amount of goofing with the wireless config helped. Setting a TX value anywhere between 11 - 30dBm made no difference to the actual observed signal strength.

Here are some examples of what we tried:
Setting various values for "option txpower"
Trying all of the available htmodes
Trying different country codes
Trying various channels (using "iw list" as a reference)
We are on 73edb2

So we (myself and @slthomason) had a contractor write this patch for us:

002-debugfs-api-for-target-power.txt

We recognize that it's a bit of a hack, but it works, and has been for sometime. When we include that patch in our build, we see a ~9dBm improvement in observed signal strength. (-63 vs -72dBm @ 15m)

Also, without our tx patch in place, iwconfig shows this:

wlan1 IEEE 802.11 Mode:Master Tx-Power=9 dBm
RTS thr:off Fragment thr:off
Power Management:off

So it appears to be hitting some kind of wall around 9 - 11dBm in stock form.

We were hoping to see this issue fixed correctly, so that we don't have to use a band-aid.

@barhom
Copy link

barhom commented May 26, 2018

May we know which target it is you are testing?

@slthomason
Copy link

MT7621. Particularly ZBT-WE1326 and ZBT-WG3526

@mastum
Copy link

mastum commented Jun 13, 2018

We have had TX power issues on the 7612 for ages - and no amount of goofing with the wireless config helped. Setting a TX value anywhere between 11 - 30dBm made no difference to the actual observed signal strength.

I tried now with dir-860l b1 and xiaomi 3g and it works correctly.
It seems a specific problem of ZBT-WE1326 and ZBT-WG3526.

@barhom
Copy link

barhom commented Jun 19, 2018

@nbd168
You have one of these ZBT devices. What is your comment regarding this patch?

@Mushoz
Copy link

Mushoz commented Jun 19, 2018

Is this a related problem? If not, please let me know so I can open a new issue. I am using a Dir-860l.

When I double-check whether my regulatory domain is correctly set to The Netherlands, we can see that this is correct:

root@LEDE:~# iw reg get
global
country NL: DFS-ETSI
	(2402 - 2482 @ 40), (N/A, 20), (N/A)
	(5170 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR, AUTO-BW
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
	(5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
	(5725 - 5875 @ 80), (N/A, 13), (N/A)
	(57000 - 66000 @ 2160), (N/A, 40), (N/A)

I can see that on channels 100-140 I should be able to use up to 27 dBm:

		Frequencies:
			* 5180 MHz [36] (20.0 dBm)
			* 5200 MHz [40] (20.0 dBm)
			* 5220 MHz [44] (20.0 dBm)
			* 5240 MHz [48] (20.0 dBm)
			* 5260 MHz [52] (20.0 dBm) (radar detection)
			* 5280 MHz [56] (20.0 dBm) (radar detection)
			* 5300 MHz [60] (20.0 dBm) (radar detection)
			* 5320 MHz [64] (20.0 dBm) (radar detection)
			* 5500 MHz [100] (27.0 dBm) (radar detection)
			* 5520 MHz [104] (27.0 dBm) (radar detection)
			* 5540 MHz [108] (27.0 dBm) (radar detection)
			* 5560 MHz [112] (27.0 dBm) (radar detection)
			* 5580 MHz [116] (27.0 dBm) (radar detection)
			* 5600 MHz [120] (27.0 dBm) (radar detection)
			* 5620 MHz [124] (27.0 dBm) (radar detection)
			* 5640 MHz [128] (27.0 dBm) (radar detection)
			* 5660 MHz [132] (27.0 dBm) (radar detection)
			* 5680 MHz [136] (27.0 dBm) (radar detection)
			* 5700 MHz [140] (27.0 dBm) (radar detection)
			* 5745 MHz [149] (13.0 dBm)
			* 5765 MHz [153] (13.0 dBm)
			* 5785 MHz [157] (13.0 dBm)
			* 5805 MHz [161] (13.0 dBm)
			* 5825 MHz [165] (13.0 dBm)

However, setting anything higher than 20 dBm still shows only 20 dBm in Luci:

Mode: Master | SSID: XXXX
BSSID: XX:XX:XX:XX:XX:XX | Encryption: WPA2 PSK (CCMP)
Channel: 100 (5.500 GHz) | Tx-Power: 20 dBm
Signal: -28 dBm | Noise: 0 dBm
Bitrate: 300.0 Mbit/s | Country: NL

Setting the tx power to something lower than 20 does correctly work, so it's not the setting of power itself that seems bugged:

Mode: Master | SSID: XXXXX
BSSID: XX:XX:XX:XX:XX:XX | Encryption: WPA2 PSK (CCMP)
Channel: 100 (5.500 GHz) | Tx-Power: 19 dBm
Signal: -34 dBm | Noise: 0 dBm
Bitrate: 144.4 Mbit/s | Country: NL

@Kherby
Copy link

Kherby commented Jul 5, 2018

I have the same problem with my DIR-860L @ OpenWRT 18.06rc1.

> root@860L-AP1:~# iw list | grep -i dbm
>                         * 2412 MHz [1] (20.0 dBm)
>                         * 2417 MHz [2] (20.0 dBm)
>                         * 2422 MHz [3] (20.0 dBm)
>                         * 2427 MHz [4] (20.0 dBm)
>                         * 2432 MHz [5] (20.0 dBm)
>                         * 2437 MHz [6] (20.0 dBm)
>                         * 2442 MHz [7] (20.0 dBm)
>                         * 2447 MHz [8] (20.0 dBm)
>                         * 2452 MHz [9] (20.0 dBm)
>                         * 2457 MHz [10] (20.0 dBm)
>                         * 2462 MHz [11] (20.0 dBm)
>                         * 2467 MHz [12] (20.0 dBm)
>                         * 2472 MHz [13] (20.0 dBm)
>                         * 5180 MHz [36] (20.0 dBm)
>                         * 5200 MHz [40] (20.0 dBm)
>                         * 5220 MHz [44] (20.0 dBm)
>                         * 5240 MHz [48] (20.0 dBm)
>                         * 5260 MHz [52] (20.0 dBm) (radar detection)
>                         * 5280 MHz [56] (20.0 dBm) (radar detection)
>                         * 5300 MHz [60] (20.0 dBm) (radar detection)
>                         * 5320 MHz [64] (20.0 dBm) (radar detection)
>                         * 5500 MHz [100] (26.0 dBm) (radar detection)
>                         * 5520 MHz [104] (26.0 dBm) (radar detection)
>                         * 5540 MHz [108] (26.0 dBm) (radar detection)
>                         * 5560 MHz [112] (26.0 dBm) (radar detection)
>                         * 5580 MHz [116] (26.0 dBm) (radar detection)
>                         * 5600 MHz [120] (26.0 dBm) (radar detection)
>                         * 5620 MHz [124] (26.0 dBm) (radar detection)
>                         * 5640 MHz [128] (26.0 dBm) (radar detection)
>                         * 5660 MHz [132] (26.0 dBm) (radar detection)
>                         * 5680 MHz [136] (26.0 dBm) (radar detection)
>                         * 5700 MHz [140] (26.0 dBm) (radar detection)
>                         * 5745 MHz [149] (13.0 dBm)
>                         * 5765 MHz [153] (13.0 dBm)
>                         * 5785 MHz [157] (13.0 dBm)
>                         * 5805 MHz [161] (13.0 dBm)
>                         * 5825 MHz [165] (13.0 dBm)

So first of all it should be 27dBm @ channel 100-140 in my country and i'm using channel 100 right now but the Tx Power is still @20dBm and a manuel change doesn't work either.... It's really weird !
Hopefully this will be fixed soon...

@barhom
Copy link

barhom commented Jul 8, 2018

Has this been incorporated ?
@nbd168

@psyborg55
Copy link

this half-assed solution should not be incorporated anywhere. mt76 chip max output is 23.5dBm and even at full power you need hell of a calibration and offload routines that this driver don't provide. this could help in a case your device has ext RF components which the mentioned devices do not have at least according to logs and wiki images of the board (so the bug is somewhere else) but even in such a case that is not a proper way of setting output power to these chips and can only result in further performance degradation

@slthomason
Copy link

slthomason commented Jul 9, 2018 via email

@psyborg55
Copy link

then you have dramatically buggy board as i've said and need to look elsewhere (you did check eeprom?). on average boards this would cause problems.

@nbd168
Copy link
Member

nbd168 commented Jul 9, 2018

From what I can see, the vendor driver also has some code to allow boosting the tx power beyond the EEPROM values. However, I think simply exposing this via debugfs is too risky. In my opinion, an acceptable solution would be to allow adding a power offset or overriding the target power via device tree

@psyborg55
Copy link

overriding the target power via device tree would be better solution

@Mushoz
Copy link

Mushoz commented Jul 9, 2018

I am not sure I am following. So the fact "iw list" shows 27 dBm on some channels, but unable being able to set anything higher than 20 dBm is not a bug? Or am I misunderstanding things?

@Kherby
Copy link

Kherby commented Jul 9, 2018

With an older 17.01 snapshot build i saw 24dBm @5ghz at LUCI.
But with the latest 17.01 snapshot build (r3918) it's locked to 20dBm when using a DFS channel where 27dBm would be allowed...

Mode: Master | SSID: 
BSSID:  | Encryption: WPA2 PSK (CCMP)
Channel: 100 (5.500 GHz) | Tx-Power: 20 dBm
Signal: -58 dBm | Noise: 0 dBm
Bitrate: 585.1 Mbit/s | Country: FR
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2247 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
        Band 2:
                Capabilities: 0x1ff
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 4 usec (0x05)
                HT TX/RX MCS rate indexes supported: 0-15
                VHT Capabilities (0x000001b0):
                        Max MPDU length: 3895
                        Supported Channel Width: neither 160 nor 80+80
                        RX LDPC
                        short GI (80 MHz)
                        TX STBC
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 0 Mbps
                Frequencies:
                        * 5180 MHz [36] (20.0 dBm)
                        * 5200 MHz [40] (20.0 dBm)
                        * 5220 MHz [44] (20.0 dBm)
                        * 5240 MHz [48] (20.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (radar detection)
                        * 5280 MHz [56] (20.0 dBm) (radar detection)
                        * 5300 MHz [60] (20.0 dBm) (radar detection)
                        * 5320 MHz [64] (20.0 dBm) (radar detection)
                        * 5500 MHz [100] (27.0 dBm) (radar detection)
                        * 5520 MHz [104] (27.0 dBm) (radar detection)
                        * 5540 MHz [108] (27.0 dBm) (radar detection)
                        * 5560 MHz [112] (27.0 dBm) (radar detection)
                        * 5580 MHz [116] (27.0 dBm) (radar detection)
                        * 5600 MHz [120] (27.0 dBm) (radar detection)
                        * 5620 MHz [124] (27.0 dBm) (radar detection)
                        * 5640 MHz [128] (27.0 dBm) (radar detection)
                        * 5660 MHz [132] (27.0 dBm) (radar detection)
                        * 5680 MHz [136] (27.0 dBm) (radar detection)
                        * 5700 MHz [140] (27.0 dBm) (radar detection)
                        * 5745 MHz [149] (disabled)
                        * 5765 MHz [153] (disabled)
                        * 5785 MHz [157] (disabled)
                        * 5805 MHz [161] (disabled)
                        * 5825 MHz [165] (disabled)
        valid interface combinations:
                 * #{ IBSS } <= 1, #{ managed, AP, mesh point } <= 8,
                   total <= 8, #channels <= 1, STA/AP BI must match, radar detec                                                                                                              t widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports VHT-IBSS.

@camelcamro
Copy link

is this also related to 2,4GHZ ?
and is there the same situation, that it is not supported to setup TX power ?

@slthomason
Copy link

slthomason commented Jul 10, 2018 via email

@xavier83
Copy link

any progress on this issue?

@xavier83
Copy link

@slthomason do you think I'm having the same issue (#199) described here?

@nbd168
Copy link
Member

nbd168 commented Jun 27, 2019

Please try the latest version, it should work better now

@nbd168 nbd168 closed this as completed Feb 20, 2020
@storm1er
Copy link

storm1er commented Nov 8, 2020

Hi,

Could this issue cause this kind of problem?
https://forum.openwrt.org/t/rpi4-and-netgear-a6210-mt7612u-long-distance-problem/78682

As soon as I am at 15m (~50 feets) away from the router, my devices disconnect instantly without any reason, the quality connection is good (like 4/5 before disconnect)

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