Saturday, February 18, 2023

Fixing lags and stuttering with Oculus Quest 2 and Mikrotik WiFi

 Trying to make Air Link work properly between my PC and Oculus Quest 2 I have found that my Mikrotik cAP ac access point working very bad. Further investigation get me to the possible reason - access point constantly switching connection rate (single/double chain, short/long gate interval, etc). So I did the following:

1) disable 2.4GHz WiFi

2) set 5GHz WiFi settings to the following:

    band=5ghz-onlyac

    channel-width=20/40/80mhz-XXXX

    country=***my country***

    distance=indoors

    guard-interval=long (disable short gate interval)

    rx-chains=0 (using one antenna for receive only)

    tx-chains=1 (using second antenna for transmission only)

    frequency=5180 (it appears that lower channels provide better speed even when it is used by neighbors)

This helped me to achieve stable Air Link between my PC and Oculus Quest 2 with 105Mbit/s fixed rate.

Later I have upgraded my WiFi to hAP-ax³. And get another problem - while network speed was fine (400Mb/s speedtest in Oculus browser) there was about 2..5 FPS when using AirLink. This happened only when my PC was connected to ethernet port. If I connect my PC to router using same WiFi to which Oculus is connected - AirLink was working (not playable, but usable for browsing). The cause was in hardware offloading enabled for ethernet ports in Bridge tab of Mikrotik configuration. Disabling it suddenly fixed all the problems. Seems like hardware offloading causing extra delay, because routing and WiFi is handled by CPU and not by switch-chip. Or maybe it's some limitations of switch-chips related to QoS or etc.