2005-11-04 11:49:47

by Matthew Johnson

[permalink] [raw]
Subject: [Bluez-devel] Disconnecting after 54 seconds

I have a nokia 6230 and a USB bluetooth dongle with a CSR chipset which
I'm using to test an application I'm writing to monitor the connection
to the phone. The application uses code from hcitool to bring up a
connection to the phone. I'm finding that every minute or so the
connection is dropped and I have to reconnect.

This is reproducible with l2ping. l2ping sends and receives pings fine,
but then terminates with Connection reset by peer. Using time(1) to
monitor this repeatedly it seems it happens almost exactly after 54
seconds in every case (min 53.722, max 54.616, SD under 200ms).

Is there some sort of timeout happening here? I thought it might need
activity to keep the link up, but l2ping should do that. Has anyone else
seen anything similar?

(please reply to me as well, I'm not subscribed)

Thanks,
Matt

--
Matthew Johnson
http://www.matthew.ath.cx/


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-11-04 16:45:44

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Disconnecting after 54 seconds

Hi Matthew,

> >> Is there some sort of timeout happening here? I thought it might need
> >> activity to keep the link up, but l2ping should do that. Has anyone else
> >> seen anything similar?
> >
> > these are L2CAP echo packets and so this doesn't have to be reliable.
> >
> Having packets dropped I would expect, but I wouldn't expect the HCI
> connection to be dropped regularly like this. This happens consistently
> using hcitool as well, after 54 seconds a link created with hcitool cc
> is dropped.

the "hcitool cc ..." and "l2ping" are for testing purpose only. Use real
connection on RFCOMM level.

> I've read over the FAQ and howtos on bluez.org and none of them appear
> to address this. Are there any low-level protocol docs which would
> suggest some sort of keep-alive which might be necessary? or is this
> likely to be a problem with my phone?
>

If the phone decides to drop your connection that is fine. From the
security standpoint I would even encourage this.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-11-04 15:56:14

by Matthew Johnson

[permalink] [raw]
Subject: Re: [Bluez-devel] Disconnecting after 54 seconds

On Fri, 4 Nov 2005, Marcel Holtmann wrote:

>> Is there some sort of timeout happening here? I thought it might need
>> activity to keep the link up, but l2ping should do that. Has anyone else
>> seen anything similar?
>
> these are L2CAP echo packets and so this doesn't have to be reliable.
>
Having packets dropped I would expect, but I wouldn't expect the HCI
connection to be dropped regularly like this. This happens consistently
using hcitool as well, after 54 seconds a link created with hcitool cc
is dropped.

I've read over the FAQ and howtos on bluez.org and none of them appear
to address this. Are there any low-level protocol docs which would
suggest some sort of keep-alive which might be necessary? or is this
likely to be a problem with my phone?

Thanks,
Matt

--
Matthew Johnson
http://www.matthew.ath.cx/

2005-11-04 15:45:29

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Disconnecting after 54 seconds

Hi Matthew,

> I have a nokia 6230 and a USB bluetooth dongle with a CSR chipset which
> I'm using to test an application I'm writing to monitor the connection
> to the phone. The application uses code from hcitool to bring up a
> connection to the phone. I'm finding that every minute or so the
> connection is dropped and I have to reconnect.
>
> This is reproducible with l2ping. l2ping sends and receives pings fine,
> but then terminates with Connection reset by peer. Using time(1) to
> monitor this repeatedly it seems it happens almost exactly after 54
> seconds in every case (min 53.722, max 54.616, SD under 200ms).
>
> Is there some sort of timeout happening here? I thought it might need
> activity to keep the link up, but l2ping should do that. Has anyone else
> seen anything similar?

these are L2CAP echo packets and so this doesn't have to be reliable.

> (please reply to me as well, I'm not subscribed)

Then please do so.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel