Re: Changing Auto-Connect feature
- From: Dan Williams <dcbw redhat com>
- To: Franco Miceli <fmiceli plan ceibal edu uy>
- Cc: networkmanager-list gnome org
- Subject: Re: Changing Auto-Connect feature
- Date: Tue, 25 May 2010 22:47:51 -0700
On Tue, 2010-05-25 at 13:45 -0300, Franco Miceli wrote:
> Hi,
>
> I'm part of a project in Uruguay (Plan Ceibal), that aims to give
> educational connectivity to primary school students
>
> We've been working with the XO platform (Sugar, Fedora 9 -soon 11-),
> and have had the following issue regarding NM auto-connect feature.
>
> We provide connectivity in the school yard via large outdoor wireless
> equipment and indoors with smaller AP. It has come to our attention
> that NM auto-connects to the last AP the XO connected to. Since the
> outdoor equipment is still visible indoors the XO connects to it even
> if it has less quality than the indoor equipment. This gives us
> problems in capacity planning and coverage.
>
> We consider the auto-connect feature to be most useful at the school,
> but we want the choice of connection to be more than just "the last
> one it connected to". Therefore we want to to make some changes to the
> NM code in order to take into consideration other factors such as:
> SNR, loss %, etc.
This is tricky because actually not all kernel drivers really support
good reporting of SNR and loss %. But in your case since you're
targeting specific hardware where you can assume that the driver reports
the correct values, you can locally patch NetworkManager in a way that
we cannot do upstream.
You want real_get_best_auto_connection() in nm-device-wifi.c. You're
passed a list of connections that get sorted through. The list is
already sorted by timestamp. What you want to do is to run through the
*entire* list (and not stop at the first compatible AP that's found by
nm_ap_check_compatible() near the bottom) and instead keep a pointer to
the "best" connection as you define it.
This is a bit complicated because remember that connections are simply
packages of settings necessary to connect to a specific network, they do
not describe actual wifi APs. So the basic procedure would be something
like:
NMConnection *best_yet = NULL;
guint32 best_ap_strength = 0;
for each connection in 'connections':
<do normal device checking up to AP list iteration>
for each ap in the device's AP list:
if (nm_ap_check_compatible (ap, connection)) {
if (nm_ap_get_strength (ap) > best_ap_strength) {
best_yet = connection;
best_ap_strength = nm_ap_get_strength (ap);
}
}
return best_yet;
Dan
> We already have the code of the NM OLPC uses on the XO. What we wanted
> to know is where inside all the *.c files to look for this
> functionality and also if anyone has had any experience with this in
> order to give us some advice on how to approach this subject.
>
> Thanks in advance,
>
>
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]