Linux

Linux 自定義 CRDA WiFiregulation.bin 和 40MHz BW 5GHz 通道

  • May 9, 2018

我正在為 Linux 上的 CRDA 創建自己的regulation.bin。使用我的自定義監管.bin,我希望能夠使用 hostapd 為任何 5GHz、20MHz 或 40MHz BW 通道創建自己的熱點。

我關心 5GHz(不是 2.4 GHz),目前所有 20MHz BW 通道都在工作。現在我想讓 40 MHz 頻道工作。

到目前為止,對於 40 MHz BW 頻道,我只能讓 hostapd 使用頻道 38 和 46 創建熱點。如果我嘗試高於此(54,62,102,110,118,126,134,142,151 或 159),則 hostapd 抱怨頻道不在基於 CRDA 允許的頻道的支持列表。

這是正確的,因為 hostapd 列印的允許通道不包括這些 40 MHz 的較高通道。

但是,我認為它應該可以工作,因為我的自定義 CRDA 包括我認為 k 是正確的頻率和 BW 參數以包括 40 MHz 通道:

country FK:
   (2402 - 2472 @ 40), (30)
   (2474 - 2494 @ 20), (20), NO-OFDM
   (5170 - 5250 @ 80), (17)
   (5170 - 5210 @ 40), (20) 
   (5210 - 5250 @ 40), (20)
   (5250 - 5290 @ 40), (20)
   (5290 - 5330 @ 40), (20)
   (5250 - 5330 @ 80), (23) 
   (5250 - 5350 @ 80), (100 mW) 
   (5470 - 5725 @ 80), (1000 mW)
   (5735 - 5835 @ 80), (30)

當我啟動 hostapd 以創建我的 WiFi 熱點時,調試列印顯示以下內容為基於我的自定義 CRDA 條目的可選通道:

Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=17 dBm
Allowed channel: mode=2 chan=38 freq=5190 MHz max_tx_power=17 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=17 dBm
Allowed channel: mode=2 chan=42 freq=5210 MHz max_tx_power=17 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=46 freq=5230 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=30 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=14 freq=2484 MHz max_tx_power=20 dBm

我的 hostapd 配置文件如下所示:

# This is the name of the WiFi interface we configured above
interface=wlan1

# This is the name of the network
ssid=asdfasfd

# The network passphrase
wpa_passphrase=asdfasdf

# Use Settings that work for iOS / Android / Windows
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
country_code=FK

hw_mode=a
channel=54

#ieee80211n=1
#ht_capab=[HT40+]

beacon_int=100
dtim_period=2
max_num_sta=20
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
eapol_key_index_workaround=0
own_ip_addr=127.0.0.1

wpa=3
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

我必須對我的 CRDA 配置做些什麼才能通過 hostapd 獲得剩餘的 40 MHz BW 通道?謝謝。

沒關係我讓這個工作 - 看來你必須指定

$$ HT40- $$在 hostapd 配置中以及用於創建 40 MHz 通道的上 20MHz 通道號。

引用自:https://unix.stackexchange.com/questions/442622