<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.6">
</HEAD>
<BODY>
Thanks Dan!&nbsp; That fixed the problem.&nbsp; Jouni, thanks for your advice as well.<BR>
<BR>
I'm now having one last issue:&nbsp; The AP connection only works half the time I run my application.&nbsp; Every second time the phone will see the connection but won't actually connect.<BR>
<BR>
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.&nbsp; Dhcpd seems to be running correctly each time, and there are no log differences there either.<BR>
<BR>
Any ideas where I should look?<BR>
<BR>
Thanks again!<BR>
<BR>
Marlon<BR>
<BR>
<BR>
<BR>
On Mon, 2015-04-27 at 15:57 -0500, Dan Williams wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Mon, 2015-04-27 at 13:46 -0700, Marlon Smith wrote:
<FONT COLOR="#737373">&gt; I've tried calling disconnect() before removing the network, but I get</FONT>
<FONT COLOR="#737373">&gt; the same result.  Calling disconnect() puts the state into</FONT>
<FONT COLOR="#737373">&gt; interface_disabled, and I have to restart wpa_supplicant in order to</FONT>
<FONT COLOR="#737373">&gt; recover.</FONT>

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 &quot;reconfig failure&quot; 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

<FONT COLOR="#737373">&gt; On Mon, 2015-04-27 at 21:58 +0200, Floris Bos wrote:</FONT>
<FONT COLOR="#737373">&gt; &gt; On 04/27/2015 09:44 PM, Marlon Smith wrote:</FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; I'm using wpa_supplicant with nl80211 and the rt2800usb driver in my</FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; application, which allows user to connect to a network or create an</FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; access point.  I'm using the dbus interface of wpa_supplicant to</FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; control the connection.</FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; The user is able to enable/disable the connection via a menu, and</FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; when they do I use AddNetwork and SelectNetwork to connect, and</FONT>
<FONT COLOR="#737373">&gt; &gt; &gt; RemoveNetwork to disconnect.</FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; Might want to use Disconnect() to disconnect.</FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; Yours sincerely,</FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; Floris Bos</FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; </FONT>
<FONT COLOR="#737373">&gt; &gt; _______________________________________________</FONT>
<FONT COLOR="#737373">&gt; &gt; HostAP mailing list</FONT>
<FONT COLOR="#737373">&gt; &gt; <A HREF="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</A></FONT>
<FONT COLOR="#737373">&gt; &gt; <A HREF="http://lists.shmoo.com/mailman/listinfo/hostap">http://lists.shmoo.com/mailman/listinfo/hostap</A></FONT>
<FONT COLOR="#737373">&gt; </FONT>
<FONT COLOR="#737373">&gt; </FONT>
<FONT COLOR="#737373">&gt; _______________________________________________</FONT>
<FONT COLOR="#737373">&gt; HostAP mailing list</FONT>
<FONT COLOR="#737373">&gt; <A HREF="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</A></FONT>
<FONT COLOR="#737373">&gt; <A HREF="http://lists.shmoo.com/mailman/listinfo/hostap">http://lists.shmoo.com/mailman/listinfo/hostap</A></FONT>


</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>