oblique / create_ap

[NOT MAINTAINED] This script creates a NATed or Bridged WiFi Access Point.
BSD 2-Clause "Simplified" License
4.41k stars 992 forks source link

Error: Failed to run hostapd, maybe a program is interfering. #454

Open chris-brown-nz opened 4 years ago

chris-brown-nz commented 4 years ago

I am stuck trying to create a bridged AP using a NIC connected to my broadband router and a second USB Wifi (TP-Link TL-WN722N v2). Using Ubuntu 19.10.

$ sudo create_ap -m bridge wlxd46e0e1849bc enp6s0 KidsWiFi <<pass>>
WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt
Config dir: /tmp/create_ap.wlxd46e0e1849bc.conf.20kL7riG
PID: 19861
Network Manager found, set wlxd46e0e1849bc as unmanaged device... DONE
Sharing Internet using method: bridge
Create a bridge interface... br0 created.
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlxd46e0e1849bc.conf.20kL7riG/hostapd_ctrl
Configuration file: /tmp/create_ap.wlxd46e0e1849bc.conf.20kL7riG/hostapd.conf
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlxd46e0e1849bc disabled_11b_rates=0
nl80211 driver initialization failed.
wlxd46e0e1849bc: interface state UNINITIALIZED->DISABLED
wlxd46e0e1849bc: AP-DISABLED 
wlxd46e0e1849bc: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlxd46e0e1849bc wasn't started
Error: Failed to run hostapd, maybe a program is interfering.
If an error like 'n80211: Could not configure driver mode' was thrown
try running the following before starting create_ap:
    nmcli r wifi off
    rfkill unblock wlan
Doing cleanup.. done

I have tried running nmcli r wifi off and rfkill unblock wlan as suggested but get the same error.

Do you have any idea what might be wrong please?