0

I have successfully hosted a WiFi AP using hostapd on my RPi Zero (using an external USB WiFi adapter). I'm using a dual-band adapter and the AP can be initiated in both bands without any problem and also the channel can be changed via the hostapd.conf file. However I want to change the channel dynamically and for this other people have successfully used the hostapd_cli command chan_switch (do a quick Google search). In my case, I'm always getting the error message "FAIL" like so:

> chan_switch 5 5240
> FAIL

The exact same result is there no matter what the current band is. Here is my hostapd.conf file.

interface=wlan1
driver=nl80211
ssid=test
channel=36
hw_mode=a
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

Any help to get this to work would be much appreciated.

Sam Karr
  • 61
  • 1
  • 5

1 Answers1

0

You man need to add more arguments to the command.

usage: <cs_count> <freq> [sec_channel_offset=] [center_freq1=] [center_freq2=] [bandwidth=] [blocktx] [ht|vht]

I see in your configuration that you are configuring the radio to 11ac mode. Hence, you many need to set it to VHT mode.

Try:

chan_switch 5 5240 vht