wpa_cli choose interface p2p-dev-wlan0 automatically when -i is not specified

0

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?

CodePurin

Posted 2019-08-08T02:24:27.903

Reputation: 21

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 – 2019-08-19T10:45:14.200

Answers

2

Add the line

p2p_disabled=1

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

Jeroen Demeyer

Posted 2019-08-08T02:24:27.903

Reputation: 21

0

try this:

rm /var/run/wpa_supplicant/p2p-dev-wanl

huozhidiewu

Posted 2019-08-08T02:24:27.903

Reputation: 1

3It would be useful to say why removing this specific file would be useful - and is there a less... destructive alternative? – Journeyman Geek – 2019-09-11T05:49:37.940