Re: Unable to establish P2P connection for miracast using gnome-network-displays

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

 



Am 17.01.24 um 10:37 schrieb Benjamin Berg:
Hi,

On Sun, 2024-01-14 at 19:28 +0100, Julian Sikorski wrote:
Am 14.01.24 um 19:00 schrieb Jouni Malinen:
On Fri, Jan 05, 2024 at 10:46:57AM +0100, Julian Sikorski wrote:
I am trying to figure out why gnome-network-displays is unable to establish
a P2P connection with my Fire TV stick. I originally reported it to
gnome-network displays, then to NetworkManager before being directed here.
In brief, the p2p connection never goes up so I can never attempt to capture
packets using wireshark or tcpdump. Same laptop and same Fire TV Stick work
fine from Windows 11.
I am attaching the wpa_supplicant debug log. Thank you for your help in
advance.

Which WLAN driver are you using on this device (wlp1s0)?

I am using iwlwifi/iwlmvm. The hardware is Intel Wi-Fi 6 AX200.

Hmm, OK, I would have expected that to work fine.

It looks like the peer device might be using power saving mechanism
(Notice of Absence) that would require the local driver to be able to
synchronize the transmissions appropriately to be able to get them
through. The debug log here indicated that none of the numerous attempts
of sending a GO Negotiation Request to the peer resulted in the frame
being acknowledged which could imply that it was not listening at the
time the request went out. That said, it is difficult to say for certain
since the peer discovery part did succeed. In any case, this type of an
issue might require looking in more detail to a sniffer capture of the
IEEE 802.11 frames and the exact timing of them and/or figuring out what
kind of capabilities the local driver has for P2P.

Sniffer would be a special hardware, correct? Like rtl-sdr? I have a 2.4
GHz Spectrum Analyzer but this is probably not what we need. Can a
sniffer be fashioned out of a second laptop?
A while back miracast used to work intermittently, which is when I filed
https://gitlab.gnome.org/GNOME/gnome-network-displays/-/issues/285,
suspecting the issue is caused by IPv6 vs IPv4. Now I can no longer get
the connection to work under linux at all.

No need for special hardware. You can e.g. use a second (Intel) card,
change it into monitor mode "iw dev X set type monitor". Then put the
interface into the UP state ("ip link set X up"), configure the channel
and bandwidth using "iw" and grab a packet dump using tcpdump or
wireshark.


Where do I get the channel and the bandwidth from? Running iw dev p2p-wlp1s0-2 info during the connection attempt does not reveal it:

Interface p2p-wlp1s0-2
	ifindex 14
	wdev 0x100000005
	addr a4:b1:c1:dd:5a:28
	type P2P-client
	wiphy 1
	multicast TXQ:
		qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
		0	0	0	0	0	0	0	0		0

Now, if the peer device is using NoA's, that could be because the
FireTV stick is associated to another network at the same time. You
could try disconnecting it (and possibly the laptop) just to see if
that makes a difference.

There could be something to it. I disconnected Wi-Fi on both the stick and the laptop and initially it did not help. I then went on to set up another laptop in monitor mode, and as I was trying to test the iw dev command above, connection miraculously worked:

Interface p2p-wlp1s0-4
	ifindex 8
	wdev 0x7
	addr a4:b1:c1:dd:5a:28
	ssid DIRECT-p1
	type P2P-GO
	wiphy 0
	channel 157 (5785 MHz), width: 20 MHz, center1: 5785 MHz
	txpower 22.00 dBm
	multicast TXQ:
		qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
		0	0	23	0	0	0	0	3585		23

Jan 23 08:57:33 snowball3 wpa_supplicant[1131]: P2P-DEVICE-FOUND 6a:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e pri_dev_type=10-0050F204-5 name='Yasmin's Fire TV' config_methods=0x80 dev_capab=0x25 group_capab=0x2a wfd_dev_info=0x00011c440032 vendor_elems=1 new=0 Jan 23 08:57:33 snowball3 wpa_supplicant[1131]: P2P-GO-NEG-SUCCESS role=GO freq=5785 ht40=0 peer_dev=6a:9a:87:86:b0:0e peer_iface=62:9a:87:86:b0:0e wps_method=PBC Jan 23 08:57:33 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: interface state UNINITIALIZED->ENABLED
Jan 23 08:57:33 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: AP-ENABLED
Jan 23 08:57:33 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-CONNECTED - Connection to a4:b1:c1:dd:5a:28 completed [id=0 id_str=]
Jan 23 08:57:33 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: WPS-PBC-ACTIVE
Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-EAP-STARTED 62:9a:87:86:b0:0e Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1 Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254 Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: WPS-REG-SUCCESS 62:9a:87:86:b0:0e 12345678-9abc-def0-1234-56789abcdef0
Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: P2P-GROUP-FORMATION-SUCCESS
Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: P2P-GROUP-STARTED p2p-wlp1s0-4 GO ssid="DIRECT-p1" freq=5785 go_dev_addr=a4:b1:c1:dd:5a:27 Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: dbus: Register group object '/fi/w1/wpa_supplicant1/Interfaces/2/Groups/p1' Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: WPS-PBC-DISABLE
Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: WPS-SUCCESS
Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-EAP-FAILURE 62:9a:87:86:b0:0e Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: AP-STA-CONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: AP-STA-CONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e Jan 23 08:57:34 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: EAPOL-4WAY-HS-COMPLETED 62:9a:87:86:b0:0e Jan 23 08:57:43 snowball3 wpa_supplicant[1131]: wlp1s0: Reject scan trigger since one is already pending
Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: P2P-FIND-STOPPED
Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: P2P-GROUP-REMOVED p2p-wlp1s0-4 GO reason=REQUESTED Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: interface state ENABLED->DISABLED Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: AP-STA-DISCONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: AP-STA-DISCONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e
Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: AP-DISABLED
Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-DISCONNECTED bssid=a4:b1:c1:dd:5a:28 reason=3 locally_generated=1 Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-DSCP-POLICY clear_all Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-4: CTRL-EVENT-DSCP-POLICY clear_all Jan 23 08:58:10 snowball3 wpa_supplicant[1131]: nl80211: deinit ifname=p2p-wlp1s0-4 disabled_11b_rates=0

Colours were all messed up with everything covered in magenta and green but this is a problem to deal with later. I then re-connected the laptop to Wi-Fi, and I was still able to establish a connection:

Jan 23 08:58:16 snowball3 wpa_supplicant[1131]: wlp1s0: WPS-PBC-ACTIVE
Jan 23 08:58:24 snowball3 wpa_supplicant[1131]: wlp1s0: WPS-CANCEL
Jan 23 08:58:24 snowball3 wpa_supplicant[1131]: wlp1s0: SME: Trying to authenticate with ec:a9:40:79:fb:ad (SSID='UPC949397B' freq=5320 MHz) Jan 23 08:58:24 snowball3 wpa_supplicant[1131]: wlp1s0: Trying to associate with ec:a9:40:79:fb:ad (SSID='UPC949397B' freq=5320 MHz) Jan 23 08:58:25 snowball3 wpa_supplicant[1131]: wlp1s0: Associated with ec:a9:40:79:fb:ad Jan 23 08:58:25 snowball3 wpa_supplicant[1131]: wlp1s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0 Jan 23 08:58:25 snowball3 wpa_supplicant[1131]: wlp1s0: WPA: Key negotiation completed with ec:a9:40:79:fb:ad [PTK=CCMP GTK=CCMP] Jan 23 08:58:25 snowball3 wpa_supplicant[1131]: wlp1s0: CTRL-EVENT-CONNECTED - Connection to ec:a9:40:79:fb:ad completed [id=0 id_str=] Jan 23 08:58:25 snowball3 wpa_supplicant[1131]: wlp1s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-63 noise=9999 txrate=26000 Jan 23 08:58:25 snowball3 wpa_supplicant[1131]: wlp1s0: Reject scan trigger since one is already pending Jan 23 08:58:37 snowball3 wpa_supplicant[1131]: P2P-DEVICE-FOUND 6a:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e pri_dev_type=10-0050F204-5 name='Yasmin's Fire TV' config_methods=0x80 dev_capab=0x25 group_capab=0x2a wfd_dev_info=0x00011c440032 vendor_elems=1 new=0 Jan 23 08:58:37 snowball3 wpa_supplicant[1131]: P2P-GO-NEG-SUCCESS role=GO freq=5745 ht40=0 peer_dev=6a:9a:87:86:b0:0e peer_iface=62:9a:87:86:b0:0e wps_method=PBC Jan 23 08:58:37 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: interface state UNINITIALIZED->ENABLED
Jan 23 08:58:37 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: AP-ENABLED
Jan 23 08:58:37 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-CONNECTED - Connection to a4:b1:c1:dd:5a:28 completed [id=0 id_str=]
Jan 23 08:58:37 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: WPS-PBC-ACTIVE
Jan 23 08:58:39 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-EAP-STARTED 62:9a:87:86:b0:0e Jan 23 08:58:39 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1 Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254 Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: WPS-REG-SUCCESS 62:9a:87:86:b0:0e 12345678-9abc-def0-1234-56789abcdef0
Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: P2P-GROUP-FORMATION-SUCCESS
Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: P2P-GROUP-STARTED p2p-wlp1s0-5 GO ssid="DIRECT-aJ" freq=5745 go_dev_addr=a4:b1:c1:dd:5a:27 Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: dbus: Register group object '/fi/w1/wpa_supplicant1/Interfaces/3/Groups/aJ' Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: WPS-PBC-DISABLE
Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: WPS-SUCCESS
Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-EAP-FAILURE 62:9a:87:86:b0:0e Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: AP-STA-CONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: AP-STA-CONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e Jan 23 08:58:40 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: EAPOL-4WAY-HS-COMPLETED 62:9a:87:86:b0:0e Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: AP-STA-DISCONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: AP-STA-DISCONNECTED 62:9a:87:86:b0:0e p2p_dev_addr=6a:9a:87:86:b0:0e
Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: P2P-FIND-STOPPED
Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: P2P-GROUP-REMOVED p2p-wlp1s0-5 GO reason=REQUESTED Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: interface state ENABLED->DISABLED
Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: AP-DISABLED
Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-DISCONNECTED bssid=a4:b1:c1:dd:5a:28 reason=3 locally_generated=1 Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-DSCP-POLICY clear_all Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: p2p-wlp1s0-5: CTRL-EVENT-DSCP-POLICY clear_all Jan 23 08:59:44 snowball3 wpa_supplicant[1131]: nl80211: deinit ifname=p2p-wlp1s0-5 disabled_11b_rates=0

After re-connecting the Fire TV Stick, however, I was no longer able to establish a connection. Disconnecting it did not help immediately either. Neither did restarting the stick or disconnecting the wi-fi from the laptop. I was not able to reproduce the successful connection since.


Benjamin


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux