8
2
I am trying to use my pc wireless card as an AP, while being connected to my wifi network thru the very same card, but I have a problem. What I am trying to achieve is the equivalent of Windows' Virtual Wi-fi technology. In line of principle, it's very simple:
service network-manager stop
iw dev wlan0 del
iw phy phy0 interface add new0 type station
service network-manager start
iw phy phy0 interface add new1 type __ap
hostapd -B /etc/hostapd.conf
with a suitable configuration for hostapd:
cat /etc/hostapd/hostapd.conf
interface=new1
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ssid=XXXX
country_code=us
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
eap_server=0
wpa=2
wpa_passphrase=XXXX
wpa_pairwise=TKIP CCMP
rsn_pairwise=TKIP CCMP
However, the driver nl80211 refuses to put the virtual IF new1 into AP mode. Here comes the interesting bit: the output of iw list contains
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ managed } <= 1, #{ AP } <= 1,
total <= 2, #channels <= 1, STA/AP BI must match
* #{ managed } <= 2,
total <= 2, #channels <= 1
It is obvious my wifi card (an Intel Centrino Advanced-N 6235 [8086:088e] under iwlwifi) supports AP mode (I have tested it), and I had interpreted the "valid interface combinations" to mean that I could have at most 1 managed and 1 AP vifs on this card at the same time. But then I noticed the mysterious-looking constraint, STA/AP BI must match.
Does anyone know what this means, and whether this is what is thwarting my attempts at using two vifs on my card, one in station the other in AP mode? Cheers
Same question: http://superuser.com/questions/615664/creating-wifi-access-point-on-a-single-interface-in-linux
– imz -- Ivan Zakharyaschev – 2013-12-15T21:04:48.5001@imz--IvanZakharyaschev You are quite right, thank you. But my question ws also about the meaning of STA/AP BI must match, which seems to provide some kind of constraint which I have not yet deciphered. – MariusMatutiae – 2013-12-15T21:09:38.470
I'm sorry I haven't taken this detail into account. You are right. But this particular problem isn't obvious from the title, which made me think that having one WiFi adapter is the only problem here... – imz -- Ivan Zakharyaschev – 2013-12-15T21:11:56.263