[Vero 4k+] Inconsistent wireless connection

Hello everybody.

I received my Vero 4k+ yesterday and for the most part have been very impressed with its performance but am having issues with an inconsistent wireless connection between it and my NAS. The NAS is connected to the router over ethernet, and the Vero is connected to the router wirelessly.

My goal is to have an NFS mount (using fstab) that I stream 4k movies from. I’m able to successfully stream for minutes at a time and then the connection becomes incredibly unstable.

To better test and rule out everything NFS-related, I used iperf3 with a 10 minute test time (because the errors often take a few minutes to manifest).

NAS: iperf3 -s
Vero: iperf3 -t 600 -R -c 192.168.0.170

With that set up, I see a solid 150-200Mbps for minutes at a time, and then seemingly randomly it drops to <50Mbps with thousands of retransmits (often around the 250 second mark; sometimes earlier, but I’ve never seen it go beyond 300 seconds successfully).

To rule out the NAS itself, I did the same test on my laptop in the same location as the Vero and saw 10 solid minutes of 300Mbps with very few retransmits (~60).

If I reboot the Vero then everything goes back to working well for a few minutes, and then the problem occurs again until I reboot.

I enabled debugging logs on the Vero and I’ve attached them, but I don’t see anything in them.

I’ve also attached the iperf3 logs from the server’s side so you can see all of the retransmits.

I tried reinstalling OSMC, disabling avahi-daemon, disabling openvpn, and disabling bluetooth. I was trying to disable anything that might be congesting interface or interfering with the signal.

For a final test, I moved the Vero into the same room as my router and NAS and I saw the same thing occur, but it took longer for it to happen. Interestly there was a mild case of it around the same 250 second mark but it was able to resume normal operation until it hit a long patch of problem near the end of the test.

I have also had the wireless stop working entirely where I can no longer connect via SSH (though there is no error), and I’m forced to reboot the Vero.

If all else fails I’ll just turn the Vero into a NAS and connect an external hard drive, but I was hoping to avoid that for aesthetic (and lazy) purposes.

Sorry for all of the words. I want to provide as much info as possible. Any help is appreciated!

kodi log: 2020-11-05 12:17:07.672 T:4067060928 NOTICE: --------------------------------- - Pastebin.com
iperf3 server log (normal location): -----------------------------------------------------------Server listening on - Pastebin.com
iperf3 server log (near router): -----------------------------------------------------------Server listening on - Pastebin.com

Can you upload all logs after this happens?
The clues will likely be in the system journal.

Which channel are you using? Could be a DFS issue.

Good news, everyone, I managed to fix it.

I ran a Wireshark capture and saw that there were many TCP out-of-order errors. I didn’t realize NFS defaulted to TCP and so I switched it to UDP via fstab mount options because that seemed a better choice for video streaming. I also set the NFS version to 3 just in case.

With that change I managed a two hour movie with zero issues. Excellent.

That’s very interesting. UDP can perform better than TCP, but can be more prone to drops.

Can you try just using NFS3 without TCP, and then try UDP without NFS3? I’d really be interested to know which option made the difference.

If I find the time I’ll run some more tests but I assume the fix was the change to UDP since the strange issues were seen with iperf3 running over TCP.

My NAS is using NFSv3, so I set the fstab mount options to be version 3 just to make sure there was no confusion negotiating versions.

Good spot. Those out-of-order errors would have occurred for a reason. Instead of figuring out why they’re occurring, you’re just sidestepping the issue by moving to UDP.

It’s been a while since I studied networking protocols, but I assume what happens is that the TCP conversation gets out of sync on one or both sides of the connection which leads to the frames being received out of order, and the TCP stack has to reorder them to guarantee in-order delivery, and then the troubles cascade as more come in and it’s hurrying to get them all in order again. Plus the overhead of each side confirming reception of payload and all of that.

I just don’t think TCP is the right choice for this sort of thing. There’s a reason that streaming services like Netflix use UDP.

Using TCP for NFS makes sense for the normal use case of just reading and writing files where what matters is that at the end of the transfer all of the bits are in the right order (at the expense of speed), but for reading a 70GB file over a period of two hours, UDP makes more sense.

The packets will “get out of sync” for a reason, usually a network-related problem. Rather than cut/paste from an article, have a look here for typical reasons: https://success.trendmicro.com/solution/TP000086372-TippingPoint-devices-and-Out-of-Order-Packets

Out of interest, are you using mesh WiFi?