<!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>
I attempted to connect with my laptop to the AP to see if I could get some more info.&nbsp; Here is the error reported by the laptop when it fails to connect:<BR>
<BR>
wlan0: SME: Trying to authenticate with 00:25:f0:51:72:99 (SSID='CSI LCD 51:72:99' freq=2412 MHz)<BR>
wlan0: State: SCANNING -&gt; AUTHENTICATING<BR>
EAPOL: External notification - EAP success=0<BR>
EAPOL: External notification - EAP fail=0<BR>
EAPOL: External notification - portControl=ForceAuthorized<BR>
nl80211: Authenticate (ifindex=3)<BR>
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=1 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=5<BR>
nl80211: set_key failed; err=-67 Link has been severed)<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>