[maemo-developers] trouble to disconnect from WiFi AP

From: Patrik Flykt Patrik.Flykt at nokia.com
Date: Mon Apr 23 08:49:43 EEST 2007
	Hi,

On Fri, 2007-04-20 at 11:04 +0200, ext Jan Vachun wrote:
> When N800 is already connected to another WiFi AP, calling
> osso_iap_connect(....) blocks application until WiFi connection is
> dropped using Connection manager UI.

The blocking thing seems more like a bug to me, but eventually
osso_iap_connect should return latest after ~3 minutes due to the D-Bus
timeout used.

Connectivity works with the following policy in N800:
1) if the requested connection is on, the connect request succeeds
2) if there is no connection on, the requested one is created
3) if there is another connection on, the requested connection is not
  connected

In the majority of cases where applications just ask for any connection,
everything works all the time, it's the specific connections that cannot
be connected at will.

Then there is also the OSSO_IAP_TIMED_CONNECT flag. It must be set if
the application triggers a network connection request by itself without
user intervention. When this flag is set, case 2) above does not apply,
i.e. no application can by itself turn on an (expensive GPRS or CS)
network connection.

> calling osso_iap_disconnect(...) with OSSO_IAP_ANY or with realIAP
> profile name as parameter returns no error but doesn't disconnect
> current WiFi connection.

Yes. Connectivity policy again. In 770 there was a reference count that
disconnected the network connection after the last user exited. As N800
tries to be online as much as possible, the reference count is omitted
and the connection does not get disconnected.

> I have also tried to disconnect through D-BUS using
> disconnect_iap_async() in following code, but it didn't work either.

The library is already using that D-Bus interface, so it will work
identically.

What is the exact use case where policy 3) above jams your application?

HTH,

	Patrik



More information about the maemo-developers mailing list