Questions about radar detection / DFS

Hey all,

I'm pretty new to OpenWRT, so I apologize in advance for any newbie mistakes. I'm a C/C++ dev so the tech side isn't too rough, but networking has always been a tough nut to crack for me.

I live in an extremely congested area (Los Angeles), so I've been trying to get the 5Ghz on my Archer C7 v2 running on radar detection channels. If it's applicable, it's running as an AP with an OPNSense device acting as the main router/firewall. The output of iw list on my device is as follows (abridged to what I believe to be the relevant section):

			* 5180 MHz [36] (23.0 dBm)
			* 5200 MHz [40] (23.0 dBm)
			* 5220 MHz [44] (23.0 dBm)
			* 5240 MHz [48] (23.0 dBm)
			* 5260 MHz [52] (23.0 dBm) (radar detection)
			* 5280 MHz [56] (23.0 dBm) (radar detection)
			* 5300 MHz [60] (23.0 dBm) (radar detection)
			* 5320 MHz [64] (23.0 dBm) (radar detection)
			* 5500 MHz [100] (23.0 dBm) (radar detection)
			* 5520 MHz [104] (23.0 dBm) (radar detection)
			* 5540 MHz [108] (23.0 dBm) (radar detection)
			* 5560 MHz [112] (23.0 dBm) (radar detection)
			* 5580 MHz [116] (23.0 dBm) (radar detection)
			* 5600 MHz [120] (23.0 dBm) (radar detection)
			* 5620 MHz [124] (23.0 dBm) (radar detection)
			* 5640 MHz [128] (23.0 dBm) (radar detection)
			* 5660 MHz [132] (23.0 dBm) (radar detection)
			* 5680 MHz [136] (23.0 dBm) (radar detection)
			* 5700 MHz [140] (23.0 dBm) (radar detection)
			* 5720 MHz [144] (23.0 dBm) (radar detection)
			* 5745 MHz [149] (30.0 dBm)
			* 5765 MHz [153] (30.0 dBm)
			* 5785 MHz [157] (30.0 dBm)
			* 5805 MHz [161] (30.0 dBm)
			* 5825 MHz [165] (30.0 dBm)
			* 5845 MHz [169] (27.0 dBm) (no IR)
			* 5865 MHz [173] (27.0 dBm) (no IR)
	valid interface combinations:
		 * #{ managed, P2P-client } <= 16, #{ P2P-GO } <= 3, #{ AP } <= 16, #{ IBSS } <= 1,
		   total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz }

However, running any of these channels results in "wireless not associated" on the 5Ghz device. logread doesn't give too many clues:

Wed Aug  3 03:15:46 2022 kern.warn kernel: [250338.986669] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16  peers: 127  tid: 256
Wed Aug  3 03:15:46 2022 kernel: [250339.004186] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
Wed Aug  3 03:15:46 2022 kernel: [250339.010620] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424  sw-crypt: 0 ct-sta: 0'
Wed Aug  3 03:15:46 2022 kernel: [250339.018884] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 24984 iram: 38672'
Wed Aug  3 03:15:46 2022 kern.warn kernel: [250339.087291] ath10k_pci 0000:00:00.0: pdev param 0 not supported by firmware
Wed Aug  3 03:15:46 2022 kernel: [250339.102376] ath10k_pci 0000:00:00.0: rts threshold -1
Wed Aug  3 03:15:46 2022 kernel: [250339.113674] br-lan: port 3(wlan0) entered blocking state
Wed Aug  3 03:15:46 2022 kernel: [250339.119241] br-lan: port 3(wlan0) entered disabled state
Wed Aug  3 03:15:46 2022 kernel: [250339.125008] device wlan0 entered promiscuous mode
Wed Aug  3 03:15:46 2022 daemon.notice hostapd: Frequency 5680 (primary) not allowed for AP mode, flags: 0xe007179 RADAR
Wed Aug  3 03:15:46 2022 daemon.err hostapd: Primary frequency not allowed
Wed Aug  3 03:15:46 2022 daemon.warn hostapd: wlan0: IEEE 802.11 Configured channel (136) or frequency (5680) not found from the channel list of the current mode (2) IEEE 802.11a
Wed Aug  3 03:15:46 2022 daemon.warn hostapd: wlan0: IEEE 802.11 Hardware does not support configured channel

The weird thing is, I don't see any mention of radar detected in the logs. Furthermore, LUCI presents these channels as available to me, that is, channels 100-144 are available in the dropdown. My device driver is set to 'US', and I've tried switching between manually setting it to 'US' and back to 'default' to no avail. I'd appreciate any help on this! I feel like there might just be some option I'm neglecting to set, but I can't figure out what that might be.

Also, I'd be grateful if anyone could tell me if there's some kind of utility in OpenWRT that allows you to scan for radar without needing to manually check every channel. I've scoured these forums and reddit but haven't found anything aside from scripts that just automate that process.

Here's my /etc/config/wireless as well, if that helps:

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'pci0000:00/0000:00:00.0'
	option band '5g'
	option cell_density '2'
	option hwmode '11a'
	option htmode 'VHT20'
	option channel '136'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid '********'
	option key '*******'
	option encryption 'psk2'
	option ieee80211r '1'
	option mobility_domain '1bef' # 802.11r setup is preemptive; haven't set up the second AP yet
	option ft_over_ds '1'
	option ft_psk_generate_local '1'

Thank you!

You need to wait for a minute after you enable Wi-Fi on a DFS channel before it is up and running. As simple as that.


Thanks! I've been throwing everything I can think at this issue, but in my everlasting impatience I hadn't considered just giving it a minute lol. However, I've let it sit for several minutes with no luck. I just noticed something further up in the logs that I hadn't seen before:

Frequency 5580 (primary) not allowed for AP mode, flags: 0x3f07979 RADAR

Is this OpenWRT telling me that DFS isn't allowed when the device is in AP mode? From what I've collected from other forum posts, this wouldn't seem to be the case. I also don't see anything in the logs that suggest it's even trying to use DFS, but I'll let it sit for a couple hours and see if it decides to figure itself out.

Maybe the HW does not support it?

Did you try VHT80 ?

This one is deprecated in favour of band, which is two lines above. I would remove it.

1 Like

Yes @fantom-x said seeing a deprecated option in there suggests you're not running the latest version.

I think that your local airport has a TDWR radar, so don't attempt to use channels 132-144 in any case.

Since DFS may require changing channels you should specify a list of channels instead of one:
option channels '52 56 60 64 100 104 108 112 116 120 124 128'
That should result in first finding a channel with few neighbors, then scanning it for radar for 1 minute, if radar is found it will try a different one. RADAR events other than from a nearby TDWR tend to be very random, probably from passing military aircraft.

1 Like

I may have had a different symptom/situation last year but my R6260 wouldn't run on DFS channels until I added
option country 'US'
to the 5g radio config. Worked like a charm after adding that and rebooting. Try it! :slight_smile:

1 Like

Yes I completely missed that. Country must be set.

That obvious requirement of setting the country code correctly aside, radar events in Los Angeles wouldn't surprise me at all (airports, ports, military installations all nearby).

wifi6e/ 6 GHz can help.

Thanks all! I had added option country 'US' before to no avail, but I hadn't realized that band was the newer version of hwmode! I was going off the docs' recommendations for DFS, which still used hwmode in the example config.

I also took @mk24's advice and set option channels '52 56 60 64 100 104 108 112 116 120 124 128'. After re-entering option country 'US' and restarting, it all worked!

I'm just confused trying to figure out what the issue was; my guess is that having hwmode and band both set confused the device. I think I accidentally had both of those in there from the start since I may have accidentally used an outdated tutorial article for setting the C7 up in AP mode.

Thanks again to everyone!

1 Like

It is best to let the firstboot build out the radip settings in the wifi-device block to default, then add your country. You can add other relatively minor changes like txpower and bandwidth.

Actually, LAX does not have a TDWR as the chance of a wind-shear storm happening there is extremely low, so you could try the other channels as well.