[solved] WLAN latency problems



  • Hi all,

    I'm using pfsense (1.2.1-RC1) as router and wireless accesspoint on a soekris net5501-70 board with some 11a/b/g minipci card. While the wireless connections to my notebook work fine, i somehow fail to connect my mobile phones successfully. i first tried with my sony ericsson c905 some while ago, and noticed a very slow overall connection and lots of timeouts. copying from and to the device via wlan was very slow. however i read on SE forums it was an issue with the phone, so i didnt care about it any longer.
    now i got my new iphone (3gs), which shows the very same behaviour. connecting to the wireless network will go fine, however network traffic is real slow, i get lots of timeouts and high latency. the very same iphone however works without any of these issues on other wlans, which leads me to the conclusion something must be wrong with my wlan. my notebook doesnt have any problems though, as already mentioned.

    see pfsense system logs below: (exerpt from when the wlan interface was activated, then notebook (first) & iphone (second) connecting:

    
    Aug 18 18:48:42 	hostapd: ath0: STA 00:26:b0:88:3f:93 WPA: group key handshake completed (WPA)
    Aug 18 18:48:42 	hostapd: ath0: STA 00:26:b0:88:3f:93 WPA: received EAPOL-Key 2/2 Group with unexpected replay counter
    Aug 18 18:48:42 	hostapd: ath0: STA 00:26:b0:88:3f:93 WPA: received EAPOL-Key 2/2 Group with unexpected replay counter
    Aug 18 18:48:40 	hostapd: ath0: STA 00:18:de:6b:38:5a WPA: group key handshake completed (WPA)
    Aug 18 18:48:32 	hostapd: ath0: STA 00:26:b0:88:3f:93 WPA: group key handshake completed (WPA)
    Aug 18 18:48:32 	hostapd: ath0: STA 00:26:b0:88:3f:93 WPA: pairwise key handshake completed (WPA)
    Aug 18 18:48:32 	hostapd: ath0: STA 00:26:b0:88:3f:93 IEEE 802.11: associated
    Aug 18 18:47:40 	hostapd: ath0: STA 00:18:de:6b:38:5a WPA: group key handshake completed (WPA)
    Aug 18 18:46:40 	hostapd: ath0: STA 00:18:de:6b:38:5a WPA: group key handshake completed (WPA)
    Aug 18 18:46:23 	hostapd: ath0: STA 00:18:de:6b:38:5a WPA: group key handshake completed (WPA)
    Aug 18 18:46:23 	hostapd: ath0: STA 00:18:de:6b:38:5a WPA: pairwise key handshake completed (WPA)
    Aug 18 18:46:23 	hostapd: ath0: STA 00:18:de:6b:38:5a IEEE 802.11: associated
    Aug 18 18:45:48 	login: login on console as root
    Aug 18 18:45:47 	check_reload_status: reloading filter
    Aug 18 18:45:41 	php: /interfaces_opt.php: Creating rrd update script
    Aug 18 18:45:41 	kernel: ath0: ath_chan_set: unable to reset channel 6 (2437 Mhz, flags 0x490 hal flags 0x150)
    Aug 18 18:45:40 	kernel: vr1: promiscuous mode enabled
    Aug 18 18:45:40 	kernel: ath0: promiscuous mode enabled
    Aug 18 18:45:40 	kernel: bridge0: Ethernet address: 72:cd:be:e7:e6:15
    Aug 18 18:45:39 	kernel: ath0: ath_chan_set: unable to reset channel 6 (2437 Mhz, flags 0x490 hal flags 0x150)
    
    

    now when i ping both the notebook and the phone, the output will look like this:

    notebook:

    
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit=1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit=1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit=1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit=1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit=1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit<1ms TTL=128
    Antwort von 10.0.0.45: Bytes=32 Zeit=1ms TTL=128
    
    

    iphone:

    
    Antwort von 10.0.0.30: Bytes=32 Zeit=2008ms TTL=64
    Antwort von 10.0.0.30: Bytes=32 Zeit=5ms TTL=64
    Zeitüberschreitung der Anforderung.
    Antwort von 10.0.0.30: Bytes=32 Zeit=2616ms TTL=64
    Antwort von 10.0.0.30: Bytes=32 Zeit=4ms TTL=64
    Zeitüberschreitung der Anforderung.
    Zeitüberschreitung der Anforderung.
    Zeitüberschreitung der Anforderung.
    Zeitüberschreitung der Anforderung.
    Zeitüberschreitung der Anforderung.
    Antwort von 10.0.0.30: Bytes=32 Zeit=77ms TTL=64
    Zeitüberschreitung der Anforderung.
    Antwort von 10.0.0.30: Bytes=32 Zeit=89ms TTL=64
    
    

    can someone maybe help me resolve this issue? i really want to use my wlan on the phones :s
    see this screen for my wlan configuration. i already tried several different options without success.



  • It seems like a problem with powersaving. Most likely the AP driver doesn't implement/has bugs in the powersaving functionality and the clients get confused. Turn off the support for WiFi powersaving in your mobile and see if it helps. The drawback is it's gonna suck your battery dry much faster.



  • There was a power save bug in earlier FreeBSD versions. It was fixed at some point, though I don't recall exactly when. 1.2.2 might have the fix, if not, 1.2.3-RC1 definitely does.



  • thanks for your tips. i just upgraded to 1.2.3-RC1, and it seems like it got better. when i completely switch off authentication, connecting will work fine and there is no more timeouts.

    but somehow the authentication seems to be different now although i didnt change pfsense's configuration. my iphone will ask for user + password now, when connecting to the wlan, which i'm unable to determine (so far i only knew of a wpa passphrase, not a user). so i dont know what user i have to put. also, i'm unable to connect with my notebook.

    whats up with that?



  • Did you enable the Captive Portal?



  • Nope. And i didnt touch the configuration for months, including before/after the upgrade to 1.2.3-RC1.



  • Okay, fixed the problem. First thing was, the authentication setup was messed up (i think one can see that on the screenshot). basically i set it to WPA2/PSK/AES now. The phone will correctly connect to the wlan and authenticate.

    however i found that i could not reach the phones ip adress (e.g. ping). i tried a lot of things, until i found out i had to bridge then LAN interface with the WLAN interface too (as seen on the screenshot, the WLAN interface was already configured to bridge with LAN). i didnt know this, so right now i need to bridge WLAN -> LAN and also LAN -> WLAN. Saving this configuration & applying the wlan now works, i can access the phone by ip and i can access my lan/interet on the phone via wlan.

    now strange thing is that changing some unimportant setting in WLAN options breaks the wlan again, leaving the phone unable to connect. only if i go to LAN settings again and hit save followed by apply settings (without changing the configuration) solves this problem and the wlan works again.

    anyway it seems to work now, thanks for your support.


Log in to reply