dbus + wpa_supplicant 2.5 - p2p interface not working

Johncy Bennette johncyrr at gmail.com
Sat Nov 7 02:41:58 PST 2015


Thanks Dan. I will run with gdb once I am back to office.

>From the wpa_supplicant debug message for wlan0 I could see,
----------------------------------------------------------------------------------------------
Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/wlan0'

dbus: Register interface object '/fi/w1/wpa_supplicant1/Interfaces/1'

wlan0: Added interface wlan0

wlan0: State: INACTIVE -> DISCONNECTED

nl80211: Set wlan0 operstate 0->0 (DORMANT)


But for p2p-dev-wlan0, I couldn’t see any register with dbus object.
Not sure if this could be the problem?
-----------------------------------------------------------------------------------------------------
Successfully replaced leftover ctrl_iface socket
'/var/run/wpa_supplicant/p2p-dev-wlan0'

P2P: Add operating class 81

P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b

P2P: Own listen channel: 81:1

P2P: Random operating channel: 81:11

P2P: initialized

P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11

P2P: cli_channels:

p2p-dev-wlan0: Added interface p2p-dev-wlan0

p2p-dev-wlan0: State: INACTIVE -> DISCONNECTED

nl80211: Set p2p-dev-wlan0 operstate 0->0 (DORMANT)

netlink: Operstate: ifindex=0 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)


Code from notify.c in wpa_supplicant,

int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
{
if (wpa_s->p2p_mgmt)
return 0;

if (wpas_dbus_register_iface(wpa_s))
return -1;

if (wpas_dbus_register_interface(wpa_s))
return -1;

return 0;
}

Whats the p2p_mgmt is for?

Regards,
Johncy.

On 6 November 2015 at 23:37, Dan Williams <dcbw at redhat.com> wrote:
> On Fri, 2015-11-06 at 23:06 +0530, Johncy Bennette wrote:
>> Hi,
>> I am using dbus interface + wpa_supplicant 2.5. My WiFi interface is
>> working fine. With p2p interface I am facing problems. I invoke my
>> wpa_supplicant as
>> wpa_supplicant -iwlan0 -u -B -c/etc/wpa_supplicant.conf
>> I send the below command to query the available interfaces
>>
>> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
>> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
>> string:fi.w1.wpa_supplicant1 string:Interfaces
>>
>> But with this my wpa_supplicant gets killed.
>
> This indicates that there is a bug in wpa_supplicant 2.5.  Can you run
> the supplicant under 'gdb' and get a backtrace when it dies in gdb?
>
> Dan
>
>> With wpa_supplicant 2.1, I get the dbus-send command successfully return
>>
>> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
>> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
>> string:fi.w1.wpa_supplicant1 string:Interfaces
>>
>> method return sender=:1.5 -> dest=:1.11 reply_serial=2
>>
>> variant array [
>>
>> object path "/fi/w1/wpa_supplicant1/Interfaces/3"
>>
>> object path "/fi/w1/wpa_supplicant1/Interfaces/1"
>>
>> ]
>>
>> With wpa_supplicant 2.1 the interface for p2p is p2p0. With wpa 2.5,
>> the p2p-dev-wlan0 is created internally. But the GetInterface API
>> fails when p2p-dev-wlan0 is given as parameter for GetInterface. All
>> the p2p_group_add fails either. I am not sure if I am missing any
>> configuration?
>>
>> Attached my wpa_supplicant debug log.
>>
>> Regards,
>>
>> Johncy.
>> _______________________________________________
>> Hostap mailing list
>> Hostap at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/hostap
>
>



More information about the Hostap mailing list