[maemo-developers] How to make wifi connection only to specified network

From: Jan Vachun vachun at spintec.com
Date: Thu Apr 19 21:47:12 EEST 2007
I have an application, that must communicate from time to time with
server through WiFi link. I have already an IAP profile ( configured
using connection manager ) and saved as SPINTEC.

   osso_iap_connect("SPINTEC", OSSO_IAP_REQUESTED_CONNECT, &ctxt);

it works if there is no active connection or if we ara already connected
using IAP prifile "SPINTEC".

When we are already connected using different IAP profile ( for example
"default" ) it doesn't close conection and doesn't reconnect using
"SPINTEC" profile.

It wait forever ( or until WiFi connection is closed from Connection
Manager UI ).

I have try to call

osso_iap_disconnect(OSSO_IAP_ANY, &ctxt);
and also
osso_iap_disconnect("default", &ctxt);

(just to test it with specific IAP profile, which is active during test )

but it doesn't disconnect.

I have also try to call

/etc/init.d/wlancond stop
/etc/init.d/wlancond start

This drop down current connection but after that it is impossible to use
osso_iap. Even connectin manager is unable to find networks until reboot.

I have also fiddle with shell script wrappers using this:

dbus-send --type=method_call --system --dest=com.nokia.icd
/com/nokia/icd com.nokia.icd.connect string:"SPINTEC" uint32:0

But with the same results - i.e. if connection is down, it connect mi to
right network specified in "SPINTEC" IAP profile, but if there is
another IAP selected through Connection manager, it doesn't work.

Is there any chance to get this working ?

Best regards,


Jan Vachun

Spintec s.r.l.
C.so Torino 89/A
Ferriera di Buttigliera Alta (TO), 10090
tel: +39 011 9348228
fax: +39 011 9348861

More information about the maemo-developers mailing list