# using a wireless card as an acess point (AP) with hostap on

## nivw

Hi all,

I have two different pcs with two different wifi cards which I want to turn in to two access point in different locations.

The common issue is that I first need to setup a static local lan IP address , to the cards and only then run hostap, which will turn the cards from Managed mode (client) to master mode (access point) .

According to the official docs 4. Wireless Networking I should:

 *Quote:*   

> Note: If you're using the host-ap driver you will need to put the card in Managed mode before it can be used with wpa_supplicant correctly. You can use iwconfig_eth0="mode managed" to achieve this in /etc/conf.d/net. 

 

this gives:

 *Quote:*   

> # /etc/init.d/net.ra0 restart
> 
> * Bringing down interface ra0
> 
> *   Stopping wpa_cli on ra0...                                           [ ok ]
> ...

 

so as you see I still need to setup a static IP address, even tough I have this in my /etc/conf.d/net:

 *Quote:*   

> # fgrep ra0 /etc/conf.d/net
> 
> config_ra0=( "192.168.1.33/29" )
> 
> iwconfig_ra0="mode managed"
> ...

 

I then need to run ifconfig ra0 192.168.1.33 netmask 255.255.255.240

how can I fix this?

----------

## devilheart

As far as I know a NIC must be in Master mode in order to act like an access point

----------

## nivw

I also tried 

 *Quote:*   

> modules_ra0=( "!iwconfig" "!wpa_supplicant" )

 

but it doesnt work

One card is rt2500pci the other is ath9k

----------

## nivw

 *devilheart wrote:*   

> As far as I know a NIC must be in Master mode in order to act like an access point

 

they become master as part of hostap startup.

I saw specific answers not to turn them in to master mode before hostap startup

----------

