Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Because the walls of my house are thick and tend to attenuate wireless signals badly, I have two access points in different parts of my house, configured on the same SSID with the same settings. Both work well in general. However, in a similar way to that observed by this user, I find that moving my laptop from one room to another doesn't cause it to switch access points quickly enough; either its rescanning is too infrequent, or the threshold of signal quality is too low, or both. This leads to an irritatingly long period where the network won't respond.

Can I control this at all on Linux? (which is what my laptop runs - more specifically, I have CrunchBang, a Debian variant, if it matters). I'd like to be able to alter that signal threshold and/or rescan period if possible to make it more aggressive at switching.

share|improve this question
1  
As I'll always suggest when I see a crunchbang post, ask in #crunchbang on irc.freenode.net as well. xchat is installed with crunchbang, and #crunchbang automatically connects when you start it. –  Rob Jun 25 '12 at 17:51
    
Thanks. I doubt somewhat this is specific to CrunchBang which is why I thought I'd ask a wider audience first. But thanks for the tip. –  Andrew Ferrier Jun 25 '12 at 17:54
    
I usually search around here as well as ask in the chan. Depending on who is in the channel, you'll get an answer pretty quickly. I know that #! uses gnome-network-manager by default, you might have better luck with a different network manager. –  Rob Jun 25 '12 at 17:57
add comment

1 Answer

It takes a while for the network manager to decide that the connection is not coming back and only then will it try to reconnect. I find wicd to be more "responsive" than NetworkManager - I'd consider switching to that.

You could also run a background script that polls the signal strength and forces a disconnect if the signal falls beyond a certain level. Once disconnected your network manager will normally connect to a network with stronger signal.

Example script using iw(1) from the iw package:

#!/bin/bash
IFACE="wlan0"
LIMIT="-75"
while true; do
        signal=$(iw $IFACE link | grep signal | awk '{print $2}')
        [ $signal ] && [ $signal -lt $LIMIT ] && iw $IFACE disconnect
        echo $signal
        sleep 1
done
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.