How can I use wifi connections as an access point while at the same time connecting to an existing wifi network ?
My experiment:
sudo iw dev wlan0 interface add uap0 type __ap
service dnsmasq restart
sysctl net.ipv4.ip_forward=1
sudo hostapd /etc/hostapd/hostapd.conf
Output:
Configuration file: /etc/hostapd/hostapd.conf
Failed to create interface mon.uap0: -95 (Operation not supported)
uap0: Could not connect to kernel driver
Using interface uap0 with hwaddr b8:27:a1:0f:00:00 and ssid "TESTAP"
Failed to set beacon parameters
uap0: Could not connect to kernel driver
Interface initialization failed
uap0: interface state UNINITIALIZED->DISABLED
uap0: AP-DISABLED
uap0: Unable to setup interface.
uap0: interface state DISABLED->DISABLED
uap0: AP-DISABLED
hostapd_free_hapd_data: Interface uap0 wasn't started
nl80211: deinit ifname=uap0 disabled_11b_rates=0
/etc/hostapd/hostapd.conf:
interface=uap0
ssid=TESTAP
hw_mode=g
channel=10
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=123456789a
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_group_rekey=86400
ieee80211n=1
wme_enabled=1