Problem with disconnect and reconnect

Marlon Smith marlon.smith10 at gmail.com
Mon Apr 27 19:20:09 EDT 2015


Thanks Dan!  That fixed the problem.  Jouni, thanks for your advice as
well.

I'm now having one last issue:  The AP connection only works half the
time I run my application.  Every second time the phone will see the
connection but won't actually connect.

The output of ifconfig and iwconfig look the same each time, and I can't
find anything in the wpa_supplicant log that's different between when it
works and when it doesn't.  Dhcpd seems to be running correctly each
time, and there are no log differences there either.

Any ideas where I should look?

Thanks again!

Marlon



On Mon, 2015-04-27 at 15:57 -0500, Dan Williams wrote:

> On Mon, 2015-04-27 at 13:46 -0700, Marlon Smith wrote:
> > I've tried calling disconnect() before removing the network, but I get
> > the same result.  Calling disconnect() puts the state into
> > interface_disabled, and I have to restart wpa_supplicant in order to
> > recover.
> 
> Your app may need to set IFF_UP on the interface (outside of the
> supplicant) before attempting the AddNetwork/SelectNetwork/Scan
> operations.  It appears that something is removing the IFF_UP flag, be
> that the mac80211 stack, cfg80211, the driver itself, or the supplicant.
> I looked at wpa_supplicant 2.4 and couldn't find anywhere the supplicant
> would do it, nor does rtl2x00 seem to do it anywhere.  There are a
> couple places in mac80211 and cfg80211 that do so, but those are
> typically in response to a "reconfig failure" or removing all
> interfaces.  In any case, this is what's happening, and if it's not
> possible to track down what's causing it, just setting the interface
> IFF_UP in your app should work around it.
> 
> Dan
> 
> > On Mon, 2015-04-27 at 21:58 +0200, Floris Bos wrote:
> > > On 04/27/2015 09:44 PM, Marlon Smith wrote:
> > > 
> > > > 
> > > > I'm using wpa_supplicant with nl80211 and the rt2800usb driver in my
> > > > application, which allows user to connect to a network or create an
> > > > access point.  I'm using the dbus interface of wpa_supplicant to
> > > > control the connection.
> > > > 
> > > > The user is able to enable/disable the connection via a menu, and
> > > > when they do I use AddNetwork and SelectNetwork to connect, and
> > > > RemoveNetwork to disconnect.
> > > 
> > > 
> > > Might want to use Disconnect() to disconnect.
> > > 
> > > 
> > > Yours sincerely,
> > > 
> > > Floris Bos
> > > 
> > > 
> > > _______________________________________________
> > > HostAP mailing list
> > > HostAP at lists.shmoo.com
> > > http://lists.shmoo.com/mailman/listinfo/hostap
> > 
> > 
> > _______________________________________________
> > HostAP mailing list
> > HostAP at lists.shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
> 
> 


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


More information about the HostAP mailing list