2006-11-20 11:45:36

by Sumeet VERMA

[permalink] [raw]
Subject: [Bluez-users] L2CAP disconnect problem

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


Attachments:
log2.txt (10.39 kB)
(No filename) (347.00 B)
(No filename) (164.00 B)
Download all attachments

2006-11-24 08:53:21

by Sumeet VERMA

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Regarding the kernel it is 2.4.


Sumeet


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marcel
Holtmann
Sent: Friday, November 24, 2006 1:01 PM
To: BlueZ users
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Summeet,

> The patch worked. But after the L2CAP disconnection, the ACL channel
doesn't disconnect. Is there some other patch also at HCI Level? Please send
it also.

are we talking about the 2.4 or 2.6 kernel here. I didn't recall any
problems with the 2.6 kernel. We had a problem some time ago where the
creator doesn't terminates his own ACL connections, but that was fixed
around 2.6.1 or so.

Make sure you have a "hcidump -X -V" to show what happens.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-24 07:31:05

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Summeet,

> The patch worked. But after the L2CAP disconnection, the ACL channel doesn't disconnect. Is there some other patch also at HCI Level? Please send it also.

are we talking about the 2.4 or 2.6 kernel here. I didn't recall any
problems with the 2.6 kernel. We had a problem some time ago where the
creator doesn't terminates his own ACL connections, but that was fixed
around 2.6.1 or so.

Make sure you have a "hcidump -X -V" to show what happens.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-24 07:15:48

by Sumeet VERMA

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Marcel

The patch worked. But after the L2CAP disconnection, the ACL channel doesn't disconnect. Is there some other patch also at HCI Level? Please send it also.

Regards,
Sumeet


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Marcel Holtmann
Sent: Friday, November 24, 2006 11:44 AM
To: BlueZ users
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Sumeet,

> I investigated the RFCOMM disconnect problem in more detail and found out
> that when the device is a listener, it expects the initiator of RFCOMM
> connection to disconnect dlci 0. But all devices don't send RFCOMM DISC for
> dlci 0. For ex PTS doesn't disconnect dlci 0 in case of HS profile testing
> Test Case:
> -> IUT (BlueZ) is HS Gateway, PTS is HS
> -> PTS initiates connection and then disconnect
> -> RFCOMM data channel is disconnected by BlueZ but it waits for PTS to
> disconnect RFCOMM control channel which doesn't happen.
> -> As a result test case fails
>
> The HS Spec says HS Gateway is responsible for disconnecting the connection.
> In that case I think there is a misbehaviour here.
>
> If there is something I am missing in understanding the RFCOMM
> implementation and this problem, please correct me.
> Otherwise do you have a patch to solve this problem, wherein the listener
> disconnects dlci 0?

I told you that this was a known bug and we fixed it. You should have
tested a recent 2.6 kernel and this basically means 2.6.18 or even
later. Not an ancient RHEL4 kernel. Anyway, this is the patch that went
in upstream to fix this problem.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-24 06:27:45

by Sumeet VERMA

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Thanks a lot Marcel. Actually I didn't have time to upgrade the kernel as I am in customer support.:) I will do it in my spare time.

Sumeet


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Marcel Holtmann
Sent: Friday, November 24, 2006 11:44 AM
To: BlueZ users
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Sumeet,

> I investigated the RFCOMM disconnect problem in more detail and found
> out that when the device is a listener, it expects the initiator of
> RFCOMM connection to disconnect dlci 0. But all devices don't send
> RFCOMM DISC for dlci 0. For ex PTS doesn't disconnect dlci 0 in case
> of HS profile testing Test Case:
> -> IUT (BlueZ) is HS Gateway, PTS is HS PTS initiates connection and
> -> then disconnect RFCOMM data channel is disconnected by BlueZ but it
> -> waits for PTS to
> disconnect RFCOMM control channel which doesn't happen.
> -> As a result test case fails
>
> The HS Spec says HS Gateway is responsible for disconnecting the connection.
> In that case I think there is a misbehaviour here.
>
> If there is something I am missing in understanding the RFCOMM
> implementation and this problem, please correct me.
> Otherwise do you have a patch to solve this problem, wherein the
> listener disconnects dlci 0?

I told you that this was a known bug and we fixed it. You should have tested a recent 2.6 kernel and this basically means 2.6.18 or even later. Not an ancient RHEL4 kernel. Anyway, this is the patch that went in upstream to fix this problem.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-24 05:59:10

by Sumeet VERMA

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Marcel

I investigated the RFCOMM disconnect problem in more detail and found out
that when the device is a listener, it expects the initiator of RFCOMM
connection to disconnect dlci 0. But all devices don't send RFCOMM DISC for
dlci 0. For ex PTS doesn't disconnect dlci 0 in case of HS profile testing
Test Case:
-> IUT (BlueZ) is HS Gateway, PTS is HS
-> PTS initiates connection and then disconnect
-> RFCOMM data channel is disconnected by BlueZ but it waits for PTS to
disconnect RFCOMM control channel which doesn't happen.
-> As a result test case fails

The HS Spec says HS Gateway is responsible for disconnecting the connection.
In that case I think there is a misbehaviour here.

If there is something I am missing in understanding the RFCOMM
implementation and this problem, please correct me.
Otherwise do you have a patch to solve this problem, wherein the listener
disconnects dlci 0?

Thanks and Regards,


Sumeet


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marcel
Holtmann
Sent: Wednesday, November 22, 2006 11:53 AM
To: BlueZ users
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Sumeet,

> So you mean if I use 2.6 kernel this problem will not occur. I tried
> 2.6.9-34.EL kernel but the same problem occurs. No RFCOMM disconnect
> :(

I was talking about a recent 2.6 kernel. Not some ancient RHEL4 kernel.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-22 06:23:22

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Sumeet,

> So you mean if I use 2.6 kernel this problem will not occur. I tried
> 2.6.9-34.EL kernel but the same problem occurs. No RFCOMM disconnect :(

I was talking about a recent 2.6 kernel. Not some ancient RHEL4 kernel.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-22 05:43:59

by Sumeet VERMA

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Marcel,
So you mean if I use 2.6 kernel this problem will not occur. I tried
2.6.9-34.EL kernel but the same problem occurs. No RFCOMM disconnect :(

Regds,
Sumeet


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marcel
Holtmann
Sent: Tuesday, November 21, 2006 12:57 PM
To: BlueZ users
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Sumeet,

> I am using 2.4-20.8 with bluez-utils-2.25

actually this kernel is kinda old. You are better of with the latest 2.6
based kernel.

> I also tried using shutdown(fd, SHUT_RDWR) instead of close(fd) but
> still the rfcomm doesn't disconnect. This happens only when I get an
> incoming RFCOMM connection. When I initiate a connection, and disconnect,
it works.

This was a reference counting bug and I fixed it some time ago.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-21 07:27:16

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Sumeet,

> I am using 2.4-20.8 with bluez-utils-2.25

actually this kernel is kinda old. You are better of with the latest 2.6
based kernel.

> I also tried using shutdown(fd, SHUT_RDWR) instead of close(fd) but still
> the rfcomm doesn't disconnect. This happens only when I get an incoming
> RFCOMM connection. When I initiate a connection, and disconnect, it works.

This was a reference counting bug and I fixed it some time ago.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-21 07:16:01

by Sumeet VERMA

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Marcel
I am using 2.4-20.8 with bluez-utils-2.25

I also tried using shutdown(fd, SHUT_RDWR) instead of close(fd) but still
the rfcomm doesn't disconnect. This happens only when I get an incoming
RFCOMM connection. When I initiate a connection, and disconnect, it works.

Regards,
Sumeet


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marcel
Holtmann
Sent: Monday, November 20, 2006 6:11 PM
To: BlueZ users
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Summeet,

> I am testing a HS-Gateway application. I have a listening thread which
> waits for incoming HS connection. I am using
>
> sk = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
> then bind and then waiting on accept()
>
> Now connection is successful but when I disconnect I see the RFCOMM
channel disconnecting but then L2CAP doesn't disconnect. After a UA is
received there is no L2CAP disc which I am expecting. Anybody faced this
problem before?
>
> Listening thread code is referenced from scotest.c but it doesn't
> work..:(

actually the RFCOMM control is not disconnected and unless this one
disconnects, the L2CAP will not close that PSM.

What kernel version do you use?

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-11-20 12:40:59

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] L2CAP disconnect problem

Hi Summeet,

> I am testing a HS-Gateway application. I have a listening thread which waits for incoming HS connection. I am using
>
> sk = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
> then bind and then waiting on accept()
>
> Now connection is successful but when I disconnect I see the RFCOMM channel disconnecting but then L2CAP doesn't disconnect. After a UA is received there is no L2CAP disc which I am expecting. Anybody faced this problem before?
>
> Listening thread code is referenced from scotest.c but it doesn't work..:(

actually the RFCOMM control is not disconnected and unless this one
disconnects, the L2CAP will not close that PSM.

What kernel version do you use?

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users