So I am trying to create an ad-hoc network between a couple of devices. I also need to run hostapd in order to capture probe request packets.
I have a wireless adapter (TL-WN722N) that is capable of both of these modes.
When I set up hostapd, a virtual interface is created (mon.wlan0) and wlan0 is put into master mode.
Now I am trying to create another virtual interface (adhoc.wlan0) using the command:
sudo iw dev wlan0 interface add adhoc.wlan0 type ibss
I am setting the ssid, channel, ip, netmask and broadcast for this interface.
My issue is that I can only have either wlan0 or adhoc.wlan0 up at any one time. If i try to have both interfaces up (using sudo ifconfig <interface> up) I get the error:
SIOCSIFFLAGS: Name not unique on network
Does anybody know if it is possible to have both the interface and virtual interface running at the same time?