HUP not changing channel
sstraw+HostAP at enphaseenergy.com
Thu Jun 12 13:06:12 EDT 2014
I'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'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've been working to detect channel changes on the
client side and regenerate the hostapd and issue a HUP.
However, hostapd doesn'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'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.
Current rev I'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
This is without the wpa_supplicant running a config - the wlan0 interface
isn't associated during these tests (though would eventually be, but I
should be able to change channels when it isn't).
AP functionality is present on initial hostapd load - it works, it just
doesn't appear to change channels on HUP.
if I attempt to set the channel using iw:
uw dev wlan1 set channel 5
I get a "command failed: Device or resource busy (-16)"
which isn'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't
complain, but on bringing the interfaces back, hostapd is no longer
maintaining a connection.
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.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HostAP