Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690938 - p2p wifi cannot be established
Summary: p2p wifi cannot be established
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 30
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-20 13:53 UTC by Vladimir Benes
Modified: 2019-03-20 13:55 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)
journal log (deleted)
2019-03-20 13:55 UTC, Vladimir Benes
no flags Details

Description Vladimir Benes 2019-03-20 13:53:40 UTC
Description of problem:
p2p connection cannot be established for the first time, it has to be connected two times

running 2 mac80211_hwsim devices with one unmanaged by NM with running wpa_supplicant
wpa_supplicant -i wlan1 -C /tmp/wpa_supplicant_peer_ctrl

Then I have executed
wpa_cli -i wlan1 -p /tmp/wpa_supplicant_peer_ctrl p2p_listen

and after connecting NM's connection (details to follow) I am waiting for a 
P2P-GO-NEG-REQUEST 02:00:00:00:00:00 dev_passwd_id=4 go_intent=7

then running:
wpa_cli -i wlan1 -p /tmp/wpa_supplicant_peer_ctrl p2p_connect 02:00:00:00:00:00 pbc auth go_intent=0

[root@qe-dell-ovs5-vm-27 NetworkManager-ci]# nmcli connection up id wifi-p2p-p2p-dev-wlan0 
Error: Connection activation failed: 802.1X supplicant took too long to authenticate
Hint: use 'journalctl -xe NM_CONNECTION=dc97a513-b55b-44fb-951c-798edda7e11e + NM_DEVICE=p2p-dev-wlan0' to get more details.
[root@qe-dell-ovs5-vm-27 NetworkManager-ci]# nmcli connection up id wifi-p2p-p2p-dev-wlan0 
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)

[root@qe-dell-ovs5-vm-27 NetworkManager-ci]# nmcli connection show wifi-p2p-p2p-dev-wlan0                          wifi-p2p-p2p-dev-wlan0
connection.uuid:                        dc97a513-b55b-44fb-951c-798edda7e11e
connection.stable-id:                   --
connection.type:                        wifi-p2p
connection.interface-name:              p2p-dev-wlan0
connection.autoconnect:                 no
connection.autoconnect-priority:        0
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1553103969                   no
connection.permissions:                 --                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
connection.llmnr:                       -1 (default)
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       ""
ipv4.dns-priority:                      0
ipv4.addresses:                         --
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-timeout:                      0 (default)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.never-default:                     no
ipv4.may-fail:                          yes                       -1 (default)
ipv6.method:                            auto
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       ""
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.dhcp-duid:                         --
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.token:                             --
wifi-p2p.peer:                          02:00:00:00:01:00
wifi-p2p.wps-method:                    0x0 (default)
wifi-p2p.wfd-ies:                       --
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
GENERAL.NAME:                           wifi-p2p-p2p-dev-wlan0
GENERAL.UUID:                           dc97a513-b55b-44fb-951c-798edda7e11e
GENERAL.DEVICES:                        p2p-dev-wlan0
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        no
GENERAL.DEFAULT6:                       no
GENERAL.SPEC-OBJECT:                    --
GENERAL.VPN:                            no
GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/6
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/2
GENERAL.ZONE:                           --
GENERAL.MASTER-PATH:                    --
IP4.GATEWAY:                            --
IP4.ROUTE[1]:                           dst =, nh =, mt = 950
IP6.ADDRESS[1]:                         fe80::7dd6:2a08:8044:13f9/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 950
IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
0. disable mac randomization  and restart NM service
        echo -e "[device-wifi]\nwifi.scan-rand-mac-address=no" > /etc/NetworkManager/conf.d/99-wifi.conf
        echo -e "[connection-wifi]\nwifi.cloned-mac-address=preserve" >> /etc/NetworkManager/conf.d/99-wifi.conf

1. modprobe mac80211_hwsim
2. nmcli device set wlan1 managed off
3. wpa_supplicant -i wlan1 -C /tmp/wpa_supplicant_peer_ctrl
4. nmcli connection add connection.type wifi-p2p ifname p2p-dev-wlan0 wifi-p2p.peer 02:00:00:00:01:00 autoconnect no
5. wpa_cli -i wlan1 -p /tmp/wpa_supplicant_peer_ctrl p2p_listen
6. nmcli con up wifi-p2p-p2p-dev-wlan0
7. sleep 5; wpa_cli -i wlan1 -p /tmp/wpa_supplicant_peer_ctrl p2p_connect 02:00:00:00:00:00 pbc auth go_intent=0

Actual results:
have to connect one more time

Expected results:
should work for the first time

Additional info:
can see  this:
[root@qe-dell-ovs5-vm-27 ~]# wpa_supplicant -i wlan1 -C /tmp/wpa_supplicant_peer_ctrl
Successfully initialized wpa_supplicant
P2P-DEVICE-FOUND 02:00:00:00:00:00 p2p_dev_addr=02:00:00:00:00:00 pri_dev_type=0-00000000-0 name='' config_methods=0x80 dev_capab=0x25 group_capab=0x8 new=1
P2P-GO-NEG-REQUEST 02:00:00:00:00:00 dev_passwd_id=4 go_intent=7
P2P-GO-NEG-SUCCESS role=client freq=5240 ht40=0 peer_dev=02:00:00:00:00:00 peer_iface=42:00:00:00:00:00 wps_method=PBC
p2p-wlan1-0: WPS-PBC-ACTIVE 
p2p-wlan1-0: SME: Trying to authenticate with 42:00:00:00:00:00 (SSID='DIRECT-cR' freq=5240 MHz)
p2p-wlan1-0: Trying to associate with 42:00:00:00:00:00 (SSID='DIRECT-cR' freq=5240 MHz)
p2p-wlan1-0: Associated with 42:00:00:00:00:00
p2p-wlan1-0: CTRL-EVENT-EAP-STARTED EAP authentication started
p2p-wlan1-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
p2p-wlan1-0: CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
p2p-wlan1-0: WPS-CRED-RECEIVED 
p2p-wlan1-0: WPS-SUCCESS 
p2p-wlan1-0: CTRL-EVENT-EAP-FAILURE EAP authentication failed
p2p-wlan1-0: CTRL-EVENT-DISCONNECTED bssid=42:00:00:00:00:00 reason=3 locally_generated=1
p2p-wlan1-0: SME: Trying to authenticate with 42:00:00:00:00:00 (SSID='DIRECT-cR' freq=5240 MHz)
p2p-wlan1-0: Trying to associate with 42:00:00:00:00:00 (SSID='DIRECT-cR' freq=5240 MHz)
p2p-wlan1-0: Associated with 42:00:00:00:00:00
p2p-wlan1-0: WPA: Key negotiation completed with 42:00:00:00:00:00 [PTK=CCMP GTK=CCMP]
p2p-wlan1-0: CTRL-EVENT-CONNECTED - Connection to 42:00:00:00:00:00 completed [id=0 id_str=]
P2P-GROUP-STARTED p2p-wlan1-0 client ssid="DIRECT-cR" freq=5240 go_dev_addr=02:00:00:00:00:00

Comment 1 Vladimir Benes 2019-03-20 13:55:28 UTC
Created attachment 1546091 [details]
journal log

Note You need to log in before you can comment on or make changes to this bug.