[maemo-developers] How to detect that connectivity is lost

From: Tomàs Jiménez Lozano tomas at oranginalab.com
Date: Wed Apr 4 11:55:35 EEST 2007
On Wed, 2007-04-04 at 08:44 +0300, Kalle Valo wrote:
> "ext Tomas" <tomas at oranginalab.com> writes:
> 
> > The problem is that the device does not recognize it has lost connectivity
> > until it has lost WIFI signal completely. It does not launch any dbus signal
> > to notify it has lost connection but the WIFI signal is so low that no data
> > transmission is possible.
> 
> If no data cannot be transfered over WLAN, the WLAN driver should
> disconnect the connection. If not, I would consider that as a bug and
> it's a bad idea to try workaround this in userspace. In OSI model
> terms, this an L2 issue and for the upper layers it should just work.
> 
> > Is it possible to configure it anyway so it disconnects (and launches the
> > corresponding dbus signal) from the current IAP when WIFI signal is so low
> > that data transmission becomes impossible?
> 
> Could you describe more about the situation when data transmission is
> not possible but the connection is still on, please? Try to give
> details as much as possible, so that I could reproduce the problem at
> our lab.
> 

To reproduce the situation you only need to move away from de access
point.
I've tried what Frantisek suggested, and ping fails always before the
device notifying it has lost connection.

I've checked how far from AP is raised de dbus signal notifying
disconnection and the average distance where ping starts to
definitiveley fail and ping always fails quite more near from IAP than
disconnection signal is raised.

If, as it seems to be, it is a lower level bug I beg you to try to fix
it as soon as possible. In the meanwhile, we need to use the pinging
workaround because for our application it is critical to detect (and
recover) from any connectivity lost.
As you feared, Kalle, the battery performance reduces drastically (what
becomes another issue for our app). We do only ping every 15 second in
order to let the device enter in PSM between pings but the battery
performance is still too poor.

On the other hand, the pinging workaround has fixed another problem we
were detecting in our app. As I told before, our app need to be always
WLAN connected, and we have checked that the device after a given amount
of time of communication inactivity enters in what we suppose is some
kind of higher lever PSM. When in this state, the device is still
connected but it does not answer to ping requests. When it needs to send
any data it wakes up automatically but for us it may be too late because
communication with other network devices may has been lost. I've been
looking for information about this supposed high level PSM and how to
avoid it but I've found nothing.

I hope you don't mind if I ask you one more question: Is there any other
way to force disconnection appart form the shutdown ICd dbus method. It
works fine but we would like to do it without prompting the user?

Best regards,
  
Tomàs Jiménez





More information about the maemo-developers mailing list