Hi Samuel,
> 2 questions here:
> - Wouldn't a g_supplicant_interface_disconnect() be enough ?
Because this one implicates more logics, with callbacks and so on.
Disabling the network is way faster, and prevents wpa_s looping on retries.
I did not dare to play with disconnect since, basically, it would mean
that the network _is_ connected first, which is not.
> - If not, do you need to enable back the selected network when the user tries
>   to reconnect to the same network (via an agent API call for example) ?
Fortunately no, it's not up to connman to enable back the network :)
This behavior is wpa_s specific:
Once you "select" a network, wpa_s disables all networks (if any, like
if you are connected already for instance) and enables only the selected
one.
If 4way_handshake fails, it will retry and retry and retry ... always
failing at the same point unless you disable this network particular
selected network. Disabling the network deselects it.
(It was easier in connman to "disable selected one" through the
interface, since GSupplicantInterface owns the full path of this
particular network - because of SelectNetwork which previously got
successful).

And about the agent api call, it's already handled: when you get the
agent error about psk, you will have 2 solutions: retry or cancel. It
just works as planned here.

I am not sure that we may need to enable selected networks at some point
because selected networks means an enabled one, so I am not convinced
about the need of g_supplicant_interface_enable_selected_network() here.

If we would like to enable/disable ourselves whatever network (by path
or by ssid for instance), at will, and so on, it would require something
more like: g_supplicant_network_set_enabled(network, enable). But that's
totally out of scope of this current patches. And still I don't see any
useful usage for connman doing that, currently.

Cheers,

Tomasz
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to