High ping latency via 5GHz Wifi

Is it normal to so high ping latency via 5GHz wifi channel?

Device on Wifi: 192.168.77.222 (Samsung Galaxy TAB 10.1)
Wifi AP: 192.168.77.158 (RE350)
Ping from PC via Ethernet: 192.168.77.100

ping 192.168.77.222
PING 192.168.77.222 (192.168.77.222) 56(84) bytes of data.
64 bytes from 192.168.77.222: icmp_seq=1 ttl=64 time=81.4 ms
64 bytes from 192.168.77.222: icmp_seq=2 ttl=64 time=108 ms
64 bytes from 192.168.77.222: icmp_seq=3 ttl=64 time=25.5 ms
64 bytes from 192.168.77.222: icmp_seq=4 ttl=64 time=49.3 ms
64 bytes from 192.168.77.222: icmp_seq=5 ttl=64 time=73.3 ms
64 bytes from 192.168.77.222: icmp_seq=6 ttl=64 time=95.3 ms
64 bytes from 192.168.77.222: icmp_seq=7 ttl=64 time=119 ms
64 bytes from 192.168.77.222: icmp_seq=8 ttl=64 time=41.6 ms
64 bytes from 192.168.77.222: icmp_seq=9 ttl=64 time=6.60 ms
64 bytes from 192.168.77.222: icmp_seq=10 ttl=64 time=85.0 ms
64 bytes from 192.168.77.222: icmp_seq=11 ttl=64 time=109 ms
64 bytes from 192.168.77.222: icmp_seq=12 ttl=64 time=34.6 ms
64 bytes from 192.168.77.222: icmp_seq=13 ttl=64 time=58.4 ms
--- 192.168.77.222 ping statistics ---
13 packets transmitted, 13 received, 0% packet loss, time 12008ms
rtt min/avg/max/mdev = 6.602/68.276/119.085/33.979 ms
ping 192.168.77.158
PING 192.168.77.158 (192.168.77.158) 56(84) bytes of data.
64 bytes from 192.168.77.158: icmp_seq=1 ttl=64 time=0.602 ms
64 bytes from 192.168.77.158: icmp_seq=2 ttl=64 time=1.21 ms
64 bytes from 192.168.77.158: icmp_seq=3 ttl=64 time=0.621 ms
64 bytes from 192.168.77.158: icmp_seq=4 ttl=64 time=0.576 ms
64 bytes from 192.168.77.158: icmp_seq=5 ttl=64 time=0.488 ms
64 bytes from 192.168.77.158: icmp_seq=6 ttl=64 time=0.413 ms
64 bytes from 192.168.77.158: icmp_seq=7 ttl=64 time=0.778 ms
--- 192.168.77.158 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6078ms
rtt min/avg/max/mdev = 0.413/0.669/1.206/0.243 ms

Device: TP-LINK RE350 v1
Architecture: MediaTek MT7621 ver:1 eco:3
RAM: 64MB
Firmware Version: OpenWrt 22.03.3 r20028-43d71ad93e
Kernel Version: 5.10.161

Wireless Network: MediaTek MT76x2E 802.11acn
Channel: 56 (5.280 GHz) | Bitrate: 239.9 Mbit/s

Openwrt act as AP without dhcp or NAT. Only bridge to local network.

There are many factors that can cause high ping:

  • distance between devices
  • obstacles in the surroundings (water, walls, ...)
  • interference (radar on DFS channels (your wifi will shut down or switch to a different channel, if radar is detected), unshielded USB3, various wifi/bluetooth devices competing for same wifi channels, various other electrical devices (e.g. microwaves), ...)
  • hardware
  • software
  • configuration
  • ...

In one room. from 1m to 3m maximum.

No walls, no water.

Usual room of house. No one USB3 device in house. Only 3 wifi device, TV with RC on BT, Only this device in Wifi channels no one other (in 5Ghz, in 2.4GHz - 4-5 routers from neighbourhoods)

Can we check what can be wrong? I have Two RE350 with same latency....

Take a look here 2.4 GHz no internet after a few hours, but 5 ghz is fine, MT7621 driver issue? - #31 by mattbatt

Maybe is a driver issue.

1 Like

We are talking about 5 GHz, not 2.4 GHz.

The first step would be to check your configuration, as we cannot do much about hardware and finding flaws in the code is more difficult. Only if it is ruled out that it's not a config thing, then inspecting the code will become necessary.

To provide us with the config, first, access your device via SSH (See how: https://openwrt.org/docs/guide-quick-start/sshadministration)

Then please copy the output of the following commands and post it here using the "Preformatted text </> " button.

Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Here are talking about 5 Ghz problems in MT7621

Maybe there is a relation between them.

Most of all we're talking about pinging a smartphone over wireless, phones are using very aggressive powersaving methods (even while it's operating, screen on and actively using the wlan), which makes any kind of ping test pretty much unusable.

1 Like

Ping Wireless devices from Router SSH.

/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 'fdec:8ab2:89df::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	option bridge_empty '1'
	list ports 'lan.1'

config interface 'lan'
	option proto 'static'
	option ipaddr '192.168.10.131'
	option netmask '255.255.255.0'
	option gateway '192.168.10.100'
	option device 'br-lan'

config device
	option name 'lan'
	option ipv6 '0'

config device
	option name 'eth0'
	option ipv6 '0'

config device
	option type 'bridge'
	option name 'br-backup'
	option bridge_empty '1'

config interface 'backup'
	option proto 'static'
	option device 'br-backup'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option defaultroute '0'
	option dns_metric '99'
	option metric '99'

config device
	option name 'wlan0'
	option ipv6 '0'

config device
	option type '8021q'
	option ifname 'lan'
	option vid '1'
	option name 'lan.1'
	option ipv6 '0'

/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option cell_density '0'
	option channel 'auto'
	option legacy_rates '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
	option noscan '1'
	option cell_density '0'
	option channel '64'
	option htmode 'VHT80'

config wifi-iface 'wifinet9'
	option device 'radio0'
	option mode 'ap'
	option ssid 'Backup'
	option encryption 'none'
	option network 'backup'

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

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

No DHCP and No Firewall packages:

# iptables -L
-ash: iptables: not found

Samsung S20+ on OpenWRT-5G network (with disable power saving and Switched Screen On)

# ping 192.168.10.100
PING 192.168.10.100 (192.168.10.100): 56 data bytes
64 bytes from 192.168.10.100: seq=0 ttl=64 time=3.171 ms
64 bytes from 192.168.10.100: seq=1 ttl=64 time=115.702 ms
64 bytes from 192.168.10.100: seq=2 ttl=64 time=2.519 ms
64 bytes from 192.168.10.100: seq=3 ttl=64 time=110.479 ms
64 bytes from 192.168.10.100: seq=4 ttl=64 time=22.422 ms
64 bytes from 192.168.10.100: seq=5 ttl=64 time=3.350 ms
64 bytes from 192.168.10.100: seq=6 ttl=64 time=50.252 ms
64 bytes from 192.168.10.100: seq=7 ttl=64 time=97.298 ms
^C
--- 192.168.10.100 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 2.519/50.649/115.702 ms

Samsung S20+ on OpenWRT (2.4) network (with disable power saving and Switched Screen On)

# ping 192.168.10.99
PING 192.168.10.99 (192.168.10.99): 56 data bytes
64 bytes from 192.168.10.99: seq=0 ttl=64 time=133.716 ms
64 bytes from 192.168.10.99: seq=1 ttl=64 time=82.830 ms
64 bytes from 192.168.10.99: seq=2 ttl=64 time=3.346 ms
64 bytes from 192.168.10.99: seq=3 ttl=64 time=5.227 ms
64 bytes from 192.168.10.99: seq=4 ttl=64 time=90.470 ms
64 bytes from 192.168.10.99: seq=5 ttl=64 time=5.228 ms
64 bytes from 192.168.10.99: seq=6 ttl=64 time=91.754 ms
64 bytes from 192.168.10.99: seq=7 ttl=64 time=131.837 ms
^C
--- 192.168.10.99 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 3.346/68.051/133.716 ms

Ping Windows 10 PC on Ethernet

# ping 192.168.10.2
PING 192.168.10.2 (192.168.10.2): 56 data bytes
64 bytes from 192.168.10.2: seq=0 ttl=128 time=1.578 ms
64 bytes from 192.168.10.2: seq=1 ttl=128 time=1.588 ms
64 bytes from 192.168.10.2: seq=2 ttl=128 time=1.580 ms
64 bytes from 192.168.10.2: seq=3 ttl=128 time=1.202 ms
64 bytes from 192.168.10.2: seq=4 ttl=128 time=1.320 ms
64 bytes from 192.168.10.2: seq=5 ttl=128 time=1.349 ms
64 bytes from 192.168.10.2: seq=6 ttl=128 time=1.198 ms
64 bytes from 192.168.10.2: seq=7 ttl=128 time=1.675 ms
--- 192.168.10.2 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 1.198/1.436/1.675 ms


any suggestions :roll_eyes:

  1. You forgot to enter the country code. This will limit you to only the barest minimum of tx power usage, as the limit is the common denominator which honors every country in the world, which is either 3 or 6 dBm I believe.

    add option country 'your-country-code' to config wifi-device 'radio1' and config wifi-device 'radio0'

  2. Since you are very close (3 meters) to your device, you actually might increase throughput / latency by reducing tx power.

  3. option txpower 'your-tx-power' is missing beneath config wifi-device 'radio1' and config wifi-device 'radio0'

  4. What is the meaning of option noscan '1'? I cannot find it at https://openwrt.org/zh/docs/guide-user/network/wifi/basic

  1. By default set All World. Trying to set JP, US, RU, NZ - no differences.
  2. Trying to set 15,10,5 dB - no differences.
  3. if not set use "driver default", 20dB in my case.
  4. https://openwrt.org/docs/guide-user/network/wifi/basic#mac80211_options, btw set by Luci in default.

The other day i learned that depending on your mobile devices config, they can employ special power saving methods (maybe even when power-saving mode is off?), which are the cause for high latency and missed message notifications. Check out Proposal to change the default wifi beacon interval from 100 ms to 50 ms

Try to reproduce the ping values with laptop / computer device as client. That way, you will be able to eliminate any errors stemming from cell-phone usage. Also, scanning for wifi and using channel analysis at the same time while doing your ping-test will cause interference.