December 15, 2019, 09:48:17 pm

News:

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

usernamenumber

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:
ssid=x2go
interface=wlan0
ctrl_interface=/var/run/hostapd
channel=1


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?

Thanks!
--Brad

slovenia

Which version of hostapd are you using?

hostapd

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
http://www.armbian.com

usernamenumber

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! :) )

tunapanda

Hi,

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:


ssid=BOARD
interface=wlan0
#ctrl_interface=/var/run/hostapd
hw_mode=g
channel=5
driver=nl80211
#bridge=br0
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=2
preamble=1
#wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
#noscan=1
#ht_capab=[HT40+][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
#country_code=SI
#ieee80211d=1
logger_syslog=-1
logger_syslog=0
logger_stdout=-1
logger_stdout=0


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

Thanks

- Mick

usernamenumber

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:

"""
ssid=x2go
interface=wlan0
ctrl_interface=/var/run/hostapd
channel=1
logger_syslog=-1
logger_syslog_level=0
"""

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

usernamenumber

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?

usernamenumber

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?

slovenia

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:
https://github.com/igorpecovnik/hostapd

My latest binary:
https://github.com/igorpecovnik/lib/blob/next/bin/hostapd25.tgz
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 ...

P.S.
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
http://www.armbian.com