3

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?

Zanna
  • 72,312

1 Answers1

1

It isn't exactly what I was asking but I found a way solve my problem.

I removed hostapd and used the wlan0 interface for my ad-hoc network.

I created a virtual interface for monitoring traffic using:

sudo iw dev wlan0 interface add mon.wlan0 type
sudo ifconfig mon.wlan0 up

These 2 interfaces seem to work properly together. hope this helps somebody else.

Zanna
  • 72,312