RConnection::Start takes over 15 seconds to complete

Login to reply to this topic.
Fri, 2007-09-28 14:56
Joined: 2007-09-28
Forum posts: 2


Hi !
I simply would like to create a socket that binds to an IP address and make it to receive UDP packets. The bearer type used is WLAN. In order to get the socket active I need to switch on the correspondant access point on the device and it looks to me that the only method to do is using the RConnection::Start method.

So I run the following code on a Nokia E65 (v9.1) and it takes me about 15 seconds for the Start(prefs) to complete. This happens for synchronous and asynchronous calls of that method.

RSocketServ server;
RConnection connection;
TCommDbConnPref prefs;

[...] (Getting Iap)

User::LeaveIfError(server.Connect(KESockDefaultMessageSlots));
prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);prefs.SetBearerSet(

ECommDbBearerWLAN);
prefs.SetIapId(Iap);
User::LeaveIfError(connection.Open(server, KConnectionTypeDefault));

connection.Start(prefs);

I've tried to trace it down using RConnection::ProgressNotification and it seems that the time consuming part is during the treatment of the EConfigDaemonConfigure message. Actually it is the step between EConfigDaemonStartingRegistration and EConfigDaemonFinishedRegistration.
I don't know what exactly happens during this configuration, but it somehow looks like there is maybe some information missing to the daemon. Is it the right CommDb table ? How to set it ?
Or do I miss something trivial ?

Thank you for your help !
--
Thomas


Fri, 2007-09-28 22:51
Forum Nokia Champion
Joined: 2005-08-31
Forum posts: 124
Re: RConnection::Start takes over 15 seconds to complete

hi,

the approach looks fine the commdb setting needs a time delay to populate the list of IAP avalible for a device..

you can look of the IAP example avalible in www.forum.nokia.com in code and examples section..

Regards,
Mateen Maldar


Mateen Maldar

Sat, 2007-09-29 20:25
Joined: 2007-09-28
Forum posts: 2
Re: RConnection::Start takes over 15 seconds to complete

Hi,

thank you for your answer.

I am afraid that I was not very clear in my explanation. I am not complaining that it takes some time, I say it takes too much time: if I start the web client application on the phone and I choose the access point manually then it takes about 4 seconds that the requested web-page starts to load.

But that's not all !

Please have a look a the following comparison.

I wrote some Java code that allows to do the same thing. Basically, I use the Connector.open method together with the DatagramConnection interface. The only difference compared to the C++ code is that I need to send some data over the network in order to switch the network interface on.

I calculate 4 seconds for the network interface being ready: it replies to ping requests.

When I use Rconection::Start method it takes exactly the same 4 seconds after which the network interface replies to ping requests _BUT_ it takes about 17 seconds for the start method to return !!!

FYI, I called the start method in this case without the prefs argument. That allows me, like in the java case, to choose an access point manually. This makes it easier to count the seconds Eye-wink

Am I the only one facing this problem ?

Thank you for your help.
--
Thomas

Tue, 2008-04-29 15:02
Joined: 2005-11-30
Forum posts: 29
Re: RConnection::Start takes over 15 seconds to complete

I'm facing the same problem...RConnection::Start consuming too much time!

Did you make any progress on this issue?

Wed, 2008-04-30 17:23
Joined: 2006-05-08
Forum posts: 162
Re: RConnection::Start takes over 15 seconds to complete

The reason its taking so much time is its spending it on DHCP acquiring a network address. To be honest, from a developer perspective, there isn't much you can do about it really. RConnection::Start() only returns, when the DHCP daemon signals the completion of the registration process, even though its already ready for transferring data, as you have already noticed through your own experiment! Someone tells me that this behaviour has been rectified in the future versions of Symbian OS Eye-wink


Mon, 2008-07-14 14:10
Joined: 2007-01-17
Forum posts: 96
Re: RConnection::Start takes over 15 seconds to complete

I too have a similar problem but i wonder if it works well in browser then there must some other way of emulating the same.


Shashi Kiran G M

Tue, 2008-07-15 07:15
Joined: 2008-06-23
Forum posts: 76
Re: RConnection::Start takes over 15 seconds to complete

With RConnection::Start I noticed that it took quite a time to complete in two cases:

1. There was already an active GPRS connection by the time I wanted to create a new WLAN connection. In this case it was indeed the DHCP that carried out some lengthy processing. Unfortunately, that issue hadn't been fixed when I stopped dealing with WLAN about 2 months ago.
2. In case the WLAN connection was using encryption it seemed to take more time to establish the link.

But anyway, if the browser can set it up in much less time then there should be some other thing in the background...

  • Login to reply to this topic.