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.