OpenWRT Boot Times Affected by WiFi: Difference between revisions

wiki.TerraBase.info
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== OpenWRT Regulatory Database Flag Summary ==
...wondering about long boot times for OpenWRT 25.x.y on a WRT32X or similar if a WiFi Channel is set to "Auto"?


This section summarizes common Linux/OpenWRT wireless regulatory database flags used after a frequency range entry.
Could it really be the fault of a WiFi setting causing long boot times?  Believe it or not: YES!


Typical rule format:
=== This Needs to be Done on a Full Linux System with Make, Python, etc. ===
wget <nowiki>https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2026.03.18.tar.xz</nowiki>


<syntaxhighlight lang="text">
Then; tar -xf wireless-regdb-2026.03.18.tar.xz
(freq_start - freq_end @ max_channel_width), (max_power), optional_flags
</syntaxhighlight>
 
Example:
 
<syntaxhighlight lang="text">
(5250 - 5350 @ 80), (24), DFS, AUTO-BW
</syntaxhighlight>
 
{| class="wikitable"
! Item
! Meaning
 
| ! Effect on final wireless behavior                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------ |
| <code>@ 80</code>, <code>@ 160</code>, <code>@ 320</code>                                                                                        |
| Maximum channel width allowed by that regulatory rule, in MHz.                                                                                  |
| Can limit whether 20/40/80/160/320 MHz operation is accepted.                                                                                    |
| -                                                                                                                                                |
| <code>(24)</code>                                                                                                                                |
| Maximum transmit power in dBm.                                                                                                                  |
| Caps the transmit power exposed to the driver, <code>iw</code>, and hostapd.                                                                    |
| -                                                                                                                                                |
| <code>(4000 mW)</code>                                                                                                                          |
| Maximum transmit power in milliwatts.                                                                                                            |
| Same function as a dBm value, only expressed in milliwatts.                                                                                      |
| -                                                                                                                                                |
| <code>DFS</code>                                                                                                                                |
| Dynamic Frequency Selection required. The radio must check for radar before using the channel as an access point.                                |
| Can delay AP startup because Channel Availability Check / radar scanning must complete before normal operation.                                  |
| -                                                                                                                                                |
| <code>AUTO-BW</code>                                                                                                                            |
| Automatic regulatory bandwidth handling. Allows the regulatory code to evaluate bandwidth across compatible adjacent regulatory ranges.          |
| Can affect whether a requested wide channel is accepted. It does not mean automatic channel selection.                                          |
| -                                                                                                                                               |
| <code>NO-OUTDOOR</code>                                                                                                                          |
| Outdoor operation is not allowed under that rule.                                                                                                |
| Restricts legal use. Enforcement depends on the driver/regulatory stack; the device cannot physically determine indoor versus outdoor placement. |
| -                                                                                                                                                |
| <code>NO-IR</code>                                                                                                                              |
| No Initiating Radiation. The device may not initiate transmissions on that range.                                                               |
| Usually prevents AP/master mode and active scanning on that range.                                                                               |
| -                                                                                                                                                |
| <code>NO-OFDM</code>                                                                                                                            |
| Orthogonal Frequency-Division Multiplexing is not allowed.                                                                                      |
| Restricts use of OFDM-based modes. Mostly relevant to special cases such as old 2.4 GHz channel 14 behavior.                                    |
| -                                                                                                                                                |
| <code>wmmrule=ETSI</code>                                                                                                                        |
| Applies ETSI Wireless Multimedia / Quality of Service contention parameters.                                                                    |
| Affects Wireless Multimedia behavior, not DFS startup timing.                                                                                    |
| }                                                                                                                                                |
 
=== Practical Interpretation ===
 
The regulatory database affects the final usable wireless settings through this path:
 
<syntaxhighlight lang="text">
regulatory.db
kernel cfg80211 regulatory rules
iw reg get / iw phy
hostapd channel validation
radio starts, waits for DFS, falls back, or fails
</syntaxhighlight>
 
For boot-time testing, the most important flags are:


<syntaxhighlight lang="text">
Go into the directory: cd wireless-regdb-2026.03.18
DFS
NO-IR
AUTO-BW
</syntaxhighlight>


The <code>DFS</code> flag is the primary item associated with radar scanning and delayed AP availability. Removing or changing power alone is not a direct test of DFS behavior. A direct test compares the same frequency range with and without the <code>DFS</code> flag.
Edit the db.txt File (ORIGINAL "US Section" is below);<pre>
 
=== United States Regulatory Insert ===
 
<syntaxhighlight lang="text">
country US: DFS-FCC
country US: DFS-FCC
# S1G Channel 1-3
# S1G Channel 1-3
Line 114: Line 38:
# channels 1-6 EIRP=40dBm(43dBm peak)
# channels 1-6 EIRP=40dBm(43dBm peak)
(57240 - 71000 @ 2160), (40)
(57240 - 71000 @ 2160), (40)
</syntaxhighlight>
</pre>...to something similar to what's in the below "Try This..." Section
 
then;
 
* make clean && \
* make regulatory.db && \
* scp regulatory.db root@WhatEverIPAddressOfOpenWRTDevice /lib/firmware/regulatory.db (SCP will need to be installed on OpenWRT device)
 
=== Just So It's Known ===
<code>DFS</code> Dynamic Frequency Selection. The radio must check for radar before using that channel as an access point. This can delay wireless startup.
 
<code>AUTO-BW</code> automatic bandwidth handling inside the regulatory code. It helps determine whether wider channels are allowed across compatible frequency ranges. It does not mean automatic channel selection.
 
<code>NO-OUTDOOR</code> outdoor use is not allowed for that frequency range.
 
<code>NO-IR</code> No Initiating Radiation. The device is not allowed to initiate transmissions on that range. In practice, this can prevent access point mode or active scanning.


=== Notes ===
<code>NO-OFDM</code> Orthogonal Frequency-Division Multiplexing is not allowed. This is mostly relevant to special legacy restrictions.


* Channel 116 is inside the normal 5 GHz DFS block.
<code>wmmrule=ETSI</code> ETSI Wireless Multimedia parameters. This affects Quality of Service / contention behavior, not DFS startup delay.
* If DFS is removed from the applicable range and AP startup becomes faster, that supports DFS/radar handling as a startup-delay factor.
 
* A channel selected by automatic channel selection should not be assumed to be the objectively least congested channel. It only means the channel was selected by the available scan/survey data and the active regulatory/driver/hostapd rules.
=== Try This (For Boot Speed Testing ONLY!  Transmit Power ONLY changed to verify if OpenWRT does indeed read new config) ===
* A scan table showing fewer visible APs on a channel supports that the channel is cleaner from a visible Wi-Fi Basic Service Set perspective, but does not prove lowest total RF noise or lowest airtime utilization.
<syntaxhighlight lang="text">
country US: DFS-FCC
# S1G Channel 1-3
(902 - 904 @ 2), (33)
# S1G Channel 5-35
(904 - 920 @ 16), (33)
# S1G Channel 37-51
(920 - 928 @ 8), (33)
(2400 - 2472 @ 40), (33)
# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
(5150 - 5250 @ 80), (33), AUTO-BW
(5250 - 5350 @ 80), (33), AUTO-BW
# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
# Since 5725 ~ 5730 MHz belongs to the next range which has looser
# requirements, we can extend the range by 5 MHz to make the kernel
# happy and be able to use channel 144.
(5470 - 5730 @ 160), (33), AUTO-BW
(5730 - 5850 @ 80), (33), AUTO-BW
# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
(5850 - 5895 @ 40), (33), AUTO-BW
# 6g band
# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
(5925 - 7125 @ 320), (12), AUTO-BW
# 60g band
# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
# channels 1-6 EIRP=40dBm(43dBm peak)
(57240 - 71000 @ 2160), (40)
</syntaxhighlight>See?  Now change it back to be legal.

Latest revision as of 02:59, 29 June 2026

...wondering about long boot times for OpenWRT 25.x.y on a WRT32X or similar if a WiFi Channel is set to "Auto"?

Could it really be the fault of a WiFi setting causing long boot times? Believe it or not: YES!

This Needs to be Done on a Full Linux System with Make, Python, etc.

wget https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2026.03.18.tar.xz

Then; tar -xf wireless-regdb-2026.03.18.tar.xz

Go into the directory: cd wireless-regdb-2026.03.18

Edit the db.txt File (ORIGINAL "US Section" is below);

country US: DFS-FCC
	# S1G Channel 1-3
	(902 - 904 @ 2), (30)
	# S1G Channel 5-35
	(904 - 920 @ 16), (30)
	# S1G Channel 37-51
	(920 - 928 @ 8), (30)
	(2400 - 2472 @ 40), (30)
	# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
	(5150 - 5250 @ 80), (23), AUTO-BW
	(5250 - 5350 @ 80), (24), DFS, AUTO-BW
	# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
	# Since 5725 ~ 5730 MHz belongs to the next range which has looser
	# requirements, we can extend the range by 5 MHz to make the kernel
	# happy and be able to use channel 144.
	(5470 - 5730 @ 160), (24), DFS
	(5730 - 5850 @ 80), (31), AUTO-BW
	# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
	# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
	(5850 - 5895 @ 40), (27), NO-OUTDOOR, AUTO-BW, NO-IR
	# 6g band
	# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
	(5925 - 7125 @ 320), (12), NO-OUTDOOR, NO-IR
	# 60g band
	# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
	# channels 1-6 EIRP=40dBm(43dBm peak)
	(57240 - 71000 @ 2160), (40)

...to something similar to what's in the below "Try This..." Section

then;

  • make clean && \
  • make regulatory.db && \
  • scp regulatory.db root@WhatEverIPAddressOfOpenWRTDevice /lib/firmware/regulatory.db (SCP will need to be installed on OpenWRT device)

Just So It's Known

DFS Dynamic Frequency Selection. The radio must check for radar before using that channel as an access point. This can delay wireless startup.

AUTO-BW automatic bandwidth handling inside the regulatory code. It helps determine whether wider channels are allowed across compatible frequency ranges. It does not mean automatic channel selection.

NO-OUTDOOR outdoor use is not allowed for that frequency range.

NO-IR No Initiating Radiation. The device is not allowed to initiate transmissions on that range. In practice, this can prevent access point mode or active scanning.

NO-OFDM Orthogonal Frequency-Division Multiplexing is not allowed. This is mostly relevant to special legacy restrictions.

wmmrule=ETSI ETSI Wireless Multimedia parameters. This affects Quality of Service / contention behavior, not DFS startup delay.

Try This (For Boot Speed Testing ONLY! Transmit Power ONLY changed to verify if OpenWRT does indeed read new config)

country US: DFS-FCC
	# S1G Channel 1-3
	(902 - 904 @ 2), (33)
	# S1G Channel 5-35
	(904 - 920 @ 16), (33)
	# S1G Channel 37-51
	(920 - 928 @ 8), (33)
	(2400 - 2472 @ 40), (33)
	# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
	(5150 - 5250 @ 80), (33), AUTO-BW
	(5250 - 5350 @ 80), (33), AUTO-BW
	# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
	# Since 5725 ~ 5730 MHz belongs to the next range which has looser
	# requirements, we can extend the range by 5 MHz to make the kernel
	# happy and be able to use channel 144.
	(5470 - 5730 @ 160), (33), AUTO-BW
	(5730 - 5850 @ 80), (33), AUTO-BW
	# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
	# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
	(5850 - 5895 @ 40), (33), AUTO-BW
	# 6g band
	# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
	(5925 - 7125 @ 320), (12), AUTO-BW
	# 60g band
	# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
	# channels 1-6 EIRP=40dBm(43dBm peak)
	(57240 - 71000 @ 2160), (40)

See? Now change it back to be legal.