Search Linux Wireless

Re: [Bug] carl9170 + wpa_supplicant: P2P mode doesn't work with separate interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 27.04.20 um 18:53 schrieb Frank Schäfer:

Am 18.04.20 um 13:20 schrieb Frank Schäfer:
Hi,

I'm currently testing Miraclecast (https://github.com/albfan/miraclecast), an open source Wifi-Display/Miracast implementation. In one of my setups, I'm using a carl9170 device as sink, which fails with the following debugging output:

...
TRACE: wpa: raw message: IFNAME=wlp0s2f1u8 <3>CTRL-EVENT-SCAN-STARTED
TRACE: wpa: raw message: <3>P2P-PROV-DISC-PBC-REQ 8e:79:67:11:22:33 p2p_dev_addr=8e:79:67:11:22:33 pri_dev_type=10-0050F204-5 name='MY DEVICE' config_methods=0x188 dev_capab=0x25 group_capab=0x0 TRACE: wpa: raw message: <3>P2P-GO-NEG-REQUEST 8e:79:67:11:22:33 dev_passwd_id=4 go_intent=0 DEBUG: supplicant: GO Negotiation Request from 8e:79:67:11:22:33 (supplicant_event_p2p_go_neg_request() in ../../../src/wifi/wifid-supplicant.c:1065) DEBUG: supplicant: connect to 8e:79:67:11:22:33 via pbc/(null) (supplicant_peer_connect() in ../../../src/wifi/wifid-supplicant.c:739)
TRACE: wpa: raw message: <3>P2P-FIND-STOPPED
DEBUG: supplicant: p2p-scanning stopped on wlp0s2f1u8 (supplicant_event_p2p_find_stopped() in ../../../src/wifi/wifid-supplicant.c:904)
TRACE: wpa: raw message: OK

TRACE: wpa: raw message: <3>P2P-GO-NEG-SUCCESS role=GO freq=2462 ht40=0 peer_dev=8e:79:67:11:22:33 peer_iface=8e:79:67:11:22:33 wps_method=PBC DEBUG: supplicant: set STA-MAC for 8e:79:67:11:22:33 from <none> to 8e:79:67:11:22:33 (via GO-NEG-SUCCESS) (supplicant_event_p2p_go_neg_success() in ../../../src/wifi/wifid-supplicant.c:1194) TRACE: wpa: raw message: IFNAME=p2p-0 <3>Failed to start AP functionality DEBUG: supplicant: unhandled wpas-event: IFNAME=p2p-0 <3>Failed to start AP functionality (supplicant_event() in ../../../src/wifi/wifid-supplicant.c:1498)
TRACE: wpa: raw message: <3>P2P-GROUP-FORMATION-FAILURE
DEBUG: supplicant: peer MY DEVICE connection failed (supplicant_event_p2p_group_formation_failure() in ../../../src/wifi/wifid-supplicant.c:1318) TRACE: wpa: raw message: <3>P2P-GROUP-REMOVED p2p-0 GO reason=FORMATION_FAILED DEBUG: supplicant: stray P2P-GROUP-REMOVED: <3>P2P-GROUP-REMOVED p2p-0 GO reason=FORMATION_FAILED (supplicant_event_p2p_group_removed() in ../../../src/wifi/wifid-supplicant.c:1286) DEBUG: supplicant: sent P2P_FIND to wpas on wlp0s2f1u8 (supplicant_p2p_start_scan() in ../../../src/wifi/wifid-supplicant.c:2036)
TRACE: wpa: raw message: OK

DEBUG: supplicant: p2p-scanning now active on wlp0s2f1u8 (supplicant_p2p_find_fn() in ../../../src/wifi/wifid-supplicant.c:1917)
TRACE: wpa: raw message: IFNAME=wlp0s2f1u8 <3>CTRL-EVENT-SCAN-STARTED
...


Searching the web for similar problems leads to the following thread:
https://marc.info/?l=hostap&m=135336063022534

As suggested there, I have patched the Miraclecast sources to use the wpa_supplicant configuration parameter p2p_no_group_iface=1.
So far, this works fine.


Regards,
Frank Schäfer


I finally managed to create extended logs and to compare the working ("GOOD") and non-working ("BAD") case.
See attachment.
If anything is missing, please let me know.

Hth,
Frank


Ok, this is what I can see happening in carl9170 with regards to the interfaces:

1) 1 interface is added+initialized: NL80211_IFTYPE_STATION, p2p=false (when miracle-wifid is started)

Non-working case (p2p_no_group_iface=0=default):
2a) 1 interface is added: NL80211_IFTYPE_STATION, p2p=true (apparently the p2p group interface) 2b) 1 interface is removed: NL80211_IFTYPE_STATION, p2p=true (apparently because setting of the interface flags failed with -EBUSY)
3) 1 interface is added+initialized: NL80211_IFTYPE_AP, p2p=true
   => fails with -EBUSY, because main_vif->p2p is false (main.c, line 656)

Working case (p2p_no_group_iface=1):
2) 1 interface is removed: NL80211_IFTYPE_STATION, p2p=false
3) 1 interface is added+initialized: NL80211_IFTYPE_AP, p2p=true

So if p2p_no_group_iface=1 is used, the initial STA non-p2p interface is removed before a new AP+p2p interface is added.
Maybe the same needs to be done in case of p2p_no_group_iface=0 ?

Regards,
Frank





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux