Creating an access point with wpa_supplicant via dbus interface

Marlon Smith marlon.smith10 at gmail.com
Thu Apr 23 19:15:45 EDT 2015


Thanks for the response Jouni.  I just posted another message to the
list with more details, but basically I'm getting this error:

wlan0: Driver does not support AP mode

However hostapd works correctly.  Which seems weird to me.

On Fri, 2015-04-24 at 00:46 +0300, Jouni Malinen wrote:

> On Thu, Apr 23, 2015 at 01:57:58PM -0700, Marlon Smith wrote:
> > I need a way for the user to be able to configure the system as an
> > access point as well.  I've tried setting mode=2 and frequency=2412 but
> > with no luck.  I'm thinking I might have to instead use hostapd, but
> > that becomes a pain because hostapd kills wpa_supplicant when it starts
> > and has no dbus interfaces that I can find.
> > 
> > What I'd really like to know is:  is there anyway to use wpa_supplicant
> > via the dbus interface to configure it as an access point?  If not, are
> > there any undocumented dbus interfaces that can control hostapd?
> 
> Works fine for me with wpa_supplicant.. For example with this as an
> extension to tests/hwsim/test_dbus.py:
> 
> def test_dbus_ap_simple(dev, apdev):
>     """D-Bus AddNetwork for AP mode (simple)"""
>     (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
>     iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE)
> 
>     ssid = "test-wpa2-psk"
>     passphrase = 'qwertyuiop'
>     args = dbus.Dictionary({ 'ssid': ssid,
>                              'key_mgmt': 'WPA-PSK',
>                              'psk': passphrase,
>                              'mode': 2,
>                              'frequency': 2412 },
>                            signature='sv')
>     netw = iface.AddNetwork(args)
>     iface.SelectNetwork(netw)
> 
>     dev[1].connect(ssid, psk=passphrase, scan_freq="2412")
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150423/e646ca72/attachment.htm>


More information about the HostAP mailing list