Problem with disconnect and reconnect

Marlon Smith marlon.smith10
Tue Apr 28 11:46:35 PDT 2015


Just to see, I tried running hostapd on the system.  The first time I
run it, I can connect and disconnect as much as I want.  I also
constantly see the message: Add randomness: count=6204 entropy=1007.

However if I close it with ctrl-c and start it again, my laptop can no
longer connect to the network.  I see that same message but it only
scrolls through to a count in the mid 100's and then stops.  I have to
reboot for it to work again.

I installed haveged to see if that would fix it but there is no
difference.

On Mon, 2015-04-27 at 19:11 -0700, Marlon Smith wrote:

> I've distilled the problem down so it's easily reproducible.  Using
> this wpa_supplicant.conf file:
> 
> ap_scan=2
> network={
>         ssid="adhoctest"
>         key_mgmt=NONE
>         wep_key0="12345"
>         mode=2
>         frequency=2412
> }
> 
> and starting wpa_supplicant from the command line like this:
> 
> wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_host.conf
> 
> Only works half the time.  Every second time, the authentication
> fails.  If I reboot the unit between each attempt, the result is still
> about 50/50 whether it works or not.
> 
> 
> On Mon, 2015-04-27 at 18:30 -0700, Marlon Smith wrote:
> 
> > I attempted to connect with my laptop to the AP to see if I could
> > get some more info.  Here is the error reported by the laptop when
> > it fails to connect:
> > 
> > wlan0: SME: Trying to authenticate with 00:25:f0:51:72:99 (SSID='CSI
> > LCD 51:72:99' freq=2412 MHz)
> > wlan0: State: SCANNING -> AUTHENTICATING
> > EAPOL: External notification - EAP success=0
> > EAPOL: External notification - EAP fail=0
> > EAPOL: External notification - portControl=ForceAuthorized
> > nl80211: Authenticate (ifindex=3)
> > wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=1 addr=(nil)
> > key_idx=0 set_tx=1 seq_len=0 key_len=5
> > nl80211: set_key failed; err=-67 Link has been severed)
> > 
> > 
> > 
> > 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/20150428/16ac883c/attachment.htm>



More information about the Hostap mailing list