Using hostapd to configure an additional SSID

Hi to all,

I'm trying to configure an additional SSID (on 2.4GHz band) with hostapd but with no success yet.
I've tried to do it with the following steps:

  1. "wifi down" to disable wifi and kill the default hostapd daemon.
  2. run hostapd with "hostapd hostapd.conf" and the output is:

"Failed to create interface mon.wlan0: -95 (Not supported)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:55:d8:fb and ssid "test"
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED"

With these two steps the SSID is broadcasted but I can't connect to it because the driver nl80211failed to initialize.

How can I get this fixed?

hostapd.conf

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
hw_mode=g
beacon_int=100
channel=11
ieee80211n=1
ht_coex=0
interface=wlan0
ctrl_interface=/var/run/hostapd
ap_isolate=1
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
auth_algs=1
wpa=0
ssid=testing
bridge=br-lan
bssid=b8:27:eb:55:d8:fb

Thanks in advance!
Rita Florêncio

Some hardware ( especially Broadcom) does not allow more than one interface.

Always configure through /etc/config/wireless. Hostapd configuration file is dynamically generated and hostapd (re)started by the UCI system.

1 Like

Thanks @mk24. I have verified that the hostapd configuration file is dynamically generated but i want to configure a new hostapd daemon besides the default one. Is it possible?

One instance of hostapd controls all the operations of one radio, including multiple SSIDs. Trying to attach a second instance of hostapd to the same radio will fail.

UCI will take care of this for you, provided the hardware and driver are capable.

Use iw list to see what interface combinations are allowed.

The MAC OUI suggests you have a Raspberry Pi 3, which has a Broadcom wifi chip with limited driver capabilities.

That's right @mk24. For that reason, I killed the hostapd daemon that is running by default and after that I ran a new hostapd daemon that gives the message above. This is not suppose to happen right?
UCI controls the services in a higher level and I want to do it in a lower level (with hostapd).
Thanks.

Does anyone know how to do this? Thanks!

OpenWrt was not designed to directly manipulate the file you describe. You are supposed to use the UCI via command line at /etc/config/wireless or via LuCI web GUI in Network > Wireless.

In addition as @mk24, some Broadcom chipsets do not accept multiple SSID configurations.

What's supposed to happen is:

  • the UCI generates the config file
  • OpenWrt runs hostapd from the UCI parsed file

Instead, you're doing something else.

You use the UCI.