![nl80211:无法设置频道:-22(无效参数)](https://linux22.com/image/1530025/nl80211%EF%BC%9A%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AE%E9%A2%91%E9%81%93%EF%BC%9A-22%EF%BC%88%E6%97%A0%E6%95%88%E5%8F%82%E6%95%B0%EF%BC%89.png)
我正在尝试使用 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 配置文件中删除