<div dir="ltr"><br>
<div><div><div>I&#39;m working on a project which involves running a device 
(presently an ath9k_htc based one, but plans are to support another 
device as well) as a client and a host concurrently.  There is one 
radio, so I have to track the same channel # for both configurations.  
The client configuration (wpa_supplicant) is what I&#39;d call the primary -
 I have to use whatever frequency is necessary for connecting to the 
site AP and gaining access to the internet.  The host config (hostapd) 
merely needs to track the same channel so that both interfaces can 
remain up as needed.  Ideally, this would be automatic, but I&#39;ve been 
working to detect channel changes on the client side and regenerate the 
hostapd and issue a HUP.<br>
<br></div>However, hostapd doesn&#39;t appear to change channels.  An earlier revision (commit # 8f395284bd4fb4595aa52a7f0f49110f28ddc230)
 would change channels - verifiable using a wireless scanner - but it 
seemed that hostapd was only sending the beacon (Tx), not listening (Rx).  I could change the channel across the spectrum, HUP&#39;ing each time, and the beacon would dutifully move, but no Rx.  If I 
eventually changed the channel back to the originally set channel (what 
the hostapd process initially started with), it would resume comms.<br>
<br></div>Current rev I&#39;m working with is commit # 147848ec4d26613d5a117d4b35dbc7ff98dd65d1
 (from 27 May 2014), does NOT change channels when it reloads the config
 file.  I am NOT getting errors about invalid parameters or anything 
which would indicate the config file processing was aborted, and 
furthermore, I can change the essid (ssid=) and that takes effect via a 
HUP. and in changing the channel, I am only changing the channel= value 
(and to a known valid and regulatory setting supported value).<br>
<br></div>This is without the wpa_supplicant running a config - the 
wlan0 interface isn&#39;t associated during these tests (though would 
eventually be, but I should be able to change channels when it isn&#39;t).
<br><div>AP functionality is present on initial hostapd load - it works, it just doesn&#39;t appear to change channels on  HUP.<br><br>if I attempt to set the channel using iw:<br><br>  uw dev wlan1 set channel 5<br><br>

</div>
<div>I get a &quot;command failed: Device or resource busy (-16)&quot;<br><br></div><div>which
 isn&#39;t surprising since hostapd is using wlan1.  If I take down wlan0 
and wlan1 then set the channel  on the mon.wlan0 interface, iw doesn&#39;t 
complain, but on bringing the interfaces back, hostapd is no longer 
maintaining a connection.<br>
<br><br></div>Any suggestions as how to achieve my goal?  Client 
connection and hostap mode both work fine, but this channel tracking is 
driving me nuts.  Ideally, there would be some way for the wlan1 hostap 
to follow the channel used by the wlan0 supplicant, were it so easy.<br></div>

<pre>

This email message is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not an intended recipient, you may not review, use, copy, disclose or distribute this message. If you received this message in error, please contact the sender by reply email and destroy all copies of the original message.