[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nokia 6060 drops connection after short inactivity

From: Pawel Kot
Subject: Re: Nokia 6060 drops connection after short inactivity
Date: Tue, 14 Nov 2006 21:39:58 +0100


On 11/14/06, j <address@hidden> wrote:
Pawel Kot <gnokii <at>> writes:
> > First you need to realize, that it is very possible that the reason for
> > timeout is in the the phone firmware, not Gnokii code. This has been
> > discussed on this mailing list before.
> Well, I'd say it's a feature not a bug. If you stop sending frames the
> remote end closes the connection.
> > The solution for this problem depends on the opensync implementation.
> > Gnokii only provides the means of transportation, it's up to you to
> > steer properly.
In my view it's the transportation that fails. And it's gnokii that is
developed around the quirks of the phones and not the other way around, isn't

libgnokii provides functionality. It doesn't provide, let's say, full
session management. Just that bit (statemachine) to ensure atomicity
of the operations. Library per se is stateless
It is possible to create a daemon that does what you say, but that on
the TODO list (way in the future). Estabilishing and closing
connection is also provided functionality.

> That's true. I think also that it is the application who should keep
> the connection being up.
I can't follow you here.

Solution 1:
Reseting the connection upon timeout in the main retry loop within libgnokii
would take a few lines of code and solve the problem in a clean way for all
applications that make use of libgnokii.

I disagree. Sometimes timeout is expected behaviour of the library and
the application wants it. I might agree that it is not strictly
application task, but it may be something between library and the

In order to fix it within the calling application, I can only think of two
solutions, both are ugly workarounds:

2. Writing a wrapper around each call to libgnokii that detects timeouts and
resets the connection (in opensync there are quite a few calls all over the
place -- most other nontrivial applications are probably the same.)

This is called error handling ;P And also: not each call, just where it matters.

3. Having a thread in the background that sends a dummy frame to the phone
every few seconds.

And this is what most applications do. For sure all Nokia PC suites do it.

Please let me know why you think that solution 1 is not a good idea, or how it
could be fixed easily within the applicaiton.

See smsd how it does it.

To sum up: some application that maintains the connection to the phone
is a good idea. If someone wants to implement it, i would support this
effort. And I think libgnokii is not the proper place to do it.

take care,
Pawel Kot

reply via email to

[Prev in Thread] Current Thread [Next in Thread]