On Wed, 2017-02-15 at 17:05 +0100, Antoine Aubert wrote:
On the other side, I add a 60min polling time callback
Unfortunately this is a can of worms. 60 min detection is the next
point to argue about. Of course people then want a very accurate online
status, which brings this timer down to, what, tens of seconds? And to
really move status back and forth between online and ready states. On
another note, online status cannot verify connectivity to the
destination desired by the application, as this destination may have
its own set of rules from where access is allowed.
The only networks where this is a perceived problem are those where
connectivity is sporadic for one reason or another. All networks that
work in a stable manner and are designed to allow Internet connectivity
with minimum fuss have no problem in letting ConnMan move to the online
state properly. If the connectivity is sporadic, then ready is actually
the correct state to be in from the start. There is no loss of features
in ConnMan, the same set of functionality is available in both ready
and online states, so from an application perspective this is not a lot
of a problem either.
A bigger point of failure than re-checking for online status is the
presence of a captive portal. When the online check fails, ConnMan
detects the captive portal and sends a RequestBrowser method call to
the Agent. If there is no Agent or the Agent does not implement this
feature, then the connection status stays as ready. I have not heard of
any Agent UI that implements RequestBrowser to this day, unfortunately
[1].
Yet another almost equally big cause failure is to be in a network
walled up with a proxy and not having pacrunner installed. This also
causes the state to stay as ready. With pacrunner installed, ConnMan
will go to state online as the proxy is either detected or configured
in advance. In this setup, applications need to be compiled against
libproxy, and libproxy needs to be configured with pacrunner as the
back end. For example Fedora implements pacrunner support already, and
there a proxy is not a problem for ConnMan or the libproxy enabled
applications.
Cheers,
Patrik
[1] I did try this for the Gnome Shell extension, though. I got stuck
at the part where I was unable to embed a GTK WebKit WebView into a
Clutter -something, run out of my javascript mojo and did not find the
correct APIs/objects to do this.