# /etc/hostapd/hostapd-WiFi6.conf # Documentation: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf # 2024-10-19 # Purpose: hostapd.conf example for WiFi 6 configuration fot USB WiFi adapters using the mt7921au chip. # Status: rc8, please test and report. # Note: This hostapd.conf file is for WiFi 6 using band 2 (5 GHz). # Note: If you want to use WiFi on band 1, 2.4 GHz, there are notes that you need to follow. # Information: # - tested on RasPi4B with 64 bit RasPiOS # - see [Main Menu](https://github.com/morrownr/USB-WiFi) for... # -- make sure mt7921 firmware files are installed/updated # [How to install firmware for Mediatek-based USB WiFi adapters](https://github.com/morrownr/USB-WiFi/blob/main/home/How_to_Install_Firmware_for_Mediatek_based_USB_WiFi_adapters.md) # -- you need hostap 2.10 or later for WiFi 6 support: $ hostapd -v # [Upgrade hostapd to support WiFi 6](https://github.com/morrownr/USB-WiFi/blob/main/home/AP_Mode/Upgrade_hostapd.md) # - improvements are welcome # SSID ssid=myPI-WiFi6 # PASSPHRASE wpa_passphrase=myPW1234 # Band: a = 5GHz & 6GHz (a/n/ac/ax), g = 2Ghz (b/g/n) hw_mode=a # Channel availability varies by country # 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) # band 1 (2.4 GHz) #channel=6 # band 2 (5 GHz) channel=36 # band 4 (6 GHz) #channel=55 # The operating class is an indication of the 6 GHz channel size. An # operating class of 134 indicates a 160 MHz channel. Likewise, 133 # denotes an 80 MHz channel, 132 indicates a 40 MHz channel, and 131 # indicates a channel size of 20 MHz. # 133 signifies channel width: 80 MHz # channels 7, 23, 39, 55, 71, 87, 103, 119, 135, 151, 167, 183, 199, 215 # 134 signifies channel width: 160 MHz # channels 15, 47, 79, 111, 143, 175, 207 #op_class=133 # Country code # https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 country_code=US # All environments #country3=0x20 # Outdoor #country3=0x4f # Indoor environment only #country3=0x49 # Advertises the country_code and the set of allowed channels and transmit power levels ieee80211d=1 # Enables support for 5GHz DFS channels if supported (requires ieee80211d=1) #ieee80211h=1 # Bridge interface bridge=br0 # WiFi interface (wlan0 should be changed to your interface name) interface=wlxXXXXXXXXXXXX # Set hostapd driver (nl80211 is used with all Linux mac80211 (in-kernel) and modern Realtek drivers) driver=nl80211 # hostapd 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 # ctrl_interface=/var/run/hostapd # ctrl_interface_group=0 # Various settings #beacon_int=100 #dtim_period=2 #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 skip_inactivity_poll=1 preamble=1 # Security # authentication algorithms (3 = both are allowed, use 3 for SAE otherwise use 1) auth_algs=1 # MAC address -based authentication (0 = accept unless in deny list) 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 wpa_pairwise=CCMP rsn_pairwise=CCMP #wpa_pairwise=CCMP CCMP-256 #rsn_pairwise=CCMP CCMP-256 # # Activate only one of the following 3 sections # # 1. WPA2 Personal wpa_key_mgmt=WPA-PSK #wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 # # 2. WPA2/WPA3 Transitional (mixed) # Many older WPA2 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) # Many older WPA2 devices are not compatible with this setting #wpa_key_mgmt=SAE #ieee80211w=2 # IEEE 802.11n (WiFi 4) band 1, 2.4 GHz configuration # This section is required when operating WiFi 6 on band 1, 2.4 GHz #ieee80211n=1 #wmm_enabled=1 # # generic setting - 20 MHz channel width #ht_capab=[SHORT-GI-20] # # generic setting - 40 MHz channel width (if allowed) #ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40] # # 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 # generic setting #vht_capab=[SHORT-GI-80] # # 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 + 6) # For WiFi 6 on band 1 (2.4 GHz) comment out the below line he_oper_centr_freq_seg0_idx=42 # 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 #he_default_pe_duration=4 #he_rts_threshold=1023 #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 of hostapd-WiFi6.conf