Ubuntu – Ubuntu 14.04 + hostapd + 802.11a + iwlwifi = no AP!

wireless

this is my first time here, so please be kind. 😉

I have the following problem:

I want so setup a 5GHz WiFi-AP because the 2.4GHz is too crowded.

I'm using Ubuntu 14.04 with a "Intel Corporation Wireless 3160 (rev 83)" wifi chip. Now some relevant information:

#lspci
01:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)

The driver used:

#dmesg | grep iwl
[   15.421854] iwlwifi 0000:01:00.0: irq 78 for MSI/MSI-X
[   15.902471] iwlwifi 0000:01:00.0: loaded firmware version 22.24.8.0 op_mode iwlmvm
[   15.939685] iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 3160, REV=0x164
[   15.939772] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   15.940031] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   16.043741] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[   16.572386] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   16.572645] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   23.782843] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[   23.783099] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S

#cfg80211: Calling CRDA to update world regulatory domain
[   16.108973] cfg80211: World regulatory domain updated:
[   16.108984] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   16.108989] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   16.108993] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   16.108997] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   16.109000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   16.109004] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   16.109029] cfg80211: Calling CRDA for country: DE
[   16.114458] cfg80211: Regulatory domain changed to country: DE
[   16.114465] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   16.114470] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   16.114473] cfg80211:   (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   16.114477] cfg80211:   (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   16.114480] cfg80211:   (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)
[   16.114483] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)

The capabilities of the chip: AP mode is supported.

#iw list
Wiphy phy0
Band 1:
    Capabilities: 0x1062
        HT20/HT40
        Static SM Power Save
        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 TX/RX MCS rate indexes supported: 0-7, 32
    Frequencies:
        * 2412 MHz [1] (16.0 dBm)
        * 2417 MHz [2] (16.0 dBm)
        * 2422 MHz [3] (16.0 dBm)
        * 2427 MHz [4] (16.0 dBm)
        * 2432 MHz [5] (16.0 dBm)
        * 2437 MHz [6] (16.0 dBm)
        * 2442 MHz [7] (16.0 dBm)
        * 2447 MHz [8] (16.0 dBm)
        * 2452 MHz [9] (16.0 dBm)
        * 2457 MHz [10] (16.0 dBm)
        * 2462 MHz [11] (16.0 dBm)
        * 2467 MHz [12] (16.0 dBm) (passive scanning, no IBSS)
        * 2472 MHz [13] (16.0 dBm) (passive scanning, no IBSS)
    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
Band 2:
    Capabilities: 0x1062
        HT20/HT40
        Static SM Power Save
        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 TX/RX MCS rate indexes supported: 0-7, 32
    Frequencies:
        * 5180 MHz [36] (16.0 dBm) (passive scanning, no IBSS)
        * 5200 MHz [40] (16.0 dBm) (passive scanning, no IBSS)
        * 5220 MHz [44] (16.0 dBm) (passive scanning, no IBSS)
        * 5240 MHz [48] (16.0 dBm) (passive scanning, no IBSS)
        * 5260 MHz [52] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5280 MHz [56] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5300 MHz [60] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5320 MHz [64] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5500 MHz [100] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5520 MHz [104] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5540 MHz [108] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5560 MHz [112] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5580 MHz [116] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5600 MHz [120] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5620 MHz [124] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5640 MHz [128] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5660 MHz [132] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5680 MHz [136] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5700 MHz [140] (16.0 dBm) (passive scanning, no IBSS, radar detection)
        * 5720 MHz [144] (disabled)
        * 5745 MHz [149] (disabled)
        * 5765 MHz [153] (disabled)
        * 5785 MHz [157] (disabled)
        * 5805 MHz [161] (disabled)
        * 5825 MHz [165] (disabled)
    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
max # scan SSIDs: 20
max scan IEs length: 393 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
    * WEP40 (00-0f-ac:1)
    * WEP104 (00-0f-ac:5)
    * TKIP (00-0f-ac:2)
    * CCMP (00-0f-ac:4)
    * CMAC (00-0f-ac:6)
Available Antennas: TX 0 RX 0
Supported interface modes:
     * IBSS
     * managed
     * AP
     * AP/VLAN
     * monitor
     * P2P-client
     * P2P-GO
     * Unknown mode (10)
software interface modes (can always be added):
     * AP/VLAN
     * monitor
valid interface combinations:
     * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ Unknown mode (10) } <= 1,
       total <= 3, #channels <= 1
Supported commands:
     * new_interface
     * set_interface
     * new_key
     * new_beacon
     * new_station
     * new_mpath
     * set_mesh_params
     * set_bss
     * authenticate
     * associate
     * deauthenticate
     * disassociate
     * join_ibss
     * join_mesh
     * remain_on_channel
     * set_tx_bitrate_mask
     * action
     * frame_wait_cancel
     * set_wiphy_netns
     * set_channel
     * set_wds_peer
     * Unknown command (84)
     * Unknown command (87)
     * Unknown command (85)
     * Unknown command (89)
     * Unknown command (92)
     * connect
     * disconnect
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
     * Unknown mode (10): 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
     * Unknown mode (10): 0x40 0xd0
Device supports RSN-IBSS.
WoWLAN support:
     * wake up on disconnect
     * wake up on magic packet
     * wake up on pattern match, up to 20 patterns of 16-128 bytes
     * can do GTK rekeying
     * wake up on GTK rekey failure
     * wake up on EAP identity request
     * wake up on 4-way handshake
     * wake up on rfkill release
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.

The 2.4GHz part looks good, but the "no IBSS" in "Band 2" seems strange.

This is the configuration for hostapd:

# cat /etc/hostapd/hostapd.conf

interface=wlan0
driver=nl80211
ssid=xxx
channel=48
ignore_broadcast_ssid=0
country_code=DE
ieee80211d=1
hw_mode=a
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
beacon_int=100
dtim_period=2
macaddr_acl=0
max_num_sta=10
rts_threshold=2347
fragm_threshold=2346
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
auth_algs=3
wmm_enabled=1
wpa=2
rsn_preauth=1
rsn_preauth_interfaces=wlan0
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_group_rekey=600
wpa_ptk_rekey=600
wpa_gmk_rekey=86400
wpa_passphrase=xxx

And this is the output of hostapd:

#sudo hostapd /etc/hostapd/hostapd.conf -dd
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Failed to set interface 3 to mode 3: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Mode change succeeded while interface is down
nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xb497b0
nl80211: Register frame type=0xb0 nl_handle=0xb497b0 match=
nl80211: Register frame type=0x0 nl_handle=0xb497b0 match=
nl80211: Register frame type=0x20 nl_handle=0xb497b0 match=
nl80211: Register frame type=0xa0 nl_handle=0xb497b0 match=
nl80211: Register frame type=0xc0 nl_handle=0xb497b0 match=
nl80211: Register frame type=0xd0 nl_handle=0xb497b0 match=
nl80211: Register frame type=0x40 nl_handle=0xb497b0 match=
nl80211: Add own interface ifindex 3
nl80211: Do not indicate P2P_DEVICE support (p2p_device=1 driver param not specified)
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code DE, new country code DE 
nl80211: Regulatory information - country=DE
nl80211: 2400-2483 @ 40 MHz 20 mBm
nl80211: 5150-5250 @ 40 MHz 20 mBm
nl80211: 5250-5350 @ 40 MHz 20 mBm
nl80211: 5470-5725 @ 40 MHz 26 mBm
nl80211: 57240-65880 @ 2160 MHz 40 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
**channel [3] (48) is disabled for use in AP mode, flags: 0x77 NO-IBSS PASSIVE-SCAN**
**wlan0: IEEE 802.11 Configured channel (48) not found from the channel list of current mode (2) IEEE 802.11a**
**wlan0: IEEE 802.11 Hardware does not support configured channel**
**Could not select hw_mode and channel. (-3)**
**wlan0: Unable to setup interface.**
hostapd_interface_deinit_free(0xb48d90)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0xb48d90)
hostapd_bss_deinit: deinit bss wlan0
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
wlan0: Deauthenticate all stations
nl80211: send_mlme - noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=0
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=0 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff a0 88 69 24 65 da a0 88 69 24 65 da 00 00 03 00
nl80211: Frame command failed: ret=-22 (Invalid argument) (freq=0 wait=0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
hostapd_cleanup(hapd=0xb4c760 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=0x4bc6c0 drv_priv=0xb4d6a0 -> hapd_deinit
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Failed to set interface 3 to mode 2: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Mode change succeeded while interface is down
nl80211: Teardown AP(wlan0) - device_ap_sme=0 use_monitor=0
nl80211: Unsubscribe mgmt frames handle 0x88888888883c1f39 (AP teardown)
hostapd_interface_free(0xb48d90)
hostapd_interface_free: free hapd 0xb4c760
hostapd_cleanup_iface(0xb48d90)
hostapd_cleanup_iface_partial(0xb48d90)
hostapd_cleanup_iface: free iface=0xb48d90

I googled already a lot, but didn't find something suitable. Most of the time these were regdomain errors.

I marked the interesting output of hostapd with **

If I configure hostapd for hw_mode=g and channel 1 f.ex. all works fine.

I appreciate every help!

Kind regards

Best Answer

In the 5GHz spectrum, you probably need to use automatic channel selection (ACS). Since Aug 2013, hostapd can theoretically do this if you enable

ieee80211d=1
ieee80211h=1
channel=0

I have not managed to get my Intel 6205 card to return a valid spectrum survey to start the ACS process. My impression is that the ath9k driver and cards may be better suited to 5GHz with hostapd. See also http://wireless.kernel.org/en/users/Documentation/acs

Related Question