Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have only 1 physical WLAN interface, is there some hackery that can be done so that it can be a client of an existing access point and at the same time also act as an access point for other clients?

I have an existing 802.11g ADSL router, and I'm going to be building an HTPC which will have 802.11n. My laptop also has 802.11n, but at the moment it only connects at 54Mbps because thats what the AP supports. I'd like to be able to have the HTPC be a client of my ADSL router, but have my laptop be a client of the HTPC, so copying files to it will be faster.

Possible?

Edit: obviously I can connect the HTPC to the ADSL router using Ethernet and disable wifi on the router, but lets just ignore that option. :-)

share|improve this question

1 Answer 1

up vote 4 down vote accepted

I haven't done this before personally, but here's some information to get you headed in the right direction.

From a protocol perspective, it's definitely possible to have a single radio working as both an AP and a client STA. It works out best (or perhaps is nearly mandatory) if the AP you're creating and the one you're joining as a client are on the same channel. Having the radio card have to keep switching channels to service requests is a recipe for lost frames and terrible performance.

Software-wise, it's becoming possible. Several 802.11 card drivers on Linux support the concept of VAPs (virtual APs) which allows a single card to act as multiple APs (multiple SSIDs, even BSSIDs) at the same time. Counterintuitively, the term VAP has come to mean any kind of virtual interfaces on the same 802.11 card, regardless of whether the virtual interface is in AP mode or not. So on these card/driver combos, you could create two VAPs -- a STA-mode VAP

The MadWifi driver for Atheros-based cards is one that supports VAPs. If your 802.11 card uses an Atheros chipset, and you install the right version of the MadWifi driver, you might be able to configure your card for simultaneous STA + AP mode something like this:

wlanconfig ath0 create wlandev wifi0 wlanmode sta
wlanconfig ath1 create wlandev wifi0 wlanmode ap

Note that these are not complete instructions for setting everything up, but just an attempt to get you started.

You might want to Google for something like "wifi vap" for more information. I copied the above commands from here.

Oh, and some myth busting: Atheros cards are not uncommon in consumer machines. They're a major player in 802.11 chipsets, along with Broadcom, Marvell, Intel, and Ralink. And just because I used the example of MadWifi/Atheros, doesn't mean there aren't Linux drivers for the other major players' chips that can do a similar thing. Also, 802.11s is not required for this. Saying you have to do 802.11s to do this is like saying you have to support Spanning Tree Protocol just to forward frames from one interface to another.

share|improve this answer
    
It looks as if the board I'm getting does have an Atheros chipset, so I might be in luck. I'm waiting for delivery of my components then I can build and test. –  ThatGraemeGuy Jun 29 '10 at 8:04
    
I haven't had a chance to play with MadWifi yet. I'm accepting because the answer is correct, there seems to be no other chipset/family which offers this functionality. –  ThatGraemeGuy Jul 27 '10 at 8:56
    
Spiff, I have am working with a Atheros chip and madwifi and I am trying to set up VAPs one in sta and one in ap. I am able to set up multiple VAPs in ap mode but when I set up the first VAP in sta and then try setting up another VAP in ap I get wlanconfig: ioctl: Input/output error. Do you have any idea as to how to deal with this? –  sachinr Sep 23 '13 at 10:18
1  
@sachinr Ask that as a Question so everyone sees it, not just a comment on a three year old Answer to someone else's Question. –  Spiff Sep 23 '13 at 14:42
    
Hey I added my question here - superuser.com/questions/649742/…. Can you have a look? Thanks :) –  sachinr Sep 24 '13 at 16:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.