Is it possible to add 2 interfaces to my wireless NIC to run as a wireless mesh node and an wireless AP

2

2

I want to create a virtual wireless access point on my board so I can run it as an AP and a node in a mesh network at the same time.

Has anyone ever done something like this? Is it possible?

I am using a debian board. Here are some of its details:

root@alix:~# cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-45) (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 04:01:19 UTC 2012
root@alix:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.5 (squeeze)
Release:    6.0.5
Codename:   squeeze

The wireless card I am using is the dnma-92 http://unex.com.tw/product/dnma-92.

mark mcmurray

Posted 2013-05-07T18:29:51.373

Reputation: 221

Answers

4

Since your card has an atheros chipset you should be able to do it.

Using madwifi drivers you can create 2 different interfaces on your device and set them up using wlanconfig/iwconfig (or the iw CLI from the new linux wireless extensions, which you can learn how to use here http://wireless.kernel.org/en/users/Documentation/iw) and then set one as AP and the other as client (STA).

It's very easy but depends on your level of knowledge. Basically these are the steps to follow.

If you're already familiar with both AP and client config, then just read Can a Linux machine act as both a wireless client and access point simultaneously using a single physical WLAN interface?. Here it shows how to create the interfaces using the old wireless extensions (wlanconfig+iwconfig):

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

If you are using the new wireless extensions (iw) it's very similar, more or less:

iw phy wifi0 interface add ath0 type sta
iw phy wifi0 interface add ath1 type ap

If you still have trouble I recommend you going through a few tutorials first:

First learn how to install and get familiar with how madwifi drivers works. Help here:

http://madwifi-project.org/wiki/UserDocs/FirstTimeHowTo

Then create the interfaces, help here:

http://madwifi-project.org/wiki/UserDocs#CreatingInterfacesinmadwifi-ng

Then set one as AP, help here:

http://madwifi-project.org/wiki/UserDocs/SimpleAccessPoint

Then set the other as client, as explained here:

http://madwifi-project.org/wiki/UserDocs/802.11i (WPA)

or

http://madwifi-project.org/wiki/UserDocs/SimpleWEPClient (WEP)

A little more help on wireless devices config in linux here:

http://www.wirelessdefence.org/Contents/LinuxWirelessCommands.htm

NotGaeL

Posted 2013-05-07T18:29:51.373

Reputation: 375

I had tried using madwifi however my kernel seems to be too recent so the ath-pci module has been replaced/superceeded by the ath5k and ath9k modules. when I tried to build the mad-wifi kernel module myself it failed because there is a structure missing from the new kernel headers. – mark mcmurray – 2013-05-07T19:36:26.383

Maybe this can help: http://madwifi-project.org/wiki/UserDocs/MiniPCI

– NotGaeL – 2013-05-07T19:43:56.857

(Your card is not listed as supported though, so maybe you're out of luck: http://madwifi-project.org/wiki/Compatibility/Unex)

– NotGaeL – 2013-05-07T19:48:28.860

BTW 2 comments above I gave you a useless link (I misread the specs and was looking for an AR2425 instead of AR9220). I found this for the 9220, hope it helps: http://madwifi-users.20070.n2.nabble.com/AR9220-Pci-Partially-Working-td6934203.html

– NotGaeL – 2013-05-07T19:59:06.307