LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-01-2016, 07:41 AM   #1
andrixnet
Member
 
Registered: Oct 2012
Location: Romania
Distribution: Slackware
Posts: 167

Rep: Reputation: Disabled
When several APs run with same SSID


I am using a linux (slackware) box in an environment with several APs, all with same SSID and same auth. A couple of them are actually wireless repeaters.
An android phone can dynamically disconnect from an AP with very poor signal if it senses and AP of the same SSID with stronger signal (this can take up to a minute).

I have configured my linux box with rc.wireless.conf and wpa_supplicant.conf (WPA2 personal, PSK) for a stable config in this network.

How can I configure it to connect to the AP with the best signal? Apparently my box prefers only one AP, regardless the much stronger signal of another, nearby. Of course, forcing the MAC of an AP would not be preferred.

How can I reproduce the behaviour of Android phones to prefer best signal and switch AP if (significantly) better signal AP available?

I am specifically asking about rc.wireless configuration, not NetworkManager, here.

Thank you.
 
Old 04-01-2016, 08:50 AM   #2
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 932

Rep: Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520
If this doesn't exist already, you could get signal levels with iwlist in a cron job and choose the best signal.
 
Old 04-01-2016, 08:57 AM   #3
andrixnet
Member
 
Registered: Oct 2012
Location: Romania
Distribution: Slackware
Posts: 167

Original Poster
Rep: Reputation: Disabled
My main focus is to have the network up and running at startup using rc.inet1 and rc.wireless because this ensures I have network (and I need it) before some daemons start up later.

Having NetworkManager configure the network I get connectivity about 30 sec. after the login prompt (and of course after all services have already started, but some missed a data initialization).

So the primary concern is how to connect to the best signal AP with that SSID at startup.
Second concern is switching APs later, based on signal strength.

Thank you.
 
Old 04-01-2016, 11:18 AM   #4
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 932

Rep: Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520
I'm a NetworkManager user so I don't know how to use this
Code:
iwlist_out=$(iwlist wlan0 scan);for i in $(seq $(grep -c -F Cell <<<"$iwlist_out"));do sed -nr "/Cell $(printf '%02d' $i)/,/ESSID/ { /Address/ {s/.*: (.*)/\1/;h}; /Quality/ {s/.*=([0-9]+)\/.*/\1/;x;H}; /ESSID/ {s/.*ESSID:(.*)/\1/;H;g;s/\n/\t/g;p};}" <<<"$iwlist_out";done|sort -r
70	xx:xx:xx:xx:xx:xx	"foo"
25	xx:xx:xx:xx:xx:xx	"bar"
20	xx:xx:xx:xx:xx:xx	"blah"
The output is the quality, mac and SSID.
The fist line is the AP with best signal,
you can cut that line to get SSID or mac.
 
Old 04-01-2016, 02:26 PM   #5
dabreese00
LQ Newbie
 
Registered: Dec 2015
Location: Chicago, IL, USA
Distribution: Debian, Slackware, CentOS, OpenWRT
Posts: 10

Rep: Reputation: Disabled
My brief research points to the wpa_supplicant module "bgscan" which sounds relevant. Based on what I see in /usr/doc/wpa_supplicant-[version]/wpa_supplicant.conf.sample, it might be sufficient to add

Code:
bgscan="simple:30:-45:300"
to your wpa_supplicant.conf, playing with those numbers if necessary. You can look over the documentation. Hope this helps.

Quote:
If this doesn't exist already, you could get signal levels with iwlist in a cron job and choose the best signal.
For the record, you can get signal strength readings using wpa_cli, a direct interface to wpa_supplicant, instead of iwlist (a lower-level utility which may not be 100% on the same page as wpa_supplicant). You can trigger a scan with

Code:
wpa_cli scan
and print the results with

Code:
wpa_cli scan_results
(which you can process as desired using cut, awk, or whatever if you end up having to go the cron job route).
 
1 members found this post helpful.
Old 04-01-2016, 05:09 PM   #6
genss
Member
 
Registered: Nov 2013
Posts: 744

Rep: Reputation: Disabled
add
Code:
bssid: whateveritis
to wpa_supplicant.conf
(bssid is the mac address of the ap)

you can get the bssid from iwlist, as suggested, or
Code:
iw dev wlan0 scan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get RSSI from all APs around? moonleo Linux - Wireless Networking 3 07-08-2013 08:26 PM
get wep IE from APs mailerlee Linux - Wireless Networking 0 02-09-2009 01:59 AM
mandriver how to run aps in wine mr norm Linux - General 1 07-18-2008 07:56 AM
Mulitple Virtual APs --Help stewtn Linux - Wireless Networking 0 03-28-2008 09:37 AM
APs synchronization rgrandl Linux - Wireless Networking 0 07-23-2007 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration