2 WLANs with only one Wireless card at boot time

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

2 WLANs with only one Wireless card at boot time

cotarelo2
Hi!

I have only a atheros card conected via minipci-e. I am using hostapd and I want to use the same wifi  card for connecting to a wifi network and with the same card to create an Access Point

So that's my interfaces

auto wlan0
iface wlan0 inet static
        address 192.168.1.247
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 192.168.1.1 80.58.61.250
        wpa-ssid XX
        wpa-psk YY

auto myAcc
iface myAcc inet static
        hostapd /etc/hostapd/hostapd.conf
        address 192.168.2.1
        netmask 255.255.255.0

I want to figure out how to configure this at boot time so I dont need to go through these commands all the times I am rebooting

 iw phy phy0 interface add myAcc type __ap
 ifconfig myAcc hw ether A4:17:FE:6E:00:53
 ifconfig myAcc 192.168.2.1 up