Connection Dropouts with TP-Link CPE510 v3.20

Hello.

I just installed OpenWRT on my TP-Link CPE510 v3.20 (EU version) because I need the lower channels unlocked so that I can connect a TP-Link TL-WR902AC and also avoid DFS in general.

I managed to set the network up as its supposed to be (I put country code Panama just to be sure) but I have incredibly low bitrates and constant dropouts.
For some reason OpenWRT seems to constantly switch back and forth between 20 and 40MHz width and also between Short GI and regular.
noscan didn't make any difference.

I set up a Netgear Nighthawk M5 with exactly the same network configuration (same SSID, channel, HT40, etc.) and the TP-Link TL-WR902AC works perfectly fine with that, delivering lagfree 1080p50 video from an NDI encoder.

What could be causing this?

Are you in Panama?

No but in Germany all the higher channels beyond 48 (that the TL-WR902AC does not support) are not allowed for outdoor use, which is why they are blocked in the stock firmware of the CPE510 since it is intended for long range outdoor communication.
So I figure I select a different country in order to make sure the device can freely operate in the lower channels.

I am not actually using the device outdoor btw but instead in concert venues to get a stable signal to an NDI WiFi camera.

Keep in mind that

  1. The country/region selection affects more than channels -- it also affects power levels
  2. By using the incorrect country code, you may be running out of compliance for your current location -- this may actually be illegal.
  3. Your connections may not be performant and consistent if the region codes are inconsistent between the AP and the client devices.

Setting country code DE didn't change anything.

Something else is going on.
I can see the MCS changing back and forth constantly. Somewhere the firmware is messing up and constantly reconfiguring the connection.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.134",
        "hostname": "OpenWrt",
        "system": "Atheros AR9344 rev 3",
        "model": "TP-Link CPE510 v3",
        "board_name": "tplink,cpe510-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.0",
                "revision": "r23497-6637af95aa",
                "target": "ath79/generic",
                "description": "OpenWrt 23.05.0 r23497-6637af95aa"
        }
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fda7:345d:2afc::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option channel '48'
        option band '5g'
        option htmode 'HT40'
        option txpower '23'
        option country 'DE'
        option cell_density '0'
        option noscan '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Netgier_5GHz'
        option encryption 'psk2'
        option key ''

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '50'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

root@OpenWrt:~# cat /etc/config/firewall
config defaults
        option syn_flood        1
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        list   network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT

config zone
        option name             wan
        list   network          'wan'
        list   network          'wan6'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config forwarding
        option src              lan
        option dest             wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4

# Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT

config rule
        option name             Allow-IGMP
        option src              wan
        option proto            igmp
        option family           ipv4
        option target           ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
        option name             Allow-DHCPv6
        option src              wan
        option proto            udp
        option dest_port        546
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-MLD
        option src              wan
        option proto            icmp
        option src_ip           fe80::/10
        list icmp_type          '130/0'
        list icmp_type          '131/0'
        list icmp_type          '132/0'
        list icmp_type          '143/0'
        option family           ipv6
        option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Input
        option src              wan
        option proto    icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        list icmp_type          router-solicitation
        list icmp_type          neighbour-solicitation
        list icmp_type          router-advertisement
        list icmp_type          neighbour-advertisement
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Forward
        option src              wan
        option dest             *
        option proto            icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-IPSec-ESP
        option src              wan
        option dest             lan
        option proto            esp
        option target           ACCEPT

config rule
        option name             Allow-ISAKMP
        option src              wan
        option dest             lan
        option dest_port        500
        option proto            udp
        option target           ACCEPT


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#       option src              wan
#       option src_dport        22001
#       option dest             lan
#       option dest_port        22
#       option proto            tcp

### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  
#       option src_port 80
#       option dest             wan
#       option dest_ip  
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  
#       option dest_port        120
#       option proto    tcp

BTW, when I connect my MSI notebook it seems fine and stable. It stays permanently at 40MHz Short GI (same MCS consistently).
The TL-WR902AC runs at a much lower bitrate to begin with (even though the signal is a lot stronger) and constantly switches back and forth between the different modes.
Again, in exactly the same configuration the TL-WR902AC works flawlessly with my Netgear M5 set up in the same way as the CPE510 currently is.

Is there an upstream router to which this is connected?

The signal flow is (supposed to be) as follows: HDMI Cam -> NDI encoder -[eth]> TL-WR902AC (in client mode) -[WiFi]> CPE510 -[eth]> MSI notebook

I'd recommend upgrading to 23.05.3 (the latest) just to rule out any bugs on this device with the first stable release of 23.05.

Beyond that, I'm not seeing anything that would suggest that the AP is misconfigured.

How far away is your 902AC?

They are right next to each other for testing purposes.

Is the 902AC running OpenWrt?

No. The only reason I installed OpenWRT on the CPE was to unlock the low non-DFS channels. I would like to keep the 902AC original since it works perfectly with the Netgear as a failsafe alternative.

You indicated that another device was not exhibiting the same issues that the 902AC is, right? That suggests that the 902AC's stock firmware may not be properly handling the connection.

OpenWrt does support the 902AC -- maybe give it a shot? You can always revert back to the vendor OS if you want.

2 Likes

Hmm, I guess I will do that even though there is a "low flash/RAM" warning in the OpenWRT wiki for that device.
Strange though that it works perfectly with the Netgear. Got any idea why that might be?

Oh and how would I revert back to the original firmware?

It cld be the drivers or other things in the firmware in general (on the 902ac). Hence my suggestion to try openwrt.

I would say tftp.

After going through the forum a bit, OpenWRT does not really seem compatible with v4 of the 902AC at the moment.
Plus I don't want to risk ruining the backup plan of using the Netgear instead of the CPE.

I am almost completely sure, I have made a mistake in the configuration of the CPE because I cannot even ping my notebook from the 902AC's web interface and other way around I get 75% loss rate.
Maybe I need to use ad-hoc mode??

Also, whenever my notebook is connected to the CPE (via ethernet), my internet speed drops significantly even though it runs through the notebook's wireless adapter connected to my house's main router, all of which runs in a completely diffferent IP range independent from both the CPE and the 902AC.