-
Notifications
You must be signed in to change notification settings - Fork 180
/
hostapd-WiFi6.conf
323 lines (284 loc) · 8.95 KB
/
hostapd-WiFi6.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# /etc/hostapd/hostapd-WiFi6.conf
# Documentation: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
# 2024-11-05
# Purpose: example hostapd.conf for rtl8852/32cu based USB WiFi adapters.
# Default: WiFi 6 on band 2 (5 GHz), 80 MHz channel width and WPA2.
# Tested with the mt7921u in-kernel driver that is part of the mt76
# series of drivers by Mediatek.
# Requirements for 6 GHz operation:
# - WPA3 for authentication required (see Security section)
# wpa_key_mgmt=SAE
# ieee80211w=2
# - SAE key management required for WPA3 (see Security section)
# wpa_key_mgmt=SAE
# - Management Frame Protection required for WPA3 (see Security section)
# ieee80211w=2
# - WME/WMM required
# wme_enabled=1
# wmm_enabled=1
# - Operating Class required
# op_class=<see Operating Class section>
# Information:
# - tested on RasPi4B with 64 bit RasPiOS
# - you need hostap 2.10 or later for WiFi 6/6e support: $ hostapd -v
# - testing shows significantly reduced range for 6 GHz vs 5 GHz
# - testing shows throughput can be less for 6 GHz vs 5 GHz
# - suggested improvements to this document are welcome
# SSID
ssid=mt7921au
# PASSPHRASE
wpa_passphrase=myPW1234
sae_password=myPW1234
# Band
# a = 5 GHz & 6 GHz (a/n/ac/ax), g = 2 Ghz (b/g/n)
hw_mode=a
# Channel
# https://en.wikipedia.org/wiki/List_of_WLAN_channels
# US:
# 2.4 GHz (1-11)
# 5 GHz ((36(42) and 149(155))
# 5 GHz DFS ((52(58), 100(106), 116(122), 132(138))
# 6 GHz (see op_class below)
# Channel (change as needed, only 1 channel line should be active)
# band 1 (2.4 GHz)
#channel=6
# band 2 (5 GHz)
channel=36
# band 4 (6 GHz)
#channel=65
# Operating Class
# Band 4 (6 GHz) only: The operating class is an indication of the 6 GHz
# channel size. Channels listed are based on US availability.
#
# 131 signifies channel width: 20 MHz.
# Valid Channel Numbers for 20 MHz Channel Width
# 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69,
# 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129,
# 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 185,
# 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 233
# PCS Channel Numbers
# 5, 21, 37, 53, 69, 85, 101, 117, 133, 149, 165, 181, 197, 213, 229
#
# 132 signifies channel width: 40 MHz.
# Valid Channel Numbers for 40 MHz Channel Width
# 1-5, 9-13, 17-21, 25-29, 33-37, 41-45, 49-53, 57-61, 65-69, 73-77,
# 81-85, 99-93, 97-101, 105-109, 113-117, 121-125, 129-133, 137-141,
# 145-149, 153-157, 161-165, 169-173, 177-181, 185-189, 193-197,
# 201-205, 209-213, 217-221, 225-229
# PCS Channel Numbers
# 5, 21, 37, 53, 69, 85, 101, 117, 133, 149, 165, 181, 197, 213, 229
#
# 133 signifies channel width: 80 MHz.
# Valid Channel Numbers for 80 MHz Channel Width
# 1-13, 17-29, 33-45, 49-61, 65-77, 81-93, 97-109, 113-125, 129-141,
# 145-157, 161-173, 177-189, 193-205, 209-221
# PCS Channel Numbers
# 5, 21, 37, 53, 69, 85, 101, 117, 133, 149, 165, 181, 197, 213
#
# 134 signifies channel width: 160 MHz.
# Valid Channel Numbers for 160 MHz Channel Width
# 1-29, 33-61, 65-93, 97-125, 129-157, 161-189, 193-221
# PCS Channel Numbers
# 5/21, 37/53, 69/85, 101/117, 133/149, 165/181, 197/213
#
# Activate the line below with desired setting for 6 GHz operation.
#op_class=133
# Country code
# https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
country_code=US
# Environments
#country3=0x20
# Outdoor
#country3=0x4f
# Indoor environment only
#country3=0x49
#he_6ghz_reg_pwr_type=0
# Advertises the country code, allowed channels and transmit power.
ieee80211d=1
# Enables support for 5 GHz DFS channels if supported.
# Requires ieee80211d=1 (above)
#ieee80211h=1
# Interfaces
# Bridge interface
bridge=br0
#wds_sta=1
# WiFi interface (wlan0 should be changed to your interface name)
interface=wlan0
# Set hostapd driver (nl80211 is used with all Linux mac80211 (in-kernel) and modern Realtek drivers)
driver=nl80211
# Event logger configuration
# Module bitfield (ORed bitfield of modules that will be logged; -1 =
# all modules):
# bit 0 (1) = IEEE 802.11
# bit 1 (2) = IEEE 802.1X
# bit 2 (4) = RADIUS
# bit 3 (8) = WPA
# bit 4 (16) = driver interface
# bit 6 (64) = MLME
#
# Levels (minimum value for logged events):
# 0 = verbose debugging
# 1 = debugging
# 2 = informational messages
# 3 = notification
# 4 = warning
#
logger_syslog=-1
logger_syslog_level=2
# Control interface - (i.e. for hostapd_cli)
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
# Various settings
beacon_int=100
dtim_period=2
skip_inactivity_poll=1
#
#multicast_to_unicast=0
#tx_queue_data2_aifs=1
#tx_queue_data2_cwmin=7
#tx_queue_data2_cwmax=15
#tx_queue_data2_burst=3.0
#
#tx_queue_data2_burst=2.0
#uapsd_advertisement_enabled=1
#utf8_ssid=1
#multi_ap=0
#bss_load_update_period=60
#chan_util_avg_period=600
#disassoc_low_ack=0
#preamble=1
# Security
# authentication algorithms (3 = both are allowed, use 3 for SAE otherwise use 1)
auth_algs=1
# Limit number of concurrent "clients" (stations) and do not restrict them by MAC address
max_num_sta=16
# Station MAC address based authentication
macaddr_acl=0
# hidden SSID (1 = hidden)
ignore_broadcast_ssid=0
# Opportunistic Key Caching (1 = enabled)
okc=1
# Enable WPA. (2 is required for WPA2, mixed and WPA3)
wpa=2
# Pairwise cipher
rsn_pairwise=CCMP CCMP-256 GCMP GCMP-256
#
# Activate only one of the following 3 sections
#
# 1. WPA2 Personal
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256
#
# 2. WPA2/WPA3 Transitional (mixed)
# Some older devices are not compatible with this setting.
#wpa_key_mgmt=SAE WPA-PSK WPA-PSK-SHA256
#ieee80211w=1
#sae_require_mfp=1
#
# 3. WPA3 Personal (required for band 4, 6 GHz)
# Some older devices are not compatible with this setting.
#wpa_key_mgmt=SAE
#ieee80211w=2
# Wireless Multimedia Extensions (WME)
# The below line is mandatory for 6 GHz.
#wme_enabled=1
# Wi-Fi Multimedia (WMM)
# The below line is mandatory for WiFi 4 and above.
wmm_enabled=1
# IEEE 802.11n (WiFi 4) configuration
# This section is required when operating WiFi 6 on band 1, 2.4 GHz
ieee80211n=1
#
# mt7921au (HT capabilities 0x9ff)
# 20 MHz channel width
#ht_capab=[LDPC][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]
# 40 MHz channel width
ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]
#
#
# IEEE 802.11ac (WiFi 5) configuration
# When using band 1 (2.4 GHZ) comment out the below line
ieee80211ac=1
# Channel width (0 = 40 MHz, 1 = 80 MHz)
# When using band 1 (2.4 GHZ) comment out the below line
vht_oper_chwidth=1
# VHT center channel (chan + 6)
# When using band 1 (2.4 GHZ) comment out the below line
vht_oper_centr_freq_seg0_idx=42
#
# mt7921au (VHT capabilities 0x339071b2)
# When using band 1 (2.4 GHZ) comment out the below line
vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMEE][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][BF-ANTENNA-4][MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP7]
#
#
# IEEE 802.11ax (WiFi 6) configuration
ieee80211ax=1
# Channel width (0 = 40 MHz. 1 = 80 Mhz)
# For WiFi 6 on band 1 (2.4 GHz) comment out the below line
he_oper_chwidth=1
# HE center channel (chan + 2 for 40 MHz) (chan + 6 for 80 MHz)
# For WiFi 6 on band 1 (2.4 GHz) comment out the below line
he_oper_centr_freq_seg0_idx=42
#
# Maximum MPDU Length of HE 6 GHz band capabilities.
# Indicates maximum MPDU length
# 0 = 3895 octets
# 1 = 7991 octets
# 2 = 11454 octets
#he_6ghz_max_mpdu=0
#
# Maximum A-MPDU Length Exponent of HE 6 GHz band capabilities. Indicates
# the maximum length of A-MPDU pre-EOF padding that # the STA can receive.
# This field is an integer in the range of 0 to 7. The length defined by
# this field is equal to 2 pow(13 + Maximum A-MPDU Length Exponent) -1
# octets
# 0 = AMPDU length of 8k
# 1 = AMPDU length of 16k
# 2 = AMPDU length of 32k
# 3 = AMPDU length of 65k
# 4 = AMPDU length of 131k
# 5 = AMPDU length of 262k
# 6 = AMPDU length of 524k
# 7 = AMPDU length of 1048k
#he_6ghz_max_ampdu_len_exp=2
#
# Rx Antenna Pattern Consistency of HE 6 GHz capability.
# Indicates the possibility of Rx antenna pattern change
# 0 = Rx antenna pattern might change during the lifetime of an association
# 1 = Rx antenna pattern does not change during the lifetime of an association
#he_6ghz_rx_ant_pat=0
#he_6ghz_tx_ant_pat=0
#he_6ghz_reg_pwr_type=0
#
# used by clients to discern the source of interference
# each AP in your area needs to use a different number
# allowed: 1-63
he_bss_color=37
#
# Activate beamforming capabilities
#he_su_beamformee=1
#
he_mu_edca_qos_info_param_count=0
he_mu_edca_qos_info_q_ack=0
he_mu_edca_qos_info_queue_request=0
he_mu_edca_qos_info_txop_request=0
he_mu_edca_ac_be_aifsn=8
he_mu_edca_ac_be_aci=0
he_mu_edca_ac_be_ecwmin=9
he_mu_edca_ac_be_ecwmax=10
he_mu_edca_ac_be_timer=255
he_mu_edca_ac_bk_aifsn=15
he_mu_edca_ac_bk_aci=1
he_mu_edca_ac_bk_ecwmin=9
he_mu_edca_ac_bk_ecwmax=10
he_mu_edca_ac_bk_timer=255
he_mu_edca_ac_vi_ecwmin=5
he_mu_edca_ac_vi_ecwmax=7
he_mu_edca_ac_vi_aifsn=5
he_mu_edca_ac_vi_aci=2
he_mu_edca_ac_vi_timer=255
he_mu_edca_ac_vo_aifsn=5
he_mu_edca_ac_vo_aci=3
he_mu_edca_ac_vo_ecwmin=5
he_mu_edca_ac_vo_ecwmax=7
he_mu_edca_ac_vo_timer=255
# End