Failed to create virtual interface using iw

295 Views Asked by At

When I tried to create a virtual interface using

sudo iw phy `ls /sys/class/ieee80211/` interface add p2p0 type managed

it is showing command failed: Device or resource busy (-16). And I tried this too

sudo iw phy phy0 interface add p2p0 type managed addr 12:34:56:78:90:12

it is giving the same output.

This command is tried on Raspberry Pi running on Raspbian stretch. How can I create a Virtual interface?

1

There are 1 best solutions below

0
On

If you execute this command:

iw list | grep -A 2 'interface combination'

You will get an output like the following, if on a Raspberry Pi3:

valid interface combinations:
     * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
       total <= 3, #channels <= 2

This means that the maximum allowed managed interfaces is 1. Hence the resource will report busy if trying to set another one as managed.