3

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

1

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

1

As you can see in the frequency list reported by "iw list", only "passive scanning" is allowed with the 5 GHz channels.

This IS a regulatory problem, but not with the regdomain used by the kernel. The firmware of (some?) Intel cards seems to prohibit the use of Band 2 in AP mode, and there is no workaround in driver or kernel code that I know of.

I experienced the same problem with an Intel 7260AC+BT - only Band 1 is usable in AP mode.

0

It's a hostapd's problem that comes with Ubuntu 14.04.

To resolve install a previous version of hostapd.

https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1289047

0

I had the same issue with Intel 8260 WiFi adapter: iw list was reporting that all 5 GHz channels are either (disabled), or (passive scanning, no IBSS). Hostapd was not able to create an AP in 5 GHz mode due to the above mentioned firmware restrictions, which were officially confirmed by Intel.

It looks like the actual thing that is not working with the Intel drivers/firmwares is the country code setting in 5 GHz mode, thus leaving it in the default (most restricted) 00 region.

However, I was able to find a work-around which allows setting the country code and make hostapd able to start a 5 GHz AP. I have tested this solution with only one wireless card and on only one system. It may be that it works only for me. My system is Ubuntu Trusty 14.04 with some software upgrades.

I had to install a Linux kernel from a more recent Ubuntu version to enable Intel 8260 support:

$ apt-get install linux-generic-lts-wily
$ uname -a
Linux htpc.myhome 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Additionally I had to compile a newer hostapd 2.4 package from Ubuntu Xenial to get 802.11ac support.

Below is a description of how I made it work.

1 Create a supplementary hostapd config file /etc/hostapd/hostapd.conf.enable-5ghz with the following contents:

interface=wlan0
driver=nl80211
country_code=US
ieee80211n=1

2 Start hostapd with the supplementary config file:

hostapd /etc/hostapd/hostapd.conf.enable-5ghz

It will fail with the following messages:

Configuration file: /etc/hostapd/hostapd.conf.enable-5ghz
HT (IEEE 802.11n) in 11b mode is not allowed, disabling HT capabilities
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
wlan0: interface state COUNTRY_UPDATE->ACS
wlan0: ACS-STARTED 
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan0: interface state ACS->DISABLED
wlan0: AP-DISABLED 
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: interface state DISABLED->DISABLED
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started

This is fine, as it did the trick - iw list is now reporting that some 5 GHz channels are available:

    * 5745 MHz [149] (22.0 dBm)
    * 5765 MHz [153] (22.0 dBm)
    * 5785 MHz [157] (22.0 dBm)
    * 5805 MHz [161] (22.0 dBm)
    * 5825 MHz [165] (22.0 dBm)

3 Create an actual hostapd config file /etc/hostapd/hostapd.conf:

ssid=MY-SSID
wpa_passphrase=my-secret-password

country_code=US

interface=wlan0
driver=nl80211

wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

hw_mode=a
ieee80211n=1
require_ht=1
ieee80211ac=1
require_vht=1

channel=153

4 Start hostapd with the actual config file:

hostapd /etc/hostapd/hostapd.conf

It is working fine this time:

Configuration file: /etc/hostapd/hostapd.conf
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Using interface wlan0 with hwaddr 34:f6:4b:aa:bb:cc and ssid "MY-SSID"
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED 

5 Automate the above process by adding a pre-up line to the wlan0 section of /etc/network/interfaces:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    pre-up /usr/sbin/hostapd /etc/hostapd/hostapd.conf.enable-5ghz >/dev/null 2>&1 || true

Hope this helps someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.