Skip to content

hostapd.conf

Calin Crisan edited this page Dec 12, 2022 · 13 revisions

File Location And Role

The following files are tested in this order and the first one that is found will be used to configure the hostapd daemon:

  • /data/etc/hostapd.conf
  • /boot/hostapd.conf
  • /etc/hostapd.conf

The file is not present by default and should be created by the user, if hostapd is needed.

If the file is present, the hostapd daemon will be started to enable the Wi-Fi access point on your system.

Note that hostapd package is not enabled by default in thingOS. You'll need to enable it in your configurations to have this functionality.

See also captive-portal.conf.

File Format

The file format and available options can be seen here.

The file is first preprocessed and any environment variables of the form $var or ${var} are replaced. You can use any variables exported by /etc/init.d/base, which include all os.conf variables and others such as HOSTNAME, BOARD_SN and BOARD_NAME.

Example

Following is a simple example of a hostapd configuration that will create an access point with network name myssid, key 12345678 and WPA2 encryption, on channel 1:

ssid=${OS_PREFIX}-${BOARD_SN}
wpa_passphrase=12345678
wpa=2
wpa_key_mgmt=WPA-PSK
interface=${OS_AP}
channel=1
driver=nl80211
hw_mode=g
ieee80211n=1
ieee80211ac=1
Clone this wiki locally