From: Sumeet VERMA <sumeet.verma@st.com>
To: <bluez-users@lists.sourceforge.net>
Subject: [Bluez-users] L2CAP disconnect problem
Date: Mon, 20 Nov 2006 17:15:36 +0530 [thread overview]
Message-ID: <00b501c70c99$65404970$8935c70a@dlh.st.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 590 bytes --]
Hi
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..:(
hcidump log is attached.
Thanks,
Sumeet
[-- Attachment #2: log2.txt --]
[-- Type: text/plain, Size: 10874 bytes --]
HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci1 snap_len: 1028 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr 00:03:35:11:44:22 class 0x200404 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:03:35:11:44:22 role 0x01
Role: Slave
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 2
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr 00:03:35:11:44:22 type ACL encrypt 0x00
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 1 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
> HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
> HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 2
status 0x00 handle 1
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
handle 1 ptype 0x0018
Packet type: DM1 DH1
> HCI Event: Command Status (0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 1 ptype 0x0018
Packet type: DM1 DH1
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 2
> HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 2396
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> ACL data: handle 1 flags 0x02 dlen 28
L2CAP(d): cid 0x0040 len 24 [psm 1]
SDP SSA Req: tid 0x0 len 0x13
pat uuid-16 0x1112 (Headset AG) uuid-16 0x0100 (L2CAP) uuid-16 0x0003 (RFCOMM)
max 100
aid(s) 0x0004 (ProtocolDescList)
cont 00
< ACL data: handle 1 flags 0x02 dlen 120
L2CAP(d): cid 0x0040 len 116 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x6f
count 100
cont 08 BA 3A 61 45 64 00 00 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0041
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
Connection successful
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
MTU 132
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
MTU 1024
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
> ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
< ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0041 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
dlci 36 frame_type 0 credit_flow 15 pri 0 ack_timer 0
frame_size 127 max_retrans 0 credits 1
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0041 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
dlci 36 frame_type 0 credit_flow 14 pri 0 ack_timer 0
frame_size 127 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 36 pf 1 ilen 0 fcs 0x40
< ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 36 pf 1 ilen 0 fcs 0x8b
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 36 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 1 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 36 pf 1 ilen 0 fcs 0xb credits 33
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 36 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 36 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 36 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> ACL data: handle 1 flags 0x02 dlen 20
L2CAP(d): cid 0x0041 len 16 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 0 ilen 12 fcs 0xcd
0000: 41 54 2b 43 4b 50 44 3d 32 30 30 0d AT+CKPD=200.
< HCI Command: Add SCO Connection (0x01|0x0007) plen 4
handle 1 ptype 0x0080
Packet type: HV3
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(d): cid 0x0041 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 36 pf 0 ilen 6 fcs 0x17
0000: 0d 0a 4f 4b 0d 0a ..OK..
> HCI Event: Command Status (0x0f) plen 4
Add SCO Connection (0x01|0x0007) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 1 ilen 0 fcs 0xd1 credits 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 8 bdaddr 00:03:35:11:44:22 type SCO encrypt 0x00
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(d): cid 0x0041 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 36 pf 0 ilen 6 fcs 0x17
0000: 0d 0a 4f 4b 0d 0a ..OK..
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 2
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0041 len 14 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 0 ilen 10 fcs 0xcd
0000: 41 54 2b 56 47 53 3d 30 37 0d AT+VGS=07.
> ACL data: handle 1 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 1 ilen 0 fcs 0xd1 credits 1
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(d): cid 0x0041 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 36 pf 0 ilen 6 fcs 0x17
0000: 0d 0a 4f 4b 0d 0a ..OK..
> ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0041 len 14 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 0 ilen 10 fcs 0xcd
0000: 41 54 2b 56 47 53 3d 30 37 0d AT+VGS=07.
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 1 ilen 0 fcs 0xd1 credits 1
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(d): cid 0x0041 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 36 pf 0 ilen 6 fcs 0x17
0000: 0d 0a 4f 4b 0d 0a ..OK..
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 1 ilen 0 fcs 0xd1 credits 1
> ACL data: handle 1 flags 0x02 dlen 20
L2CAP(d): cid 0x0041 len 16 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 0 ilen 12 fcs 0xcd
0000: 41 54 2b 43 4b 50 44 3d 32 30 30 0d AT+CKPD=200.
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(d): cid 0x0041 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 36 pf 0 ilen 6 fcs 0x17
0000: 0d 0a 4f 4b 0d 0a ..OK..
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 36 pf 1 ilen 0 fcs 0xd1 credits 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 8 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 8 reason 0x16
Reason: Connection Terminated by Local Host
> HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 2
< ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 0 dlci 36 pf 1 ilen 0 fcs 0xc0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): UA: cr 0 dlci 36 pf 1 ilen 0 fcs 0xea
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
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
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next reply other threads:[~2006-11-20 11:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 11:45 Sumeet VERMA [this message]
2006-11-20 12:40 ` [Bluez-users] L2CAP disconnect problem Marcel Holtmann
2006-11-21 7:16 ` Sumeet VERMA
2006-11-21 7:27 ` Marcel Holtmann
2006-11-22 5:43 ` Sumeet VERMA
2006-11-22 6:23 ` Marcel Holtmann
2006-11-24 5:59 ` Sumeet VERMA
2006-11-24 6:14 ` Marcel Holtmann
2006-11-24 6:27 ` Sumeet VERMA
2006-11-24 7:15 ` Sumeet VERMA
2006-11-24 7:31 ` Marcel Holtmann
2006-11-24 8:52 ` Sumeet VERMA
2006-11-24 17:25 ` Marcel Holtmann
2006-11-24 8:53 ` Sumeet VERMA
2006-11-24 9:01 ` Sumeet VERMA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00b501c70c99$65404970$8935c70a@dlh.st.com' \
--to=sumeet.verma@st.com \
--cc=bluez-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox