Sorry for the late reply.
Digging into this issue I reached the conclusion that when P2P is
connecting, we actually do not need to handle interface state changes
G_SUPPLICANT_STATE_*. Instead, the connection success is completely
based on the peer state CONNMAN_PEER_STATE_*.
Therefore, we should ignore all the interface state changes during
P2P connection, otherwise it could result in an inconsistency. In
fact, I tested your patch and it solves the connection problem but at
the end of the connection the service belonging to the just created
P2P group, goes in "association" state and we do not want this.
Here my proposal:
From f4cfb7707af3c97a3beca1007c0145ba15bf772c Mon Sep 17 00:00:00
From: Jose Blanquicet
Date: Sun, 22 Oct 2017 19:39:31 +0200
Subject: [PATCH] wifi: Avoid state machine moves forward with P2P networks
plugins/wifi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 74f216d..c2226a3 100644
@@ -2822,6 +2822,10 @@ static void
+ /* P2P networks must not be treated as WiFi networks */
+ if (wifi->p2p_connecting || wifi->p2p_device)
identifier = g_supplicant_network_get_identifier(network);
connman_network = connman_device_get_network(wifi->device,
wifi->p2p_device will handle system's configuration where the
group interface is created and wifi->p2p_connecting where it is not.
Could you please test this patch and give us your feedback?
This patch worked for me.