4

https://github.com/Phoenix1747/RouteryPi contains instructions for using a Rasberry Pi as a wireless router for 2.4Ghz networks.

How can I change this to get 5Ghz? I tried to change hw_mode to ac, but that doesn't seem to work. Where can I get decent information on the parameters in the hostapd config file, and how do I write a good config file?

nickcrabtree
  • 438
  • 4
  • 15
user94178
  • 51
  • 2
  • 2
  • 4

2 Answers2

14

TL;DR

use

hw_mode=a

I see that the man pages for hostapd are quite useless

I found a more useful page https://wiki.gentoo.org/wiki/Hostapd with the following example

802.11a/n/ac with WPA2-PSK and CCMP

A simple but secure AP for recent hardware:
FILE /etc/hostapd/hostapd.conf

interface=wlan0       # the interface used by the AP
hw_mode=a             # a simply means 5GHz
channel=0             # the channel to use, 0 means the AP will search for the channel with the least interferences 
ieee80211d=1          # limit the frequencies used to those allowed in the country
country_code=FR       # the country code
ieee80211n=1          # 802.11n support
ieee80211ac=1         # 802.11ac support
wmm_enabled=1         # QoS support

ssid=somename # the name of the AP auth_algs=1 # 1=wpa, 2=wep, 3=both wpa=2 # WPA2 only wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP wpa_passphrase=somepassword

with the useful comment

hw_mode=a             # a simply means 5GHz

Please note: apparently later versions (v2.6+) of hostapd do NOT like inline comments in the config file

Jaromanda X
  • 2,481
  • 1
  • 15
  • 15
1

My hostapd.conf in raspberry pi 3B plus with raspbian stretch:

interface=wlan0
ssid=pi-5G
macaddr_acl=0
ignore_broadcast_ssid=0

## 2.4G
#hw_mode=a
#channel=7


## 5G
hw_mode=a
channel=36
country_code=US
ieee80211d=1
ieee80211n=1
ieee80211ac=1
wmm_enabled=1


## wpa auth
auth_algs=1
wpa=2
wpa_passphrase=11111111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Iceberg
  • 121
  • 3