6

I want to use wpa_cli to connect with AP. If I use wpa_cli without -i option, wpa_cli will choose interface p2p-dev-wlan0 which does not really exist.

And network list between p2p-dev-wlan0 and wlan0 are not shared.

$ wpa_cli add_network
Selected interface 'p2p-dev-wlan0'
0

$ wpa_cli list_network
Selected interface 'p2p-dev-wlan0'
network id / ssid / bssid / flags
0               any     [DISABLED]

$ wpa_cli -i wlan0 list_network
network id / ssid / bssid / flags

This is very annoying to me. How can I make wpa_cli choose wlan0 rather than p2p-dev-wlan0 in default?

1
  • even I had the same problem, the only workaround which helped me was to use -i with wpa_cli as that was the only solution to select the interface wlan0. Because wpa_supplicant will select the 1st interface in the interface list (your can check the interface list in wpa_cli using the command:- interface,which will list your interfaces). I just wanted to tell even I'm annoyed with the same thing from weeks and the only solution is to use wpa_cli -i {your commands} I know this is not an answer but as I was on the same boat I came here, or if you did find any solution for the same do post it as ma
    – vishal
    Commented Aug 19, 2019 at 10:45

2 Answers 2

12

Add the line

p2p_disabled=1

in /etc/wpa_supplicant/wpa_supplicant.conf to disable the p2p interface.

0

try this:

rm /var/run/wpa_supplicant/p2p-dev-wanl
2
  • 3
    It would be useful to say why removing this specific file would be useful - and is there a less... destructive alternative?
    – Journeyman Geek
    Commented Sep 11, 2019 at 5:49
  • From the MAN page: Specify the interface that is being configured. By default, choose the first interface found with a control socket in the socket path. Hence, either removing this file in case you're not using the p2p interface (I suppose many don't) or renaming it so it is not listed as the first interface. Renaming it just like that is probably the same as disabling it, unless you also change the device name (in udev rules) Commented Mar 31, 2020 at 10:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .