Set interface wireless wlan0 channel command do not work

Hi,
I am using latest vyos build. I am trying to setup an access point using vyos commands and I am able to successfully create one. Then I tried to switch to different channel using
‘set interface wireless wlan0 channel channelnumber’
‘commit’
commands.

But, on the wireless scanner, I do not see my access point switching to different channel.
If i check the wlan0.cfg under /var/run/hostapd/ , I can see the configuration has been updated with latest channel, but hostapd continue to broadcast on previous set channel.

How can I change channel for AP using vyos commads?

Try:
conf
systemctl restart hostapd

If that works, please open a bug in https://phabricator.vyos.net and post the outpuf of ‘run show version’.
thx

hi,
hagbard,

It did not help what you suggested.

But instead if I restart it using script hostapd-init inside /opt/vyatta/sbin, its taking effect.
so after setting new channel and commit ,
run
‘cd /opt/vyatta/sbin/’
‘hostapd-init restart wlan0’

Now I can see, my AP is broadcasting using newly assigned channel.

Just another thing to add, latest wireless commands also allow channel to be set to 0,
but when you set it to 0, vyos does not start hostapd.

should I put it on bug list ?
Thanks.

Yes, please open a bug in phabricator. I think it is an easy fix, but since a lot of that config commands is currently being rewritten, we need to track it.
I had a look already, systemctl doesn’t work because it’s going with the default configs, while the vyatta code put everything into /opt/vyatta.

Thanks for your report.