I believe I am a rare use case, so here is my setup:
Lenovo laptop running Kubuntu (wifi connection)
hAp ac2
Raspberry pi 3B+ (wired connection)
Distance between laptop and router is 2m with no obstacles (living room, laptop on desk, router on shelf, not practical to run cable, no big electrical devices close to router except hifi amplifier 1m away).
So, I want to send audio from my laptop to my raspberry which is connected to my stereo. For that, I am using pulseaudio, which is sending data using a TCP connection (more info - https://gavv.github.io/articles/pulseau ... d/#tunnels). Audio is usually from a youtube video, but I have the same problems when playing local audio or video files stored on my laptop.
I am getting constant buffer underruns on the raspberrypi, which result in loss of a/v sync and sound dropping out. The buffer underruns are visible in logs made by the receiving pulseaudio server. They appear several times per minute.
I do not get these underruns when the laptop is using a wired connection.
My wireless configuration is: (I removed the mac addresses and network names)
Code: Select all
0 R name="wlan1" mtu=1500 l2mtu=1600 mac-address= arp=enabled disable-running-check=no interface-type=IPQ4019 radio-name=""
mode=ap-bridge ssid="" area="" frequency-mode=regulatory-domain country=norway installation=indoor antenna-gain=3 frequency=auto
band=2ghz-onlyn channel-width=20mhz secondary-channel="" scan-list=default wireless-protocol=802.11 rate-set=default
supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps basic-rates-b=1Mbps
basic-rates-a/g=6Mbps max-station-count=2007 distance=indoors tx-power-mode=default vlan-mode=no-tag vlan-id=1 wds-mode=disabled wds-default-bridge=none
wds-default-cost=100 wds-cost-range=50-150 wds-ignore-ssid=no update-stats-interval=disabled bridge-mode=enabled default-authentication=yes
default-forwarding=yes default-ap-tx-limit=0 default-client-tx-limit=0 wmm-support=required hide-ssid=no security-profile=default wps-mode=disabled
station-roaming=disabled disconnect-timeout=3s on-fail-retry-time=100ms preamble-mode=short compression=no allow-sharedkey=no
station-bridge-clone-mac=00:00:00:00:00:00 ampdu-priorities=0 guard-interval=any
ht-supported-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15,mcs-16,mcs-17,mcs-18,mcs-19,mcs-20,mcs-
21,mcs-22,mcs-23
ht-basic-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7 tx-chains=0,1 rx-chains=0,1 amsdu-limit=8192 amsdu-threshold=8192 tdma-period-size=2
nv2-queue-count=2 nv2-qos=default nv2-cell-radius=30 nv2-security=disabled nv2-preshared-key="" nv2-mode=dynamic-downlink nv2-downlink-ratio=50
nv2-sync-secret="" hw-retries=2 frame-lifetime=0 adaptive-noise-immunity=ap-and-client-mode hw-fragmentation-threshold=disabled hw-protection-mode=rts-cts
hw-protection-threshold=0 frequency-offset=0 rate-selection=advanced multicast-helper=default multicast-buffering=enabled keepalive-frames=enabled
skip-dfs-channels=disabled
1 R name="wlan2" mtu=1500 l2mtu=1600 mac-address= arp=enabled disable-running-check=no interface-type=IPQ4019 radio-name=""
mode=ap-bridge ssid="5" area="" frequency-mode=regulatory-domain country=norway installation=any antenna-gain=3 frequency=auto
band=5ghz-onlyac channel-width=20/40/80mhz-XXXX secondary-channel="" scan-list=default wireless-protocol=802.11 rate-set=default
supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps basic-rates-a/g=6Mbps max-station-count=2007 distance=indoors tx-power-mode=default
vlan-mode=no-tag vlan-id=1 wds-mode=disabled wds-default-bridge=none wds-default-cost=100 wds-cost-range=50-150 wds-ignore-ssid=no
update-stats-interval=disabled bridge-mode=enabled default-authentication=yes default-forwarding=yes default-ap-tx-limit=0 default-client-tx-limit=0
wmm-support=required hide-ssid=no security-profile=default wps-mode=disabled station-roaming=disabled disconnect-timeout=3s on-fail-retry-time=100ms
preamble-mode=both compression=no allow-sharedkey=no station-bridge-clone-mac=00:00:00:00:00:00 ampdu-priorities=0 guard-interval=any
ht-supported-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15,mcs-16,mcs-17,mcs-18,mcs-19,mcs-20,mcs-
21,mcs-22,mcs-23
I have the same problems when using either of the two networks. I have tried using just one network, with the other one turned off, same thing.
I've tried:
- automatic or manual channel selection on both networks,
- different frequency widths
- Setting only-n and only-ac
- disabling low data rates
- enabling/disabling WMM Support, Multicast Helper, Multicast Buffering, Hw. Retries, Hw. Protection Mode, Adaptive Noise Immunity
- setting Installation to Any
- vertical and horizontal orientation of router
I have not tried:
- setting manual Tx power
- any other advanced configuration on the router regarding network traffic.
Things I've modified:
- SNTP enabled
- changed DHCP address pool
- setup piHole running on raspberry to be used as DNS server
Before switching to the hAp, I have been using a TP-link TL-WR741ND running OpenWRT. I was using a 2.4GHz wifi network, with settings as can be seen in the attached file.
The TP-Link has an external antenna.
I had a lot less underruns when using the TP-link - less than 10 i several hours, compared to several per minute on the hAP.
Does anyone have any ideas what else can I try? I know that the tp-link has an advantage because of the external antenna, but the laptop is less than 2 meters away from the hAp, so I don't believe the problem is with the wireless network, but maybe in some other part of the mikrotik configuration.
I have been trying to fix this for almost two weeks now, so there is probably something I've forgotten to mention.
If this belongs in the WIreless subforum, I can remove this post and post again there.
Thanks for any ideas!