oblique / create_ap

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

interface state UNINITIALIZED->DISABLED , AP-DISABLED while creating hotspot over single wifi adapter. #374

Open hackdelight opened 5 years ago

hackdelight commented 5 years ago

I'm using thinkpad x230, Ubuntu 18.04 in wifi settings the wifi name is: Centrino Advanced N-6205[Taylor Peak] (802.11a/b/g/n)

I can create hotspot while connected to wifi in windows 10 with one single wifi adapter. I tried to do the same in ubuntu 18.04 found create_ap program, installed it. used: sudo create_ap wlp3s0 wlp3s0 ssid password12345 got error:

Network Manager found, set ap9 as unmanaged device... DONE wlp3s0 is already associated with channel 13 (2472 MHz), fallback to channel 13 Creating a virtual WiFi interface... ap9 created. ERROR: Your adapter can not transmit to channel 13, frequency band 2.4GHz.

after that, i found from one of the issues that i should delete Channel=$WIFI_IFACE_CHANNEL in create_ap, then i got this error:

Network Manager found, set ap9 as unmanaged device... DONE wlp3s0 is already associated with channel 13 (2472 MHz), fallback to channel 13 Creating a virtual WiFi interface... ap9 created. Sharing Internet using method: nat hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlp3s0.conf.IWJ5Dfe2/hostapd_ctrl Configuration file: /tmp/create_ap.wlp3s0.conf.IWJ5Dfe2/hostapd.conf Using interface ap9 with hwaddr 6c:88:14:3b:6e:6a and ssid "beybi" Failed to set beacon parameters Interface initialization failed ap9: interface state UNINITIALIZED->DISABLED ap9: AP-DISABLED ap9: Unable to setup interface. ap9: interface state DISABLED->DISABLED ap9: AP-DISABLED hostapd_free_hapd_data: Interface ap9 wasn't started nl80211: deinit ifname=ap9 disabled_11b_rates=0 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

It seems like ithe problem lies in

ap9: interface state UNINITIALIZED->DISABLED ap9: AP-DISABLED ap9: Unable to setup interface. ap9: interface state DISABLED->DISABLED ap9: AP-DISABLED

my iw list:

Wiphy phy0 max # scan SSIDs: 20 max scan IEs length: 195 bytes max # sched scan SSIDs: 0 max # match sets: 0 max # scan plans: 1 max scan plan interval: -1 max scan plan iterations: 0 Retry short limit: 7 Retry long limit: 4 Coverage class: 0 (up to 0m) Device supports RSN-IBSS. Supported Ciphers:

  • WEP40 (00-0f-ac:1)
  • WEP104 (00-0f-ac:5)
  • TKIP (00-0f-ac:2)
  • CCMP-128 (00-0f-ac:4)
  • CCMP-256 (00-0f-ac:10)
  • GCMP-128 (00-0f-ac:8)
  • GCMP-256 (00-0f-ac:9) Available Antennas: TX 0 RX 0 Supported interface modes:
  • IBSS
  • managed
  • AP
  • AP/VLAN
  • monitor Band 1: Capabilities: 0x107e HT20/HT40 SM Power Save disabled RX Greenfield RX HT20 SGI RX HT40 SGI No RX STBC Max AMSDU length: 3839 bytes DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 4 usec (0x05) HT Max RX data rate: 300 Mbps HT TX/RX MCS rate indexes supported: 0-15 Bitrates (non-HT):
  • 1.0 Mbps
  • 2.0 Mbps (short preamble supported)
  • 5.5 Mbps (short preamble supported)
  • 11.0 Mbps (short preamble supported)
  • 6.0 Mbps
  • 9.0 Mbps
  • 12.0 Mbps
  • 18.0 Mbps
  • 24.0 Mbps
  • 36.0 Mbps
  • 48.0 Mbps
  • 54.0 Mbps Frequencies:
  • 2412 MHz [1] (15.0 dBm)
  • 2417 MHz [2] (15.0 dBm)
  • 2422 MHz [3] (15.0 dBm)
  • 2427 MHz [4] (15.0 dBm)
  • 2432 MHz [5] (15.0 dBm)
  • 2437 MHz [6] (15.0 dBm)
  • 2442 MHz [7] (15.0 dBm)
  • 2447 MHz [8] (15.0 dBm)
  • 2452 MHz [9] (15.0 dBm)
  • 2457 MHz [10] (15.0 dBm)
  • 2462 MHz [11] (15.0 dBm)
  • 2467 MHz [12] (15.0 dBm) (no IR)
  • 2472 MHz [13] (15.0 dBm) (no IR) Band 2: Capabilities: 0x107e HT20/HT40 SM Power Save disabled RX Greenfield RX HT20 SGI RX HT40 SGI No RX STBC Max AMSDU length: 3839 bytes DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 4 usec (0x05) HT Max RX data rate: 300 Mbps HT TX/RX MCS rate indexes supported: 0-15 Bitrates (non-HT):
  • 6.0 Mbps
  • 9.0 Mbps
  • 12.0 Mbps
  • 18.0 Mbps
  • 24.0 Mbps
  • 36.0 Mbps
  • 48.0 Mbps
  • 54.0 Mbps Frequencies:
  • 5180 MHz [36] (15.0 dBm) (no IR)
  • 5200 MHz [40] (15.0 dBm) (no IR)
  • 5220 MHz [44] (15.0 dBm) (no IR)
  • 5240 MHz [48] (15.0 dBm) (no IR)
  • 5260 MHz [52] (15.0 dBm) (no IR, radar detection)
  • 5280 MHz [56] (15.0 dBm) (no IR, radar detection)
  • 5300 MHz [60] (15.0 dBm) (no IR, radar detection)
  • 5320 MHz [64] (15.0 dBm) (no IR, radar detection)
  • 5500 MHz [100] (15.0 dBm) (no IR, radar detection)
  • 5520 MHz [104] (15.0 dBm) (no IR, radar detection)
  • 5540 MHz [108] (15.0 dBm) (no IR, radar detection)
  • 5560 MHz [112] (15.0 dBm) (no IR, radar detection)
  • 5580 MHz [116] (15.0 dBm) (no IR, radar detection)
  • 5600 MHz [120] (15.0 dBm) (no IR, radar detection)
  • 5620 MHz [124] (15.0 dBm) (no IR, radar detection)
  • 5640 MHz [128] (15.0 dBm) (no IR, radar detection)
  • 5660 MHz [132] (15.0 dBm) (no IR, radar detection)
  • 5680 MHz [136] (15.0 dBm) (no IR, radar detection)
  • 5700 MHz [140] (15.0 dBm) (no IR, radar detection)
  • 5745 MHz [149] (13.0 dBm) (no IR)
  • 5765 MHz [153] (13.0 dBm) (no IR)
  • 5785 MHz [157] (13.0 dBm) (no IR)
  • 5805 MHz [161] (13.0 dBm) (no IR)
  • 5825 MHz [165] (13.0 dBm) (no IR) Supported commands:
  • new_interface
  • set_interface
  • new_key
  • start_ap
  • new_station
  • new_mpath
  • set_mesh_config
  • set_bss
  • authenticate
  • associate
  • deauthenticate
  • disassociate
  • join_ibss
  • join_mesh
  • set_tx_bitrate_mask
  • frame
  • frame_wait_cancel
  • set_wiphy_netns
  • set_channel
  • set_wds_peer
  • probe_client
  • set_noack_map
  • register_beacons
  • start_p2p_device
  • set_mcast_rate
  • connect
  • disconnect
  • set_qos_map
  • set_multicast_to_unicast Supported TX frame types:
  • IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 Supported RX frame types:
  • IBSS: 0x40 0xb0 0xc0 0xd0
  • managed: 0x40 0xd0
  • AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
  • AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
  • mesh point: 0xb0 0xc0 0xd0
  • P2P-client: 0x40 0xd0
  • P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
  • P2P-device: 0x40 0xd0 WoWLAN support:
  • wake up on disconnect
  • wake up on magic packet
  • wake up on pattern match, up to 20 patterns of 16-128 bytes, maximum packet offset 0 bytes
  • can do GTK rekeying
  • wake up on GTK rekey failure
  • wake up on EAP identity request
  • wake up on rfkill release software interface modes (can always be added):
  • AP/VLAN
  • monitor valid interface combinations:
  • { managed } <= 1, #{ AP } <= 1,

    total <= 2, #channels <= 1, STA/AP BI must match

  • { managed } <= 2,

    total <= 2, #channels <= 1 HT Capability overrides:

  • MCS: ff ff ff ff ff ff ff ff ff ff
  • maximum A-MSDU length
  • supported channel width
  • short GI for 40 MHz
  • max A-MPDU length exponent
  • min MPDU start spacing Device supports TX status socket option. Device supports HT-IBSS. Device supports SAE with AUTHENTICATE command Device supports scan flush. Device supports per-vif TX power setting Driver supports full state transitions for AP/GO clients Driver supports a userspace MPM Device supports static SMPS Device supports dynamic SMPS Device supports configuring vdev MAC-addr on create.
dyang-7 commented 5 years ago

2472 MHz [13] (15.0 dBm) (no IR) NO-IR means you can't initiate radiation. Notify the kernel about the current regulatory domain: sudo iw reg set NZ https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2