Issue with receiving psk during WPS over D-BUS

Jouni Malinen j at
Sat Feb 25 05:48:44 PST 2017

On Mon, Feb 20, 2017 at 08:33:59PM +0100, Radoslaw Martyniszyn wrote:
> After pressing WPS button on my AP I am connected, but unfortunately I
> am not receiving psk. I dont know which properties are responsible for
> psk and other connection parameters? Could you please advice me how to
> obtain AP's psk? Without obtaining psk I am unable to connect to AP
> using AddNetwork next time.

> Below is log from my D-BUS call:
> Client:connectWPS
> Client:onWpsProxyRequested thread:3069894656
> onWpsProxyRequested ProcessCredentials properties:1

I'm not sure what the syntax here is, but you can either set
ProcessCredentials to 1 and handle network profile addition externally
or set this to 2 to allow wpa_supplicant to add the network block on its
own. Either way, you can register for the Credentials signal on
fi.w1.wpa_supplicant1.Interface.WPS to receive the psk.

For example, you can find the PSK from the 'Key' item in the dictionary:

dbus.Array([dbus.String(u'wpa2-psk')], signature=dbus.Signature('s'),
variant_level=1), dbus.String(u'SSID'): dbus.Array([dbus.Byte(116),
dbus.Byte(101), dbus.Byte(115), dbus.Byte(116), dbus.Byte(45),
dbus.Byte(119), dbus.Byte(112), dbus.Byte(115)],
signature=dbus.Signature('y'), variant_level=1), dbus.String(u'BSSID'):
dbus.Array([dbus.Byte(0), dbus.Byte(0), dbus.Byte(0), dbus.Byte(0),
dbus.Byte(0), dbus.Byte(0)], signature=dbus.Signature('y'),
variant_level=1), dbus.String(u'EncrType'):
dbus.Array([dbus.String(u'aes')], signature=dbus.Signature('s'),
variant_level=1), dbus.String(u'Key'): dbus.Array([dbus.Byte(49),
dbus.Byte(50), dbus.Byte(51), dbus.Byte(52), dbus.Byte(53),
dbus.Byte(54), dbus.Byte(55), dbus.Byte(56)],
signature=dbus.Signature('y'), variant_level=1),
dbus.String(u'KeyIndex'): dbus.UInt32(0L, variant_level=1)},

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list