source and more info:
https://wiki.archlinux.org/index.php/Software_access_point
Short answer
sudo iw dev wlan0 interface add wlan0_ap type managed
sudo create_ap wlan0_ap wlan0 createap mypassword
Wi-Fi device must support AP mode
You need a nl80211 compatible wireless device, which supports the AP operating mode. This can be verified by running iw list command, under the Supported interface modes block there should be AP listed:
...
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
...
Wireless client and software AP with a single Wi-Fi device
Creating a software AP is independent from your own network connection (Ethernet, wireless, ...). Many wireless devices even support simultaneous operation both as AP and as wireless "client" at the same time. Using that capability you can create a software AP acting as a "wireless repeater" for an existing network, using a single wireless device. The capability is listed in the following section in the output of iw list:
valid interface combinations:
$ iw list
...
valid interface combinations:
* #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
total <= 3, #channels <= 2
...
The constraint #channels <= 1 means that your software AP must operate on the same channel as your Wi-Fi client connection; see the channel setting in hostapd.conf below.
If you want to use the capability/feature, perhaps because an Ethernet connection is not available, you need to create two separate virtual interfaces for using it. Virtual interfaces for a physical device wlan0 can be created as follows: The virtual interfaces with unique MAC address are created for the network connection (wlan0_sta) itself and for the software AP/hostapd "wireless repeater":
# iw dev wlan0 interface add wlan0_sta type managed
# iw dev wlan0 interface add wlan0_ap type managed
Configuration
Setting up an access point consists of two main parts:
- Setting up the Wi-Fi link layer, so that wireless clients can
associate to your computer's software access point and exchange IP
packets with it.
- Setting up the network configuration on your computer, so that it
properly relays IP packets between its own internet connection and
the wireless clients.
Tools
create_ap
The create_ap package provides a script that can create either a bridged or a NATed access point for internet sharing. It combines hostapd, dnsmasq and iptables for the good functioning of the access point. The basic syntax to create a NATed virtual network is the following:
# create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
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 – 2010-06-29T08:04:21.887
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 – 2010-07-27T08:56:10.087
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 – 2013-09-23T10:18:55.787
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 – 2013-09-23T14:42:33.230
Hey I added my question here - http://superuser.com/questions/649742/can-we-create-a-vap-in-sta-mode-and-another-vap-in-ap-mode-in-madwifi. Can you have a look? Thanks :)
– sachinr – 2013-09-24T16:44:36.880