Hostapd nl80211 无法设置接口 -19

Hostapd nl80211 无法设置接口 -19

我正在尝试在 Debian Linux 上运行 hostapd。我在 Olimex OLinuXino A13 WiFi 上使用 Realtek rtl8188 usb wifi 卡。但是,当我运行该命令时,hostapd -dd /etc/hostapd/hostapd.conf出现错误。

root@a13-OLinuXino:~# hostapd -dd /etc.hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd.conf
Could not open file /sys/class/net/wlan12/phy80211/name: No such file or directory
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
netlink: Operstate: Linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Failed to set interface 3 to mode 2: -19 (No such device)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Failed to set interface 3 to mode 2: -19 (No such device)
nl80211: Interface mode change to 2 from 0 failed
nl80211 driver initialization failed.

这是 hostapd 的配置文件:

root@a13-OLinuXino:~# cat /etc/hostapd/hostapd.conf
interface=wlan12
bridge=br0
driver=nl80211
country_code=NL
ssid=NAME
hw_mode=g
channel=3
wpa=2
wpa_passphrase=PASSWORD
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

很感谢任何形式的帮助!

答案1

你应该将其更改driver=nl80211driver=rtl871xdrv在你的/etc/hostapd/hostapd.conf文件上:

RT8188C和RT8192C等Wifi芯片(被识别为RTL8188CUS(或其变体))不支持hostapd的标准nl80211驱动程序

AP 模式(通过 hostapd)支持将自己标识为 RTL8188CUS(或其变体)的 wifi 芯片。如果您看到或听到有人声称某个 wifi 芯片可以与名为 的特殊版本的 hostapd 驱动程序配合使用rtl871xdrv,那么就是这样。

或者您可以安装 支持hostapd的自定义版本nl80211

apt-get remove hostapd
git clone https://github.com/jenssegers/RTL8188-hostapd.git
cd RTL8188-hostapd/hostapd
make
make install

相关内容