Connect to two wifi networks with one wifi network card on Linux
I am not sure if this is doable but I came to think of an idea. So we have two wireless networks at home, basically what I do is to switch connection to each access point in order to connect to the internet (depends on which signal/speed is higher is preferred), So my questions are:
(1) Is it possible to connect to two wifi networks simultaneously having only single wireless network card on my laptop running with Linux? (2) On linux, is it doable without having to purchase another wifi card? (3) If it is doable, can anyone provide with a step-by-step procedure on how to configure?
By the way, Here are the specs of my Laptop:
OS: Linux Mint x64
Wifi Adapter: Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
Subsystem: Hewlett-Packard Company AR9485/HB125 802.11bgn 1×1 Wi-Fi Adapter
Kernel driver in use: ath9k
Solution 1:
Long story short: no, this is not possible with your hardware.
About wireless modes
Your hardware (the ath9k) supports different wireless operating modes under Linux. In everyday situations, when you are connected to a regular wifi access point, you adapter will be in station (also known as managed) mode. In that mode, it is (with your hardware and with most other consumer hardware) only possible to be connected (transmit and receive data) to one and only one access point only. It would be more expensive (and rarely used) to add another transmitter/receiver on a wireless card.
About switching APs
It is not possible to let your laptop/computer decide which access point has a higher speed, because it will have to connect to that access point before it can measure the speed and make that decision. Your network card can not do that without breaking off your current connection. Technically it is possible to write a script that hops to the other access point, checks if it is faster and then decides to swap (or not). I think that is more inconvenient that that is solves problems, because while switching, you'll lose internet connection for about a second or two.
Alternatives
You could run a mesh, which is another mode that is supported by a lot of wifi cards (I have no experience with that kind of setup). Alternatively (also easier and more common to setup) you can have multiple access points run one wifi network. If your card loses signal, it will automatically connect to the strongest signal. Your laptop (phone, tablet, desktop or whatever) can now roam between the different AP's. This setup is discussed here on SU.
I think the roaming setup is your preferred options based on your input.