spixon
Posts: 7
Joined: Fri Dec 01, 2017 6:58 pm

wpa_cli interface name p2p-dev-wlan0

Thu Nov 08, 2018 8:16 am

Hi,

OS = stretch
kernel = 4.14.34-v7+#1110

I use usb wifi adapter as AP and internal wifi as normal wifi. In order to set internal wifi as wlan0 and usb wifi as wlan1 I
use rules 72-static-name.rules. below rules content

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEM=="usb", DRIVERS=="?*",
ATTR{address}=="?[014589cd]:*", KERNEL=="w*",NAME="wlan1"

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
ATTR{address}=="b8:27:eb:5c:2b:07", KERNEL=="w*",NAME="wlan0"
----------------------------------------------
when use rules wpa_cli will show interface as p2p-dev-wlan0 and wpa_state=DISCONNECTED. below details

[email protected]:~ $ wpa_cli status
Selected interface 'p2p-dev-wlan0'
wpa_state=DISCONNECTED
p2p_device_address=ca:66:51:73:b9:02
address=ca:66:51:73:b9:02
uuid=fe88f6bb-b6ba-52ea-9b1a-db7c373d4aa6
----------------------------------------------------------------------------------------------

if i not using rules wpa_cli will show interface as wlan0

I need the wpa_cli show interface as wlan0 because if I using p2p-dev-wlan0 to bring down interface using ifconfig I gpt message "p2p-dev-wlan0: ERROR while getting interface flags: No such device".


Thanks for anyone can show me how to solve this problem

Regards

epoch1970
Posts: 3805
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: wpa_cli interface name p2p-dev-wlan0

Thu Nov 08, 2018 11:39 am

What about "wpa_cli -i wlan0" ?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: wpa_cli interface name p2p-dev-wlan0

Thu Nov 08, 2018 12:45 pm

I would try changing this

Code: Select all

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEM=="usb", DRIVERS=="?*",
ATTR{address}=="?[014589cd]:*", KERNEL=="w*",NAME="wlan1"
to this. Note the mac address and delete duplicate SUBSYSTEM.

Code: Select all

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
ATTR{address}=="ca:66:51:73:b9:02", KERNEL=="w*",NAME="wlan1"

spixon
Posts: 7
Joined: Fri Dec 01, 2017 6:58 pm

Re: wpa_cli interface name p2p-dev-wlan0

Thu Nov 08, 2018 6:14 pm

SurferTim wrote:
Thu Nov 08, 2018 12:45 pm
I would try changing this

Code: Select all

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEM=="usb", DRIVERS=="?*",
ATTR{address}=="?[014589cd]:*", KERNEL=="w*",NAME="wlan1"
to this. Note the mac address and delete duplicate SUBSYSTEM.

Code: Select all

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
ATTR{address}=="ca:66:51:73:b9:02", KERNEL=="w*",NAME="wlan1"
Thanks but still got p2p-dev-wlan0

spixon
Posts: 7
Joined: Fri Dec 01, 2017 6:58 pm

Re: wpa_cli interface name p2p-dev-wlan0

Thu Nov 08, 2018 6:15 pm

epoch1970 wrote:
Thu Nov 08, 2018 11:39 am
What about "wpa_cli -i wlan0" ?
Thanks... my current solution just hardcode wlan0 in my code

Return to “Troubleshooting”