0

我正在使用带有 linux 内核的 Ubuntu-server 20.04LTS,5.4.124并安装了 hostapd v2.9,打算用作 5GHz 接入点。我为我的 sparklan wifi 模块安装了 ath10k 驱动程序。除了安装 Ubuntu、hostapd 和 dnsmasq(用于 dhcp-server)之外,什么都没有完成。- 除了在内核中启用 DFS,否则不允许使用 5GHz AC 接入点。

我正在使用以下 hostapd 配置(大部分来自这里):

### hostapd configuration file
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan0
driver=nl80211
bridge=

### IEEE 802.11
ssid=testwifi5ghz
hw_mode=a
channel=0
max_num_sta=20
macaddr_acl=0
auth_algs=1
disassoc_low_ack=1

### DFS
ieee80211h=1
ieee80211d=1
country_code=US

### IEEE 802.11n
ieee80211n=1
ht_capab=[HT40-][HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

### IEEE 802.11ac
ieee80211ac=1
# 0 = 20 or 40 MHz operating Channel width
# 1 = 80 MHz channel width
# 2 = 160 MHz channel width
# 3 = 80+80 MHz channel width
vht_oper_chwidth=1
# vht_capab: VHT capabilities (list of flags)
vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][BF-ANTENNA-4][SOUNDING-DIMENSION-4]
# center freq = 5 GHz + (5 * index)
# So index 42 gives center freq 5.210 GHz
# which is channel 42 in 5G band
# vht_oper_centr_freq_seg0_idx is calculated for VHT80 with channel + 6. 
# If you see “set channel failed to set in kernel” error message, most likely the regulatory database doesn't support 80 MHz channels.
vht_oper_centr_freq_seg0_idx=${CENTERFREQ}

### WPA/IEEE 802.11
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=testtest
wpa_pairwise=TKIP
rsn_pairwise=CCMP

# From OpenWRT for Linksys WRT 1900ACS....
ignore_broadcast_ssid=0

# Required for inter-STA visibility/communication
ap_isolate=0

### hostapd event logger configuration
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
max_num_sta=20
macaddr_acl=0
auth_algs=1
disassoc_low_ack=1

### Wi-Fi Multimedia (WMM), specification that enhances QoS by prioritizing packets. Subset of 802.11e
wmm_enabled=1
uapsd_advertisement_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

### TX queue parameters
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5

own_ip_addr=127.0.0.1

Hostapd 在引导时由默认的 systemd hostapd.service 启动。

我通过 iPerf3 测试(phone1 -> wifi 接入点 -> phone2)测试 wifi,其中 phone1 是 iPerf3 客户端,phone2 是 iPerf3 服务器。

由于某种原因,wifi 接入点的吞吐量从启动开始就很低。当 hostapd 接入点启动时,可以建立稳定的 ~70mbit/s 连接。但是...如果我然后重新启动 hostapd.service,我会在手机之间获得稳定的 ~150mbit/s 连接,这是两倍多。这与我完成的每次重启都是 100% 一致的。

  1. 连接手机并启动 iPerf3 服务器/客户端
  2. 查看 ~70mbit/s 连接吞吐量
  3. 重启 hostapd.service
  4. 请参阅 ~150mbit/s 连接吞吐量。
  5. 重新启动并重复。

这是我迄今为止尝试过的:

  • 将 hostapd 服务设置为,type=idle但这根本没有效果。
  • 通过创建一个restart-wifi.servicewith来尝试破解解决方案type=idle,再次没有任何影响。
  • 谷歌搜索了这个问题,但我似乎找不到任何有同样问题的人。

所以问题是这样的:

  1. 这是怎么回事?我会假设如果启动时出现问题,接入点甚至都不会启动?
  2. 如何确保 hostapd 接入点从启动时提供明显有能力的 ~150mbit/s 吞吐量,而不是 ~70mbit/s?

任何指针将不胜感激。

4

0 回答 0