Message ID | 5A7EE8205ACF264A834A5C987038F7B81A1B3658@FMSMSX103.amr.corp.intel.com |
---|---|
State | Rejected |
Headers | show |
On Fri, May 04, 2012 at 11:30:56PM +0000, Shah, Nirav J2 wrote: > The reason I did this is I am trying to figure out how p2p_invite works for non persistent groups. This was added mainly (only?) for testing purposes as pointed out in the commit 108def931eddddc2a5c7e08c393a71b1e35787d9: P2P: Add command for pre-authorizing an invitation to an active group This is mainly designed for testing and allows p2p_connect join auth to be used to accept a specific invitation to an active group that may be received in the future. > I was trying to do "p2p_connect <go_peer> join auth" to pre-authorize a peer to invite this instance to a group (non-persistent). > But I looked at this > > /* <addr> <"pbc" | "pin" | PIN> [label|display|keypad] [persistent] > * [join] [auth] [go_intent=<0..15>] [freq=<in MHz>] */ > > > and I realized that command is not accepted because p2p_connect expects <"pbc" | "pin" | PIN> > > Does p2p_connect need wps authentication. If so how should I be doing this? Yes, you will need to know which WPS config method will be used and the PIN (if used).. While it could be possible to come up with some examples of where this might have some sense, this is really expected to be used for testing purposes.
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 538f8df..00f3614 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -2800,7 +2800,6 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd, pos = cmd + 17; if (*pos != ' ') return -1; - pos++; persistent_group = os_strstr(pos, " persistent") != NULL; pos2 = os_strstr(pos, " persistent=");
I think I might have made a mistake here. my patch breaks normal p2p group formation. So don't accept this version of this patch. The reason I did this is I am trying to figure out how p2p_invite works for non persistent groups. I was trying to do "p2p_connect <go_peer> join auth" to pre-authorize a peer to invite this instance to a group (non-persistent). But I looked at this /* <addr> <"pbc" | "pin" | PIN> [label|display|keypad] [persistent] * [join] [auth] [go_intent=<0..15>] [freq=<in MHz>] */ and I realized that command is not accepted because p2p_connect expects <"pbc" | "pin" | PIN> Does p2p_connect need wps authentication. If so how should I be doing this? Thanks, Nirav. -----Original Message----- From: Shah, Nirav J2 Sent: Friday, May 04, 2012 3:30 PM To: hostap@lists.shmoo.com Cc: Shah, Nirav J2 Subject: [PATCH] P2P: Fix Ctrl interfance for parsing of command p2p_connect The ctrl interface does not recognize the command following peer address as it moves past a ' '(space) which it looks for later on in os_strstr. Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com> intended-for: hostap-1 --- wpa_supplicant/ctrl_iface.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)