P2P: Inviting a p2p device from already running persistent p2p go

Neeraj Kumar Garg neerajkg at broadcom.com
Mon Dec 12 01:43:28 EST 2011


Hello Jouni,
Thanks a lot. Yes the correct sequence is as below:
P1: p2p_group_add persistent=X
P1: p2p_invite persistent=X peer=<peer_dev_addr>

The patch is still needed as the command p2p_invite group=<ifname> always sends a non-persistent invitation but we want to do a persistent invitation. We want to avoid WPS negotiation as P2 already have WPS credentials of P1.
If you are worried what would be the use case of above command sequence, then:
A. 3 devices were connected and this was a persistent connection and then disconnected. Now 2 of them (one of them is earlier GO) re-invoked the persistent connection. And now GO wants to do a persistent invite to the third device.
B. To avoid excessive entries in the conf file, we decided that whenever application will ask to create autonomous GO, we will reinvoke a persistent GO entry from the Conf file. This will also increase our hit ratio of persistent connection from the clients as we will be running same credentials. And then later invitation to a client device has to be a persistent one.
C. An application on GO may decide to store the connected client information for a persistent connection. In that case, it very well knows to whom it has to send persistent invitation and to whom it has to send a normal invitation.

Regards,
-Neeraj

-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Jouni Malinen
Sent: Saturday, December 10, 2011 5:54 PM
To: hostap at lists.shmoo.com
Subject: Re: P2P: Inviting a p2p device from already running persistent p2p go

On Fri, Oct 21, 2011 at 12:21:47AM -0700, Neeraj Kumar Garg wrote:
> Below is the command sequence, which creates a problem with current supplicant code if a persistent GO is already running and want to invite a P2P device for the same persistent connection.
>  
> Assume X is an entry in the wpa_supplicant.conf file for a persistent connection between P1(GO) and P2(Client).
> P1: p2p_group_add persistent=X
> P1: p2p_invite <P2P dev addr > persistent=X

This is not a valid sequence. The p2p_invite command should actually be
"p2p_invite persistent=X peer=<peer dev addr>", but even with that, this
is not the correct sequence for this task. p2p_invite with persistent=X
is for creating a new group while p2p_invite with group=<ifname> is for
inviting a peer to join an already running group.

> In this case, the code in wpas_p2p_invite will try to create another group_interface but will fail as we are already running a persistent GO. The patch will ensure that if we are already running the same GO with same credentials, we should just proceed for an invite without creating an interface.

Is this really needed? Wouldn't the p2p_invite group=<ifname> command
work for this?

-- 
Jouni Malinen                                            PGP id EFC895FA
_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap




More information about the HostAP mailing list