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

FS#2781 - Archer C50 v4 Mac80211 Looses Internet Access after 20’+ Away from Router But Maintains Connection #8891

Open
openwrt-bot opened this issue Jan 29, 2020 · 14 comments
Labels
flyspray release/19.07

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jan 29, 2020

thaitran:

Supply the following if possible:

  • Device problem occurs on
  • Software versions of OpenWrt/LEDE release, packages, etc.
  • Steps to reproduce

Problem Device:
TP-Link Archer C50 (Canadian) v4 + v4.2

Software version:
openwrt 19.07 r10860, default packages versions.

Steps to reproduce:
Setup wireless like below. I've intentionally left encryption set to "none" for both radio's for quick testing but i've tested with WPA2 CCMP encryption with no change in results.

config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/10300000.wmac'
option htmode 'HT20'
option legacy_rates '0'
option country 'CA'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'

config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11a'
option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
option htmode 'VHT80'
option channel '112'
option legacy_rates '0'
option country 'CA'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'

Alternative Settings:

htmode 'HT40' No change in results
channel '1', '6', '11' No change in results
disassoc_low_ack '0' No change in results

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 29, 2020

thaitran:

Symptom persistent with openwrt-19.07-snapshot-r10269.
Not an environmental issue as the router has been tested on different locations within my City.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 29, 2020

zapzap1:

The bug affects me and one more person as well (OP here and there are the same), [[https://forum.openwrt.org/t/archer-c50-v4-mac80211-looses-internet-access-after-20-away-from-router-but-maintains-connection/53575/13|see]].
My router is brazilian, which internally is the same as the european one (as stated [[https://openwrt.org/toh/tp-link/archer-c50|here]], search "Brazil" on the page).

I had the problem with no extra packages installed, right after flashing 19.0.7.

I'm 99% sure there is a small improvement by setting:

option distance '15' # larger values produce nor further improvement
option HTMODE 'HT40'

Thanks for your time.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 30, 2020

zapzap1:

I have some additional info.

When I restart the 2.4GHz interface there are two error messages in the system log that do not appear when restarting the 5GHz interface:

#More stuff above Thu Jan 30 01:55:04 2020 user.notice mac80211: Failed command: iw phy phy0 set antenna 0xffffffff 0xffffffff Thu Jan 30 01:55:05 2020 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf #More stuff below

Investigating the first error

If I re-run the the first command on the terminal I get:

~# iw phy phy0 set antenna 0xffffffff 0xffffffff command failed: Not supported (-122)

I could not find any information about the error code on the web.

The output of of "wl list" is: https://pastebin.com/raw/66UYQyvK

Some interesting things to notice are:

  1. Both coverage class are set to "0 (up to 0m)". phy1(5GHz) has been like that since the beginning, I did not touch it. I did change phy0(2.4GHz) to 0 but even after setting it to "auto" on the Web GUI it remains as 0.

  2. Both interfaces have "Available Antennas" and "Configured Antennas" set to 0x3. From the error message it seems like phy0(2.4GHz) should be set to 0xf.

  3. I did try setting phy0(2.4GHz) antennas to 0x0, 0x1, 0x2, 0x3 and all others up to 0xf. All antenna codes up to and including 0x3 (the one currently set) gave the error:

command failed: Not supported (-122) The codes above 0x3 and up to 0xf gave the error: command failed: Invalid argument (-22)

Investigating the second error

The contents of the file " /var/run/hostapd-phy0.conf" are here: https://pastebin.com/raw/rwQrWabE

Some interesting things to note are:

  1. There is no analogous file for phy1(5GHz).

  2. On the Web GUI "mode" is set to "n".

hw_mode=g

3.On the Web GUI "Isolate clients" is not set.

ap_isolate=1

Finally I set the kernel log leave to 7 (debug, highest) and dmesg gave a normal output after restarting phy0(2.4GHz)

[ 1249.141474] device wlan0 left promiscuous mode [ 1249.146112] br-lan: port 2(wlan0) entered disabled state [ 1249.970349] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 1249.994203] br-lan: port 2(wlan0) entered blocking state [ 1249.999701] br-lan: port 2(wlan0) entered disabled state [ 1250.005499] device wlan0 entered promiscuous mode [ 1250.010421] br-lan: port 2(wlan0) entered blocking state [ 1250.015809] br-lan: port 2(wlan0) entered forwarding state [ 1250.179960] br-lan: port 2(wlan0) entered disabled state [ 1250.598653] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 1250.605402] br-lan: port 2(wlan0) entered blocking state [ 1250.610831] br-lan: port 2(wlan0) entered forwarding state

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 30, 2020

zapzap1:

Update:

I think I found the problem but I still do not how to fix it.

This gives me improvements on the receiving power. When doing a scan from the router I can now find networks that I couldn't before.

iw phy phy0 set antenna_gain 20

On the other hand I'm not able to change the transmission power. I tried many values, large and small.

#Neither of those commands works (the number is in mDm, 2000mDm == 20dBm)
iw dev wlan0 set txpower fixed 2000
iw phy phy0 set txpower fixed 2000

Those commands do not return any error and return 0 to the shell. Yet the transmission power of the interface remains unchanged (1.0 dBm):

~# iw dev wlan0 info
Interface wlan0
ifindex 12
wdev 0x2
addr 68:ff:7b:aa:39:79
ssid barroscorreia2
type AP
wiphy 0
channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
txpower 1.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytestx-packets
0 0 663 0 0 0 3 128049 740

I found [[https://dev.archive.openwrt.org/ticket/20369|this ticket]] reporting the same problem with a different router that uses same driver (mt76). The driver has had problems setting power before.

Update: Of course 90% of the links on the linked ticket are broken and now I'm in the dark.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 30, 2020

zapzap1:

I opened a bug report on the kernel mail list: https://bugzilla.kernel.org/show_bug.cgi?id=206363

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Feb 25, 2020

adrianschmutzler:

I'm also having problems with low range on 2.4 GHz. I'm using EU 4.2 HW version and self-built 19.07 from 2020-02-25. However, for me txpower is shown as 20 dB which is the allowed maximum (with 0 dB antenna_gain!).

Has anybody tested this with master?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Feb 25, 2020

adrianschmutzler:

Seems to be similar on master ...

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 3, 2020

zapzap1:

You can improve antenna gain with:
iw phy phy0 set antenna_gain 20

This improves the receiving signal strength considerably. With this I'm able to see networks that I couldn't before.

Unfortunately we still do not have any replies on the kernel bug report.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 3, 2020

adrianschmutzler:

What you do with antenna_gain here is just reducing the txpower:
txpower = legal maximum tx - antenna_gain

So, having better receiving quality seems to be a result of the reduced transmitting power here, and thus isn't really helpful after all ...

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Sep 3, 2020

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Sep 27, 2020

rotanid:

serious problem also with my c50v4 devices...
note though, netgear r6120 is NOT affected although it uses the same mediatek chip.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Oct 15, 2020

darkmaxx1:

Compiled with this patch
https://patch-diff.githubusercontent.com/raw/openwrt/mt76/pull/442.patch

Works on my C50v4

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Feb 17, 2021

bill888:

Fixed from 19.07.7 stable release

[[https://github.com/openwrt/mt76/commit/4ba1709c399b2f78ee987c1f0aff2b5da623244b|mt76: mt7603: add additional EEPROM chip ID]]

@aparcar aparcar added the release/19.07 label Feb 22, 2022
@Pilabol
Copy link

@Pilabol Pilabol commented Jun 18, 2022

Hi, I installed openwrt (version 21.02.3 and 22.03.rc4), on Arche C50v4. For a while it worked great! However, after a while the 2.4ghz wifi disappeared and the connected equipment could no longer be found. I couldn't find a frequency or extado monent. It used to occur when data consumption increased (donwloado in pc, use of tv and cell phones at the same time). Can anyone help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/19.07
Projects
None yet
Development

No branches or pull requests

3 participants