我正在尝试使用 hostapd 设置 wifi 热点,配置如下:
interface=wlan0
ssid=My_AP
hw_mode=g
channel=2
auth_algs=1
wmm_enabled=0
ieee80211n=1
一旦启动守护进程,就会出现此错误:
Completing interface initialization
Mode: IEEE 802.11g Channel: 2 Frequency: 2417 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2417 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2417 MHz, cf2=0 MHz)
nl80211: Failed to set channel (freq=2417): -22 (Invalid argument)
Could not set channel for kernel driver
Interface initialization failed
这是什么问题?谢谢
答案1
检查您的wifi适配器/加密狗功能iwconfig
- 它可能不支持n模式。
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
ieee80211n=1
如果没有提及 n 模式,则从 hostapd 配置文件中删除