P2P Events Not Received on monitoring socket

Padmanabha, Seshadri K. Seshadri.K.Padmanabha at physio-control.com
Mon Apr 18 13:34:35 PDT 2016

Hello Jouni,

Here are the steps we follow to kick off WPA supplicant

1) wpa_supplicant  -g/var/run/wpa_supplicant-global &  
2) wpa_cli -g/var/run/wpa_supplicant-global interface_add p2pdev0 /etc/p2p.conf wilink
p2p.conf file contains basic configuration information
3)  wpa_cli_ti18xx -i tiw_p2pdev0 p2p_group_add freq=2462   //Start the group owner

4) I have my own application that uses wpa_ctrl.c to create a few sockets with the only purpose of receiving and printing notifications
I am able to get several CTRL-EVENT-BSS-ADDED events using the app below on global and p2pdev0 interface. I do not see events such as P2P-DEVICE-FOUND or P2P-PROV-DISC-SHOW-PIN

const char *devicePath1 = "/var/run/wpa_supplicant-global";
const char *devicePath2 = "/var/run/wpa_supplicant/p2pdev0";
const char *devicePath3 = "/var/run/wpa_supplicant/p2pgrp0";
static struct wpa_ctrl *mon_conn1;
static struct wpa_ctrl *mon_conn2;
static struct wpa_ctrl *mon_conn3;

void initSupplInterface()

    mon_conn1  = wpa_ctrl_open(devicePath1);
    mon_conn2  = wpa_ctrl_open(devicePath2);
    mon_conn3  = wpa_ctrl_open(devicePath3);

    if( mon_conn1 )
    wpa_ctrl_attach(mon_conn1); //Attach monitoring interface for receiving unsolicited notifications

    wpa_ctrl_attach(mon_conn2); //Attach monitoring interface for receiving unsolicited notifications

    wpa_ctrl_attach(mon_conn3); //Attach monitoring interface for receiving unsolicited notifications

    if( mon_conn1 && mon_conn2 && mon_conn3)
	//select on all 3 FD's and print to output

-----Original Message-----
From: Jouni Malinen [mailto:j at w1.fi] 
Sent: Sunday, April 17, 2016 11:50 AM
To: Padmanabha, Seshadri K.
Cc: hostap at lists.infradead.org
Subject: Re: P2P Events Not Received on monitoring socket

On Thu, Apr 14, 2016 at 05:34:34AM +0000, Padmanabha, Seshadri K. wrote:
> We use a monitoring socket ( ATTACH command ) for unsolicited events on Global, p2pdev0 and p2pgrp0 interface on an autonomous GO. Our station interface is not activated.
> We can receive CTRL-EVENT-BSS-ADDED.
> On starting p2p connection from an external peer P2P-DEVICE-FOUND, 
> P2P-PROV-DISC-SHOW-PIN events are printed from WPA_supplicant, but these events are never seen on the monitoring socket. I've noticed most of the p2p notification functions in notify.c use dbus functions. Our system does not have dbus interface.  Am i missing any configuration to start receiving these events?

Can you be more specific on which of the control interface(s) you are listening on and how do you start wpa_supplicant (command line and how the control interfaces are configured)? For events related to P2P management, I'd recommend using the global control interface.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list