In order to provision my device on the user's home WiFi network, it will temporarily act as an Accesspoint in order to receive the WiFi network details from the client. As part of the setup process, I'd like to verify connection to the user's WiFi network without losing AP connection to the client in order to provide the connection attempt status (success or fail). It works if both AP & user's WiFi network are using the same channel, but I run into problems when the Accesspoint is configured to run on channel X, and the user's WiFi network is on channel Y. Should it be possible to verify network connectivity on another channel?
Here's the scenario where things aren't working:
I have two virtual interfaces, wlan_ap and wlan_sta. hostapd is configured to use wlan_ap on channel 7 in hostapd.conf. The client connects to my ap network, and through an exchange, my device is given the SSID and PW of the user's home wifi network. However, the user's home wifi network turns out to be on a completely different channel (e.g. 11). If I attempt to use my station interface to connect to the user's wifi network while maintaining connection with the client on my ap interface, this station test connection fails. Or if it somehow connects to the user's wifi network, the AP connection to the client drops. If both ap and user's home network happen to be the same channel, the test connection succeeds. Is there a way to test the connection when the channels differ?
My device is running Debian 7.8 (kernel 3.8.13) and my WiFi adapter is using the Atheros AR9271 chipset w/ ath9k_htc driver.
Any direction you can give, including telling me I'm doing everything wrong and how to do it right, is highly appreciated.