hostapd and entropy issues

Mike Thompson mpthompson at gmail.com
Sun Aug 5 02:06:02 EDT 2012


Hello,

I'm working on bring up hostapd on an OLinuXino-Micro which is a very
small 3-chip ARM based system with an rtl8192cu USB based wifi
adapter.  It took me a while to get a stable kernel, wifi driver and
Debian Wheezy rootfs all working together, but I think I have all that
managed now.  On this system I'm running hostapd to turn it into an
access point with Open System Authentication.

I'm running into a strange issue with hostapd in that I have to wait
about 30 minutes after starting hostapd before I can start
transmitting IP packets between the access point and any system that
connects to the access point.  What happens is, a remote system such
as a laptop can connect to the hostapd access point immediately, but
no IP traffic will flow between the systems for about 30 to 45 minutes
after the hostapd application has been started.  After that time,
everything seems to be working fine.  The temporal symptoms of this
have me pretty perplexed.

Could this be an issue with entropy?  The OLinuXino system is VERY
minimal -- a 400MHz iMX233 ARM processor, 64MB of RAM, a single USB
port and SD card reader with the rootfs.  This system has almost no
entropy for /dev/random and cat /proc/sys/kernel/random/entropy_avail
will typically yield very small numbers less that 20.

What I notice is that when I start hostapd I see the following
messages being logged:

1344141785.348094: Add randomness: count=89 entropy=88
1344141785.348094: Add randomness: count=90 entropy=89
...

Only after about 30 to 45 minutes when the count and entropy reach
about 1000 will IP traffic begin to flow.

Am I on the right track system entropy is playing a role here?  Are
there other things I should be looking at?  Another clue may be that
as far as I can tell, the access point can receive packets, it just
can't transmit them out until the elapsed type has passed.  This would
make sense if randomness is need to send out encoded packets, but not
to receive them.

If entropy is indeed playing a role here, what are the suggested fixes
for minimal systems such as that have very little entropy?

Thanks,

Mike Thompson


More information about the HostAP mailing list