<!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! That fixed the problem. Jouni, thanks for your advice as well.<BR>
<BR>
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.<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. 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">> I've tried calling disconnect() before removing the network, but I get</FONT>
<FONT COLOR="#737373">> the same result. Calling disconnect() puts the state into</FONT>
<FONT COLOR="#737373">> interface_disabled, and I have to restart wpa_supplicant in order to</FONT>
<FONT COLOR="#737373">> 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 "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
<FONT COLOR="#737373">> On Mon, 2015-04-27 at 21:58 +0200, Floris Bos wrote:</FONT>
<FONT COLOR="#737373">> > On 04/27/2015 09:44 PM, Marlon Smith wrote:</FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > > </FONT>
<FONT COLOR="#737373">> > > I'm using wpa_supplicant with nl80211 and the rt2800usb driver in my</FONT>
<FONT COLOR="#737373">> > > application, which allows user to connect to a network or create an</FONT>
<FONT COLOR="#737373">> > > access point. I'm using the dbus interface of wpa_supplicant to</FONT>
<FONT COLOR="#737373">> > > control the connection.</FONT>
<FONT COLOR="#737373">> > > </FONT>
<FONT COLOR="#737373">> > > The user is able to enable/disable the connection via a menu, and</FONT>
<FONT COLOR="#737373">> > > when they do I use AddNetwork and SelectNetwork to connect, and</FONT>
<FONT COLOR="#737373">> > > RemoveNetwork to disconnect.</FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > Might want to use Disconnect() to disconnect.</FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > Yours sincerely,</FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > Floris Bos</FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > </FONT>
<FONT COLOR="#737373">> > _______________________________________________</FONT>
<FONT COLOR="#737373">> > HostAP mailing list</FONT>
<FONT COLOR="#737373">> > <A HREF="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</A></FONT>
<FONT COLOR="#737373">> > <A HREF="http://lists.shmoo.com/mailman/listinfo/hostap">http://lists.shmoo.com/mailman/listinfo/hostap</A></FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> _______________________________________________</FONT>
<FONT COLOR="#737373">> HostAP mailing list</FONT>
<FONT COLOR="#737373">> <A HREF="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</A></FONT>
<FONT COLOR="#737373">> <A HREF="http://lists.shmoo.com/mailman/listinfo/hostap">http://lists.shmoo.com/mailman/listinfo/hostap</A></FONT>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>