RE: P2P Events Not Received on monitoring socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
ctrl_interface=/var/run/wpa_supplicant
update_config=1
device_name=test
device_type=1-0050F204-1
p2p_listen_reg_class=81
p2p_listen_channel=11
p2p_oper_reg_class=81
p2p_oper_channel=11
wmm_enable=1
wmm_uapsd=1
p2p_go_ht40=1
country=US
--------------------------------------------------------------------------
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

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

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

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

Regards,
Sesh
-----Original Message-----
From: Jouni Malinen [mailto:j@xxxxx] 
Sent: Sunday, April 17, 2016 11:50 AM
To: Padmanabha, Seshadri K.
Cc: hostap@xxxxxxxxxxxxxxxxxxx
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

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux