WiFi: ping to router normal, but ssh-ing and then pinging back to device gives high latency

As a follow-up to my previous thread, I have narrowed down the strange behavior I am encountering. This time I am looking only at the direct WiFi connection between my end devices (laptop and smartphone) and my RT-AC51U router. I open the terminal on the laptop and ping 192.168.1.1, I get consistently low latency 3-4ms within the acceptable margin for a 5GHz wifi connection. However, when I ssh into the router and ping back to my laptop or my smartphone, the latency is all over the place, but mainly in the hundreds.
What could be causing this? The 5GHz radio on the router is MT7610E, Channel 36, BW: 80MHz but changing those settings does nothing.

For others to reference: WiFi bridge OpenWrt router - jitter is worse than when connected directly to router

2 Likes

Could you also do a waveform bufferbloat test? Just out of curiosity?

I don't think it is possible to tell you what went wrong without going deep into debugging and capturing traffic and analysing traffic. Ping just tells you "something is wrong", but for the details other more sophisticated tools are necessary.

It is good practice to not let the testing tool server run on the device that is supposed to be measured. Where you run the test server is important.

Could be that the time on the devices is not synchronized. Could be that there is something wrong with the code in firmware / driver. Could be that there is some incompatibility. Could be that your laptop / phone enter energy saving mode and ignore some beacons, ... and so on.

Could be that one of your devices is physically broken, especially if it is an old device.

Also, have you set the countrycode by now?

Playing around with the settings, nothing working. This chip's driver is wonky at best. I got outside the coverage and upon return my phone would not reconnect. Restarted the router and now the channel 36 has disappeared. I have set country code to India as it showed channel 36 but now it is just not showing. I have to set the channel to auto as it is showing blank, only after that channel 36 shows up. OpenWrt is best configured through SSH, it is not the first time I encounter issues with LuCI configurations. I add an option, I see what lines are added upon save, but when resetting the options back to what they were, not the same stuff is added/deleted to reciprocate the previous changes.
I think I will need to read a ton of textbooks in order to get the slightest idea of what I am doing to be honest at this point I am already too frustrated trying to make this junk perform as it should for the past 2 days without it breaking due to me looking at it the wrong way. Anyway, rant out. I will provide the required tests once I get it to work first.

By the way, pinging my phone from my laptop gives high pings too. Pinging the main router (the TP-Link from the previous thread) gives low ping. I have absolutely no fricking idea why. At this point I am sure the problem is with the 5GHz radio, as I said, this problem occurs in the LAN, does not matter if I am connected to the internet, so not sure what a bufferbloat test would do.

After taking a deep breath and cooling off, I realized the problem was with the way ubuntu would turn power management on again upon network change. I specifically turned it off but that was when I was connected to a different network. Turning it off and placing the laptop next to the router would result in a single digit latency, as expected.
sudo iwconfig wlo1 power off
only works until restart or until you change the network. I am still to troubleshoot a way to make it work even after restart and even during battery usage. After all these years I am really still not sure why these settings are so hard to configure without having to change folder permissions, installing snap store, etc. Anyway, thank you so much, it seems the RT-AC51U is absolutely fine, it's the chimp behind the keyboard that needs much more experience.

2 Likes

If that was a bug, reporting it to ubuntu or maybe even debian (ubuntu is based on debian) might be cool thing :slight_smile:

1 Like

I don't think it is a bug, I think it is intended to be that way, but there is a way to permanently turn off wifi powersaving.

Anyway, I am now running the RT-AC51U as a WiFi repeater, connected to the TP-Link upstairs, and I am in yet another room, using my laptop 9-10m away from the RT-AC51U, connected to its 5GHz radio.

After throttling down a bit my speeds using SQM, I ran the bufferbloat test several times and consistently got A grades.

Wireless is not worthless, you can totally fine tune it into being almost as responsive as cable (of course, cable always wins), albeit at the cost of speed.

I am very happy as this is exactly what I wanted to do.

1 Like

That's great to hear.

Do you use wds or relayd as repeating method? Do you use SQM on the main router too or only on the repeating device (RT-AC51U)? This thread made me believe it was not possible to use SQM with relayd: Sqm for Wireless Repeater (relayd bridge)

I saw this guide:

but due to the very limited options on the TP-Link, I did not follow it, instead I set up the RT-AC51U 2.4GHz radio to connect to the TP-Link and assign it to wan, and used the 5GHz radio as an AP. Not sure what this configuration is called, like a network within a network? A subnetwork? Idk, but at this point I am glad it works.
The main router is too weak for OpenWrt and no SQM options there. But at least the connection between the two routers is consistent out of the box, pinging back and forth I saw spikes of 14ms max, most of the time it was 2-3ms.

1 Like

Wow, thank you. I learned something new today. I take it the config is similar to what you posted in this comment: WiFi bridge OpenWrt router - jitter is worse than when connected directly to router - #3 by granuloma?

1 Like

At some point I just restored to defaults because of the disappearing channels issue. But yeah, I don't recall changing any settings besides adjusting the 2.4GHz to act as a Client and assigning it to wan, it all worked straightaway from there. The rest was just testing certain channels, etc. Both TP-Link and Asus are using channel 11, BW:40Hz (decided to go for 40 since interference was quite low anyway), and then the 5GHz radio is using channel 36, BW:40Hz, as I am behind a wall and a half.
In the ideal scenario where I am standing right next to the router, with SQM off, I get 40down/10up, with SQM fine tuned at my position in the other room it is more like 20down/5up - it is a high price to pay but at least the latency is good.
One thing I did not bother fixing during testing (at which point I was right next to the router) was the fact that upload speed fell drastically when I unplugged the ethernet cable - from ~40 Mbps to ~10 Mbps (download stayed the same - ~40 Mbps). Not sure what to do with this.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.