XR500, ath10k drivers, and dropped frames on a cheap IP camera

I recently moved over from ddwrt on an old Asus RT-AC68U to openwrt on a Netgear XR500 (same hardware as the R7800). I'm using a nightly snapshot that has been plenty stable for my needs, with one exception.

I have a couple of cheap IP cameras that I use around the house for presence detection (using Frigate and Home Assistant, a fun combination!) however since switching over to openwrt on the XR500 I've noticed that the video on these particular cameras are stuttering and dropping frames like crazy.

I've tried switching wireless drivers as there are two available for this ath10k qca9984 radio. The mainline driver (ath10k-firmware-qca9984) seems to perform slightly better than the ct driver (ath10k-firmware-qca9984-ct or ath10k-firmware-qca9984-ct-htt), but both will still drop a ridiculous amount of frames when viewing the cameras in VLC.

If I swap my old Asus back in at the exact same location, same 2.4g channel (but a Broadcom chipset), there is no stuttering or dropped frames and everything is smooth in VLC.

I've tried enabling legacy B rates, lowered the DTIM interval down to 1, and am at a loss on even how to begin to debug this issue.

Are there any firmware parameters I can adjust that might help? Or any tips that anyone might have to help? Thanks in advance!

Not claiming that it would change anything, but you could try the latest upstream firmware https://github.com/kvalo/ath10k-firmware/raw/master/QCA9984/hw1.0/3.9.0.2/firmware-5.bin_10.4-3.9.0.2-00156 and place it under /lib/firmware/ath10k/QCA9884/hw1.0/firmware-5.bin (replacing the preinstalled file).

1 Like

I actually did try that too. Same result :frowning:

SSH in to the router and run cat /etc/config/wireless.

Redact the passwords in the "option key" sections.

Post the results in preformatted text, by using the icon highlighted in red...

OpenWRT Posting Icons

Are you currently using SQM?

If so, cat /etc/config/sqm

Installing and (keep-) running hostapd_cli to watch the AP side of things might provide further clues.

# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'soc/1b500000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
	option band '5g'
	option cell_density '0'
	option country 'US'
	option htmode 'VHT80'
	option channel '161'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2'
	option key '********'
	option ssid 'Home-5G'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'soc/1b700000.pci/pci0001:00/0001:00:00.0/0001:01:00.0'
	option band '2g'
	option htmode 'HT20'
	option cell_density '0'
	option country 'US'
	option disabled '0'
	option legacy_rates '1'
	option channel '6'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2'
	option key '********'
	option disassoc_low_ack '0'
	option ssid 'Home'
	option dtim_period '1'
	option wpa_group_rekey '3600'

config wifi-iface 'wifinet3'
	option device 'radio1'
	option mode 'ap'
	option encryption 'psk2'
	option key '********'
	option network 'guest'
	option isolate '1'
	option ssid 'Home-guest'

# cat /etc/config/sqm

config queue 'eth1'
	option interface 'wlan1-1'
	option debug_logging '0'
	option verbosity '5'
	option linklayer 'ethernet'
	option overhead '22'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option enabled '1'
	option download '512'
	option upload '1024'

I'm using SQM on the guest network, but everything else should be pretty standard.

What is your advertised (what you are paying for) speed?

You should be applying SQM to the WAN interface.

400/20. I don't have a bufferbloat issue. I just use SQM to limit my guests from downloading lots of data quickly.

That's what QoS is for...

Run this test and post your results -

This isn't a WAN issue I'm having though. The camera is dropping packets on the LAN.

I'm not going to argue with you...

I'm interested in the condition of your wireless connection...it's up to you if you want to run the test or not.

At VHT80 on channel 161, you are overlapped with 6 other channels.

I would try lowering that to 40.

Channel 6 is usually the "default" channel routers are set to out of the box. You might try 1 or 11.

I would suggest getting a WiFi analyzer app, which can show you who is using what channels in your area, your signal strength, and your signal-to-noise ratio (SNR).

Good luck.

Quick test: try and disable SQM just to see if it changes anything.

Thanks for the advice. The camera in question is running on the 2.4g radio. Channel 6 is the least used channel in my area. The signal and SNR at the camera is -61/101db. I actually have worse signal on the old Asus with the problematic camera.

The bufferbloat test gave me an A-, as expected.

@tapper The camera still drops tons of frames even with SQM disabled :frowning:

That was testing wireless on 2.4 GHz?

1 Like

How far away is the camera from the router?

Save your configs and try the following settings for 2.4 GHz config wifi-device -

option frag '2346'
option rts '2347'
option beacon_int '100'
option txpower '20'
option cell_density '1'
option distance '90'

90 is 90 meters, so 195 feet.

Turn off option legacy_rates

~15 feet.

Everything behaves perfectly with my old Asus on ddwrt.

Different hardware/firmware so no comparison.

Try the above settings.

Is that 2.4 GHz guest network on its own subnet? (i.e. 192.168.2.1)?

If not, it should be.

Signal is 61, noise is 101, SNR would be 40...

Hi can you try rebooting after you disable SQM? Just to rule out any kernel mods still being loaded.

No luck after disabling SQM and rebooting.

Also no luck with any of the RTS/CTS, threshold, power, and other changes.