OpenWrt Forum Archive

Topic: simultaneous wifi access-point AND wifi client

The content of this topic has been archived on 1 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Is it possible/viable to set a WiFi card to be both a wifi access point and a wifi client at the same time?

Basically, I want to have some users to link to my access point but to then almost transparently switch them between a LAN gateway and another gateway via another access point.

i.e. wifi client laptop---------------wifi access point1--OR--------------LAN------gateway
                                                                           \
                                                                    wifi-client1
                                                                             \----------wifi----------wifi access-point2

.....where wifi access point1 and wifi-client1 use the same wifi card/module.

Any help is greatly appreciated?

Regards

Atsan

If you have an Atheros wifi card using the madwifi drivers you can do this easily.

First create the access point device:

# wlanconfig ath0 create wlandev wifi0 wlanmode ap

Then create the station:

# wlanconfig ath1 create wlandev wifi0 wlanmode sta

See the http://madwifi-project.org web site for more details.

I think ath5k can do this also but I haven't looked into it yet.

I don't know about other devices

Gus

Thank you very much.

I am not actully using OpenWRT but Ubuntu 10.04 using the standard ath9k driver that came with it.

I suspect the action for Ubuntu might be similar.
I will see what I can do ( if you know anything about how it might be done in Ubuntu, that'd be great! )

Thank you!

Hey atsan - did you ever figure out how to do this or whether it's even possible?

I have the same requirement for an Atheros wi-fi card which uses the ath9k driver to behave as AP and client simultaneously.  I'm also using Ubuntu 10.04.

Cheers, Mike.

See the thread here:

http://comments.gmane.org/gmane.linux.d … devel/4095

From the reference:

iw phy phy0 interface add ap0 type station
iw phy phy0 interface add sta0 type station

configure hostapd to use ap0 on same channel as ap you're connecting to
start hostapd
configure wpa_supplicant to use sta0
start wpa_supplicant

When you start hostapd it will automatically switch the interface to access point mode.

Also see the documentation for iw here:

http://linuxwireless.org/en/users/Documentation/iw

Gus

(Last edited by gwirth on 31 Aug 2010, 19:58)

The discussion might have continued from here.