Creating an access point with wpa_supplicant via dbus interface

Marlon Smith marlon.smith10 at gmail.com
Thu Apr 23 19:13:47 EDT 2015


Ok I got the logs from wpa_supplicant after it was run by my
application, and I see this error:

wlan0: Driver does not support AP mode

I also tried running wpa_supplicant on its own, with this configuration
file:

ap_scan=2
network={
        ssid="testadhoc"
        key_mgmt=NONE
        wep_key0="12345"
        mode=2
        frequency=2412
}

and got the exact same error.

The thing is, if I run hostapd with this config file, it works
correctly:

interface=wlan0
ssid=testadhoc
hw_mode=g
auth_algs=3
wep_default_key=0
wep_key0="12345"
channel=11

If my driver actually doesn't support AP mode, shouldn't hostapd be
failing as well?


On Thu, 2015-04-23 at 16:28 -0500, Dan Williams wrote:

> On Thu, 2015-04-23 at 13:57 -0700, Marlon Smith wrote:
> > Hi everyone,
> > 
> > I've written an application that allows a user to connect to a wifi
> > network.  The application uses the dbus interface of wpa supplicant, and
> > it works great.
> > 
> > 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.
> 
> You also want to set the Interface object's 'ap_scan' variable to '2',
> same as for adhoc mode.
> 
> But beyond that, it should just work if the driver supports AP mode.
> What errors are you getting?  Can you share some supplicant debug logs?
> You can run the supplicant with "-dddtu" arguments alone and that should
> enable the dbus interface and provide verbose debugging output.
> 
> Dan
> 


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


More information about the HostAP mailing list