Samuel Ortiz <sa...@linux.intel.com> writes:

> Hi Kalle,

Hi Samuel,

> On Tue, Oct 26, 2010 at 07:30:53PM +0300, Kalle Valo wrote:
>> In a big network, for example at Ubuntu Developer Summit which has >10 APs,
>> connman and wpasupplicant got out of sync very easily. connman claimed it
>> was connected even though wpasupplicant (and the kernel driver) was actually
>> connected to the AP.
>
> Did you mean connman claimed it was _disconnected_ ?

Yes, that's what I mean. Sorry for the confusion.

Just to be clear: connman claimed that wifi connection was disconnected,
but 'iw wlan0 link' showed that I was connected to Ubuntu network.

>> The problem is that while roaming between APs inside ESS
>> wpasupplicant states go like this:
>> 
>> COMPLETED -> DISCONNECTED -> SCANNING -> AUTHENTICATING ... -> COMPLETED
>> 
>> So what happens is that connman unnecessarily marks the network disconnected
>> even though wpasupplicant is just roaming to a different AP within ESS.
>
> Well it really got disconnected from the AP, so ConnMan should just track
> that.

Well, it depends how we want to handle intra-ESS roaming. I see two
choises:

1) wpasupplicant manages roaming, connman just provides SSID and other settings
2) connman manages roaming

We should definitely go with option 1, it's faster and wpasupplicant has
the best information to choose which AP to connect to. So roaming between
APs on an ESS would be transparent from connman point of view.

> I'm really not a big fan of trying to be smarter than wpa_supplicant. In my
> experience, it's the shortest paths to new bugs

The problem here is that when wpasupplicant is roaming between APs it
goes to the disconnected state and then immediately to the scanning
state. The connman wifi plugin doesn't handle this properly.

>> To fix this add a timer which waits 10 seconds after a disconnected state.
>> If wpasupplicant hasn't connected to a network at time only then set the
>> network disconnected.
>
> It looks a bit like a hack to me, the fundamental issue (ConnMan not tracking
> the wpa_supplicant states properly, it seems) is not fixed.

I agree my patch is a bit hackish, but it makes a huge difference here
at UDS. Without these two patches (and Mohamed's busy loop fix) connman
is unusable with a large wifi network.

Currently wifi plugin makes wrong assumptions how wpasupplicant works
and what the different wpasupplicant states mean. The proper fix would
be to change wpasupplicant to not use disconnected state when roaming.
The disconnected state should be used only when wpasupplicant is certain
that it cannot connect to the ESS anymore, for example after scanning
two times and not finding any suitable APs.

I think I can work on changing wpasupplicant at some point, but it will
take few months before I can find the time. My short term goal is to
make connman wifi reliable enough for the users.

Thank you for the comments.

-- 
Kalle Valo
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to