October 20, 2020, 04:59:05 am


Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/

Troubleshooting hostapd/WiFi/WAP?

Started by usernamenumber, May 27, 2015, 01:01:08 am

Previous topic - Next topic


Hello all,

I'm in the US, working remotely with a tech school in Kenya to provision a cubietruck as a hostapd-powered wireless access point that provides net access when available (bandwidth can get pretty flaky out there), and locally hosts offline versions of resources like wikipedia, MOOCs, etc regardless.

I tested everything at home and had five or six devices of various types all streaming video from it with no problems, but now they're testing it in the field and reporting that they start having connectivity problems after one or two devices.

I'm a Linux/dev guy so I can handle technical docs and whatnot if people have something to link me to, but I have almost no experience with this level of wireless networking, so I'm hoping someone here will be willing to help me out to further a good cause by offering some tips on how to troubleshoot this sort of problem.

Here's what we know:
* Problems don't appear to be associated with any particular client device or class of devices (laptops, phones, etc).

* Problems are intermittent, so a machine will fail to connect to the WAP for a while, but then 30 minutes later will work fine... until it doesn't any more.

* There are other WAPs in the area, but they're far enough away that ours is by far the strongest signal.

* We're using the bcmdhd driver with op_mode=2 under the Ubuntu Trusty version of Cubietruck Debian

* Our hostapd.conf is pretty basic:

I think they may have added lines to enable WEP as well. I'll ask for a copy of what exactly they're using.

Does anyone have suggestions for where to start in troubleshooting this?



Which version of hostapd are you using?


example output:

hostapd v2.4-devel for Realtek rtl871xdrv
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> and contributors

It should be v2.5devel

If you use my image, you should have working example configuration in /etc/hostapd.conf and example of interfaces in /etc/network/interfaces.hostap

I suggest you to use WPA2 encryption since it's tested and it's working well. I used CT for months as an additional AP without any issues.

Maybe WEP is broken - no idea.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4


Thanks for the response!

Sorry, I meant WPA2, not WEP.  I'll check on the version etc the next time I have access to the cubietruck, but I don't think we changed it from the one included with Cubietruck Debian (not sure what you mean by "my image"-- are you Igor Pecovnik? If so, thanks! :) )



I'm based in Kenya at the school Brad mentioned above.  We can now reliably connect any device to the AP but we are maxing out at 7 devices, after which we get authentication errors.  Is it possible that there's a hardware limitation to how many simultaneous devices can connect?

Our hostapd version is 2.1. I will try updating and see if that helps but it seems that if it's not a hardware issue there is a config setting somewhere capping the number of devices at 7.

- Our current hostapd.config:


I am also not an expert when it comes to networking but any resources or ideas about where to troubleshoot would be very helpful.


- Mick


I was able to connect five devices and then started to have problems.

I tried to connect a total of nine devices. When one failed to connect I tried to vary the distance between the problem device and other devices, and between the WAP and other devices. I had the most success when I moved the already-connected devices into another room and left only the device I wanted to connect in the same room as the WAP. However, even this only worked some of the time, and when I went back to check the other devices, several of them had disconnected from the WAP.

The end results of my last test were:

  • 4 devices connected and remaining connected

  • 4 devices connected but later lost the connection
    • These failed over to another WAP in the house, so maybe they would have eventually reconnected to the cubietruck if not for that

    • Note that at Tunapanda they don't have any other nearby WAPs, so at least for them interference from another WAP isn't the problem)

  • 1 device that consistently failed to connect, even though it had in previous tests

There are a few other interesting things that I noticed:

First, most of the time when something failed to connect, it did so nearly instantly. I'm not sure what that implies, but it seems odd.

Second, even for successful connects, I haven't been able to find any evidence of diagnostic logging in syslog, despite adding config lines that I think should have made it log (and of course then restarting hostapd). Here's the config I'm using:


As Mick said, any help anyone can offer would be greatly appreciated!


I don't know if I'll be able to get to it today, but I have a USB wifi adapter and can try shotgunning those into a single bonded interface. I've never tried that with wifi, but I guess it's worth a shot? Has anyone here done anything similar?


Oh! This is interesting. We're running cubietruck debian (or rather, cubietruck Trusty), but have an older version of hostapd than the one you show:

root@portal:~# hostapd
hostapd v2.1
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2014, Jouni Malinen <j@w1.fi> and contributors

...but according to apt-get, the hostapd we have is the most recent version. Any idea what could be going on? Do you run a repo we should add for updates?


June 16, 2015, 01:38:59 pm #7 Last Edit: June 16, 2015, 01:42:15 pm by slovenia
Quote...but according to apt-get, the hostapd we have is the most recent version. Any idea what could be going on? Do you run a repo we should add for updates?

I am using self compiled and patched version.

Build script:

My latest binary:
https://github.com/igorpecovnik/lib/blob/next/bin/hostapd25-rt.tgz (for some realtek cards)

Remember that most of those wireless adapters are crap. Specially in AP mode and it's nothing unusually that there is a station limit encoded into firmware.

If you need to have a little more clients and reliability, rather get some router. Even some cheap TP Link is much better than this. But try with latest version. It might be better ...

If you plan to use those (development) binaries uninstall default hostapd first, th at it wont overwrite when package is updated.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4