Linux bluetooth development
 help / color / mirror / Atom feed
* [Bluez-devel] RFCOMM connection loss on SCO disconnect
@ 2005-03-17 23:37 Victor Shcherbatyuk
  2005-03-18 15:38 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Victor Shcherbatyuk @ 2005-03-17 23:37 UTC (permalink / raw)
  To: bluez-devel; +Cc: victor.shcherbatyuk

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1660 bytes --]

Hello Marcel,

I have the following problem. A device running bluez is configured to be 
HF. 
At the moment of incoming call, the deivece is connected to the phone (AG) 
on RFCOMM channel, while listening on SCO channel. From this moment 
there are two scenarios. 
1) With the phones supporting in-band ringing, the phone opens SCO 
channel to the device and starting to send a ring tone over SCO while 
sending RING over RFCOMM
2) With the phones not supporting in-band ringing, RING is sent over 
RFCOMM, and when we pick-up, SCO channel is open from the phone to the 
device.

The problem comes when I hang up from the calling side after a 
conversation is finished. The phones 2) close? SCO channel, and leave 
RFCOMM channel open, while the phones 1) close SCO channel and then the 
device sends disconnect for the RFCOMM channel handle, breaking RFCOMM 
link. ( I might be mistaking interpretating the log... ) I do not really 
expect the RFCOMM to be disconnected, as I still need to be able to send 
some ATs to the  phone....

This behaviour seems inconsistent, I tried to figure out what is going on 
from the logs, but it is kind of tricky (at least for me ;) ). I've 
included logs for both of the cases (nokia.txt for the type 1) phones, and 
sony.txt for the type 2 phonnes). Both logs start at the moment of 
incoming call when RFCOMM links are already established, and finish after 
I hang-up. I skipped most of the SCO packets cause there are a lot ( -- 
denotes skip )

May be you can comment on this, cause I do not see at the moment what is 
the cause of the problem.

Thank you in advance.

Kind regards,
       Victor Shcherbatyuk.

-- 


[-- Attachment #2: Type: TEXT/plain, Size: 10923 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 43 mode 0x00 interval 0
    Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2b 00 01                                          +..
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:11:9F:60:93:F5 class 0x000000 type SCO
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:11:9F:60:93:F5 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:11:9F:60:93:F5 type SCO encrypt 0x01
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
    handle 42 ptype 0x00e0
    Packet type: HV1 HV2 HV3 
  0000: 2a 00 e0 00                                       *...
> ACL data: handle 43 flags 0x02 dlen 17
> SCO data: handle 42 dlen 60
    0000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0030: 00 00 00 00 00 00 00 00  00 00 00 00              ............
> SCO data: handle 42 dlen 60
--
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2b 00 03                                          +..
> SCO data: handle 42 dlen 60
    0000: c4 f1 73 f5 b3 fa 9f fd  d8 fc c3 fb 15 fd e0 fe  ..s.............
    0010: fa fe 28 ff f3 00 64 04  64 07 53 08 de 06 12 03  ..(...d.d.S.....
    0020: 52 fe 92 f9 39 f6 51 f6  b1 fa 01 02 df 0a 72 12  R...9.Q.......r.
    0030: d7 15 bf 12 e2 0a eb 03  36 fe d3 f7              ........6...
--
> HCI Event: Command Status (0x0f) plen 4
    Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 0
> SCO data: handle 42 dlen 60
    0000: 23 0f 6b 0c c6 08 ba 03  71 fb 06 f3 99 ee 38 ee  #.k.....q.....8.
    0010: 2b f1 77 f5 99 f9 1a fe  c4 01 c5 04 99 06 68 05  +.w...........h.
    0020: 0f 03 70 01 b4 01 ba 04  fe 07 68 07 a9 01 f0 fa  ..p.......h.....
    0030: bd f7 d1 f7 b9 f9 97 fd  98 03 c3 0a              ............
--
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
    status 0x00 handle 42 ptype 0x00a0
    Packet type: HV1 HV3 
> SCO data: handle 42 dlen 60
    0000: f4 fe 84 03 39 08 8d 09  fb 06 96 03 70 01 70 00  ....9.......p.p.
    0010: ce fe db fb 06 f8 c5 f4  04 f4 c1 f6 85 fc bd 00  ................
    0020: b1 00 5c fe 49 fc be fb  b3 fb d5 fc be 00 74 06  ..\.I.........t.
--
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
  0000: 00                                                .
> SCO data: handle 42 dlen 60
    0000: 92 04 b2 06 8d 07 eb 05  7e 02 e4 fd 42 f9 dd f6  ........~...B...
    0010: 26 f7 7a fb 5a 03 58 0b  f2 11 c8 14 e7 10 a7 09  &.z.Z.X.........
    0020: 4f 03 c9 fd 23 f8 ba f0  b0 e9 5c e8 f1 ed b4 f7  O...#.....\.....
    0030: 54 01 55 07 09 0a 39 0a  4d 07 27 02              T.U...9.M.'.
--
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 1
    0000: 00                                                .
> SCO data: handle 42 dlen 60
    0000: 30 07 fd 04 ee 02 bf 04  d2 03 1f 00 21 fb 6a f8  0...........!.j.
    0010: 46 fb 03 02 94 08 49 0d  7c 0f 05 0b 9d ff 55 f2  F.....I.|.....U.
    0020: 18 ed cc f6 06 09 ae 19  2e 21 ca 1a a9 0a b2 f6  .........!......
--
> ACL data: handle 43 flags 0x01 dlen 27
    L2CAP(d): cid 0x0040 len 40 [psm 0]
      0000: 69 ef 49 0d 0a 52 49 4e  47 0d 0a 0d 0a 2b 43 4c  i.I..RING....+CL
      0010: 49 50 3a 20 22 33 31 36  32 38 31 38 36 33 31 34  IP: "31628186314
      0020: 22 2c 31 32 39 0d 0a 3e                           ",129..>
< SCO data: handle 42 dlen 60
    0000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
--
> ACL data: handle 43 flags 0x02 dlen 36
    L2CAP(d): cid 0x0040 len 32 [psm 0]
      0000: 69 ef 39 0d 0a 2b 43 49  45 56 3a 20 33 2c 31 0d  i.9..+CIEV: 3,1.
      0010: 0a 0d 0a 2b 43 49 45 56  3a 20 34 2c 31 0d 0a 3e  ...+CIEV: 4,1..>
> SCO data: handle 42 dlen 60
    0000: 33 0f f4 14 e6 12 e6 05  24 f4 b6 ea 72 eb 7f f1  3.......$...r...
    0010: f3 fb d2 08 8d 13 eb 17  20 12 fc 02 27 f5 27 f1  ........ ...'.'.
--
> ACL data: handle 43 flags 0x02 dlen 27
< SCO data: handle 42 dlen 60
    0000: 1d 00 2a 00 2a 00 17 00  00 00 ed ff fc ff 00 00  ..*.*...........
    0010: ec ff d0 ff d7 ff f0 ff  00 00 fb ff fa ff 09 00  ................
    0020: 14 00 1b 00 11 00 06 00  fd ff f3 ff f7 ff e0 ff  ................
    0030: e8 ff e4 ff e3 ff ee ff  fc ff 0c 00              ............
> SCO data: handle 42 dlen 60
--
> ACL data: handle 43 flags 0x01 dlen 17
    L2CAP(d): cid 0x0040 len 40 [psm 0]
      0000: 69 ef 49 0d 0a 52 49 4e  47 0d 0a 0d 0a 2b 43 4c  i.I..RING....+CL
      0010: 49 50 3a 20 22 33 31 36  32 38 31 38 36 33 31 34  IP: "31628186314
      0020: 22 2c 31 32 39 0d 0a 3e                           ",129..>
> SCO data: handle 42 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
--
> ACL data: handle 43 flags 0x02 dlen 36
    L2CAP(d): cid 0x0040 len 32 [psm 0]
      0000: 69 ef 39 0d 0a 2b 43 49  45 56 3a 20 33 2c 30 0d  i.9..+CIEV: 3,0.
      0010: 0a 0d 0a 2b 43 49 45 56  3a 20 34 2c 30 0d 0a 3e  ...+CIEV: 4,0..>
> SCO data: handle 42 dlen 60
    0000: e3 ff ed ff 01 00 06 00  fe ff fc ff ff ff fd ff  ................
    0010: fa ff f3 ff e9 ff e8 ff  fe ff 08 00 fc ff fa ff  ................
--
< ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(d): cid 0x0040 len 12 [psm 0]
      0000: 6b ef 11 41 54 2b 43 4c  43 43 0d e4              k..AT+CLCC..
> SCO data: handle 42 dlen 60
    0000: f7 ff f4 ff fa ff 04 00  00 00 f4 ff f8 ff f7 ff  ................
    0010: e8 ff eb ff 01 00 04 00  fa ff 02 00 ff ff 00 00  ................
    0020: 0e 00 06 00 f9 ff f5 ff  f4 ff f0 ff ec ff ee ff  ................
--
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 43
> SCO data: handle 42 dlen 60
    0000: f5 ff f6 ff ff ff 0b 00  fe ff e8 ff ec ff ee ff  ................
    0010: f0 ff 06 00 07 00 03 00  0d 00 0a 00 02 00 f4 ff  ................
    0020: e9 ff 02 00 07 00 ef ff  fb ff 08 00 fc ff f6 ff  ................
    0030: f7 ff fc ff fe ff fc ff  fe ff fe ff              ............
--
> ACL data: handle 43 flags 0x02 dlen 17
> SCO data: handle 42 dlen 60
    0000: 01 00 1a 00 08 00 f1 ff  f8 ff e4 ff de ff 05 00  ................
    0010: 04 00 f1 ff f5 ff ee ff  05 00 22 00 0a 00 05 00  ..........".....
    0020: 14 00 02 00 ed ff e1 ff  e9 ff fe ff fa ff e7 ff  ................
    0030: e2 ff ec ff f5 ff 09 00  1a 00 11 00              ............
< SCO data: handle 42 dlen 60
--
> ACL data: handle 43 flags 0x01 dlen 18
    L2CAP(d): cid 0x0040 len 31 [psm 0]
      0000: 69 ff 35 01 0d 0a 2b 43  4c 43 43 3a 20 31 2c 31  i.5...+CLCC: 1,1
      0010: 2c 30 2c 30 2c 30 0d 0a  0d 0a 4f 4b 0d 0a 22     ,0,0,0....OK.."
< SCO data: handle 42 dlen 60
    0000: cc ff b9 ff bd ff cf ff  d9 ff d9 ff e2 ff fe ff  ................
    0010: 1a 00 25 00 3e 00 4b 00  54 00 4d 00 55 00 5b 00  ..%.>.K.T.M.U.[.
--
> ACL data: handle 43 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 0]
      0000: 69 ef 13 0d 0a 45 52 52  4f 52 0d 0a 3e           i....ERROR..>
> SCO data: handle 42 dlen 60
    0000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
--
> ACL data: handle 43 flags 0x02 dlen 22
    L2CAP(d): cid 0x0040 len 18 [psm 0]
      0000: 69 ef 1d 0d 0a 2b 43 49  45 56 3a 20 31 2c 30 0d  i....+CIEV: 1,0.
      0010: 0a 3e                                             .>
> SCO data: handle 42 dlen 60
    0000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
--
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
  0000: 03                                                .
> SCO data: handle 42 dlen 60
    0000: 19 f0 3a 09 cf 18 a8 0c  f7 f1 09 e8 9e f7 00 10  ..:.............
    0010: 2b 18 d6 05 72 ed 3b e9  14 fd 63 14 9a 15 20 ff  +...r.;...c... .
    0020: 95 e9 39 ed b1 05 42 17  36 0f 2d f7 f2 e7 dc f2  ..9...B.6.-.....
    0030: 22 0d 6c 18 a3 09 a8 f0  cd e7 0b f9              ".l.........
--
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 1
    0000: 00                                                .
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 42 reason 0x13
    Reason: Remote User Teminated Connection
> SCO data: handle 42 dlen 60
    0000: 11 00 a6 15 bc 15 f3 fd  9e e8 47 ed fe 05 a8 18  ..........G.....
    0010: 2e 10 11 f6 5d e7 0a f4  63 0d 6a 18 e0 08 45 ef  ....]...c.j...E.
    0020: c7 e7 46 fa 03 13 f9 16  31 02 5f ea 48 ea ae 01  ..F.....1._.H...
--
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 42 reason 0x16
    Reason: Connection Terminated by Local Host
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2b 00 05                                          +..
> ACL data: handle 43 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 0]
      0000: 69 53 01 67                                       iS.g
< ACL data: handle 43 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 0]
      0000: 69 73 01 4d                                       is.M
< ACL data: handle 43 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 0]
      0000: 03 53 01 fd                                       .S..
< ACL data: handle 43 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 43
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 43
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 43
> ACL data: handle 43 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 0]
      0000: 01 53 01 9c                                       .S..
> ACL data: handle 43 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 0]
      0000: 03 73 01 d7                                       .s..
> ACL data: handle 43 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 43 reason 0x13
    Reason: Remote User Teminated Connection

[-- Attachment #3: Type: TEXT/plain, Size: 5677 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 7
    L2CAP(d): cid 0x0040 len 20 [psm 0]
      0000: 31 ff 1c 00 00 0d 0a 2b  43 49 45 56 3a 20 36 2c  1......+CIEV: 6,
      0010: 30 0d 0a 89                                       0...
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 1
    L2CAP(d): cid 0x0040 len 14 [psm 0]
      0000: 31 ff 10 00 00 0d 0a 52  49 4e 47 0d 0a 89        1......RING...
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 17
> ACL data: handle 43 flags 0x01 dlen 10
    L2CAP(d): cid 0x0040 len 40 [psm 0]
      0000: 31 ff 44 00 00 0d 0a 2b  43 4c 49 50 3a 20 22 2b  1.D....+CLIP: "+
      0010: 33 31 36 32 38 31 38 36  33 31 34 22 2c 31 34 35  31628186314",145
      0020: 2c 2c 2c 22 22 0d 0a 89                           ,,,""...
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 1
    L2CAP(d): cid 0x0040 len 14 [psm 0]
      0000: 31 ff 10 00 00 0d 0a 52  49 4e 47 0d 0a 89        1......RING...
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 17
> ACL data: handle 43 flags 0x01 dlen 10
    L2CAP(d): cid 0x0040 len 40 [psm 0]
      0000: 31 ff 44 00 00 0d 0a 2b  43 4c 49 50 3a 20 22 2b  1.D....+CLIP: "+
      0010: 33 31 36 32 38 31 38 36  33 31 34 22 2c 31 34 35  31628186314",145
      0020: 2c 2c 2c 22 22 0d 0a 89                           ,,,""...
< ACL data: handle 43 flags 0x02 dlen 12
    L2CAP(d): cid 0x0046 len 8 [psm 0]
      0000: 33 ef 09 41 54 41 0d 4f                           3..ATA.O
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 43
> ACL data: handle 43 flags 0x02 dlen 16
    L2CAP(d): cid 0x0040 len 12 [psm 0]
      0000: 31 ff 0c 00 01 0d 0a 4f  4b 0d 0a 89              1......OK...
< ACL data: handle 43 flags 0x02 dlen 9
    L2CAP(d): cid 0x0046 len 5 [psm 0]
      0000: 33 ff 01 1e 53                                    3...S
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 43
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:0F:DE:11:E4:42 class 0x000000 type SCO
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:0F:DE:11:E4:42 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:0F:DE:11:E4:42 type SCO encrypt 0x01
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
    handle 42 ptype 0x00e0
    Packet type: HV1 HV2 HV3 
  0000: 2a 00 e0 00                                       *...
> HCI Event: Command Status (0x0f) plen 4
    Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
> SCO data: handle 42 dlen 60
    0000: 00 00 02 00 fe ff fd ff  ff ff fe ff ff ff ff ff  ................
    0010: fe ff ff ff ff ff fe ff  fe ff ff ff ff ff ff ff  ................
    0020: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ................
    0030: ff ff ff ff ff ff ff ff  ff ff ff ff              ............
--
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
  0000: 00                                                .
> SCO data: handle 42 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0010: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0020: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0030: fe ff fe ff fe ff fe ff  fe ff fe ff              ............
--
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
    status 0x00 handle 42 ptype 0x0020
    Packet type: HV1 
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 1
    0000: 00                                                .
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 42 reason 0x13
    Reason: Remote User Teminated Connection
> ACL data: handle 43 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 0]
      0000: 31 ff 1c 00 00 0d 0a 2b  43 49 45 56 3a 20 36 2c  1......+CIEV: 6,
      0010: 31 0d 0a 89                                       1...
> ACL data: handle 43 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 0]
      0000: 31 ff 1c 00 00 0d 0a 2b  43 49 45 56 3a 20 38 2c  1......+CIEV: 8,
      0010: 31 0d 0a 89                                       1...
> ACL data: handle 43 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 0]
      0000: 31 ff 1c 00 00 0d 0a 2b  43 49 45 56 3a 20 32 2c  1......+CIEV: 2,
      0010: 34 0d 0a 89                                       4...
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
  0000: 03                                                .
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 1
    0000: 00                                                .
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 7
    L2CAP(d): cid 0x0040 len 20 [psm 0]
      0000: 31 ff 1c 00 00 0d 0a 2b  43 49 45 56 3a 20 38 2c  1......+CIEV: 8,
      0010: 30 0d 0a 89                                       0...
> ACL data: handle 43 flags 0x02 dlen 17
> ACL data: handle 43 flags 0x01 dlen 7
    L2CAP(d): cid 0x0040 len 20 [psm 0]
      0000: 31 ff 1c 00 00 0d 0a 2b  43 49 45 56 3a 20 32 2c  1......+CIEV: 2,
      0010: 35 0d 0a 89                                       5...
> ACL data: handle 43 flags 0x02 dlen 17

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-devel] RFCOMM connection loss on SCO disconnect
  2005-03-17 23:37 Victor Shcherbatyuk
@ 2005-03-18 15:38 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2005-03-18 15:38 UTC (permalink / raw)
  To: BlueZ Mailing List; +Cc: victor.shcherbatyuk

Hi Victor,

> I have the following problem. A device running bluez is configured to be 
> HF. 
> At the moment of incoming call, the deivece is connected to the phone (AG) 
> on RFCOMM channel, while listening on SCO channel. From this moment 
> there are two scenarios. 
> 1) With the phones supporting in-band ringing, the phone opens SCO 
> channel to the device and starting to send a ring tone over SCO while 
> sending RING over RFCOMM
> 2) With the phones not supporting in-band ringing, RING is sent over 
> RFCOMM, and when we pick-up, SCO channel is open from the phone to the 
> device.
> 
> The problem comes when I hang up from the calling side after a 
> conversation is finished. The phones 2) close? SCO channel, and leave 
> RFCOMM channel open, while the phones 1) close SCO channel and then the 
> device sends disconnect for the RFCOMM channel handle, breaking RFCOMM 
> link. ( I might be mistaking interpretating the log... ) I do not really 
> expect the RFCOMM to be disconnected, as I still need to be able to send 
> some ATs to the  phone....
> 
> This behaviour seems inconsistent, I tried to figure out what is going on 
> from the logs, but it is kind of tricky (at least for me ;) ). I've 
> included logs for both of the cases (nokia.txt for the type 1) phones, and 
> sony.txt for the type 2 phonnes). Both logs start at the moment of 
> incoming call when RFCOMM links are already established, and finish after 
> I hang-up. I skipped most of the SCO packets cause there are a lot ( -- 
> denotes skip )
> 
> May be you can comment on this, cause I do not see at the moment what is 
> the cause of the problem.

if you don't catch the initial L2CAP connection setup then you should
add a --psm=3 to hcidump so it assumes that every unknown L2CAP cids are
RFCOMM connections. Redo this for the Nokia logfile or send in the
binary dumps.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-devel] RFCOMM connection loss on SCO disconnect
@ 2005-03-21 16:04 Victor Shcherbatyuk
  2005-03-22  8:47 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Victor Shcherbatyuk @ 2005-03-21 16:04 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 2567 bytes --]

Hi Marcel,

In the attachment there is complete log (right from the establishment of
the very first connection), looks like the phone issues DISC for RFCOMM.
This happens only if SCO connection is there. Disabling SCO ( when we
ignore connect request) "fixes" the problem, but unfortunatelly this is
not acceptable. I'm going to check if it can be fixed in some way or
another...

Regards,
      Victor.

------------------------------------------------------------------------
-----------------------------------------------------
> Hi Victor,
> 
> > I have the following problem. A device running bluez is configured
to be 
> > HF. 
> > At the moment of incoming call, the deivece is connected to the
phone (AG) 
> > on RFCOMM channel, while listening on SCO channel. From this moment 
>> there are two scenarios. 
> > 1) With the phones supporting in-band ringing, the phone opens SCO 
>> channel to the device and starting to send a ring tone over SCO while

>> sending RING over RFCOMM
> > 2) With the phones not supporting in-band ringing, RING is sent over

> > RFCOMM, and when we pick-up, SCO channel is open from the phone to
the 
> > device.
> > 
> > The problem comes when I hang up from the calling side after a 
> > conversation is finished. The phones 2) close? SCO channel, and
leave 
>> RFCOMM channel open, while the phones 1) close SCO channel and then
the 
> > device sends disconnect for the RFCOMM channel handle, breaking
RFCOMM 
> > link. ( I might be mistaking interpretating the log... ) I do not
really 
> > expect the RFCOMM to be disconnected, as I still need to be able to
send 
> > some ATs to the  phone....
> > 
>> This behaviour seems inconsistent, I tried to figure out what is
going on 
> > from the logs, but it is kind of tricky (at least for me ;) ). I"ve 
> > included logs for both of the cases (nokia.txt for the type 1)
phones, and 
> > sony.txt for the type 2 phonnes). Both logs start at the moment of 
> > incoming call when RFCOMM links are already established, and finish
after 
> > I hang-up. I skipped most of the SCO packets cause there are a lot (
-- 
> > denotes skip )
> > 
> > May be you can comment on this, cause I do not see at the moment
what is 
> > the cause of the problem.
> 
> if you don"t catch the initial L2CAP connection setup then you should
> add a --psm=3 to hcidump so it assumes that every unknown L2CAP cids
are
> RFCOMM connections. Redo this for the Nokia logfile or send in the
> binary dumps.
> 
> Regards
> 
> Marcel

[-- Attachment #2: nokia2_flt.txt --]
[-- Type: text/plain, Size: 22951 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:11:9F:60:93:F5 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:11:9F:60:93:F5 type ACL encrypt 0x00
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
    handle 42 policy 0x0f
    Link policy: RSWITCH HOLD SNIFF PARK 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Command Complete (0x0e) plen 6
    Write Link Policy Settings (0x02|0x000d) ncmd 1
    status 0x00 handle 42
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
  0000: f5 93 60 9f 11 00 01                              ..`....
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2a 00 05                                          *..
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1024 
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 32772 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 26 frame_type 0 credit_flow 15 pri 7 ack_timer 0
      frame_size 1019 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
      dlci 26 frame_type 0 credit_flow 14 pri 7 ack_timer 0
      frame_size 329 max_retrans 0 credits 0
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 26 pf 1 ilen 0 fcs 0xe7 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr 00:11:9F:60:93:F5
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
    bdaddr 00:11:9F:60:93:F5
    Link key: abc5698012d34c4e019c4f74ec43d5f4
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Reply (0x01|0x000b) ncmd 1
    status 0x00 bdaddr 00:11:9F:60:93:F5
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 42 encrypt 0x01
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 26 pf 1 ilen 0 fcs 0x2c 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 26 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 0 len 7
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 26 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 1 b3 0 len 7
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 26 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 0 b2 1 b3 0 len 7
> ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 0 fcs 0x22 credits 4
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): RPN CMD: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
      dlci 26 br 7 db 3 sb 0 p 0 pt 0 xi 0 xo 0
      rtri 0 rtro 0 rtci 0 rtco 0 xon 17 xoff 19 pm 0x006f
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): RPN RSP: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 26 br 7 db 3 sb 0 p 0 pt 0 xi 0 xo 0
      rtri 0 rtro 0 rtci 0 rtco 0 xon 17 xoff 19 pm 0x3f7f
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 26 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 1 len 3
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 1 ilen 0 fcs 0xf8 credits 33
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 4c 49 50 3d  31 0d                    AT+CLIP=1.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 4e 52 45 43 3d  30 0d                    AT+NREC=0.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 19
    L2CAP(d): cid 0x0040 len 15 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 11 fcs 0xe4 
      0000: 41 54 2b 42 52 53 46 3d  37 0d 0d                 AT+BRSF=7..
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 28
    L2CAP(d): cid 0x0040 len 24 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 19 fcs 0x22 credits 1
      0000: 0d 0a 2b 42 52 53 46 3a  20 34 37 0d 0a 0d 0a 4f  ..+BRSF: 47....O
      0010: 4b 0d 0a                                          K..
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 49 4e 44 3d  3f 0d                    AT+CIND=?.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 99
    L2CAP(d): cid 0x0040 len 95 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 90 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 49 4e 44 3a  20 28 22 63 61 6c 6c 22  ..+CIND: ("call"
      0010: 2c 28 30 2c 31 29 29 2c  28 22 73 65 72 76 69 63  ,(0,1)),("servic
      0020: 65 22 2c 28 30 2c 31 29  29 2c 28 22 63 61 6c 6c  e",(0,1)),("call
      0030: 5f 73 65 74 75 70 22 2c  28 30 2d 33 29 29 2c 28  _setup",(0-3)),(
--
< ACL data: handle 42 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 9 fcs 0xe4 
      0000: 41 54 2b 43 49 4e 44 3f  0d                       AT+CIND?.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 33
    L2CAP(d): cid 0x0040 len 29 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 24 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 49 4e 44 3a  20 30 2c 31 2c 30 2c 30  ..+CIND: 0,1,0,0
      0010: 0d 0a 0d 0a 4f 4b 0d 0a                           ....OK..
< ACL data: handle 42 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 16 fcs 0xe4 
      0000: 41 54 2b 43 4d 45 52 3d  33 2c 30 2c 30 2c 31 0d  AT+CMER=3,0,0,1.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 48 4c 44 3d  3f 0d                    AT+CHLD=?.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 43
    L2CAP(d): cid 0x0040 len 39 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 34 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 48 4c 44 3a  20 28 30 2c 31 2c 31 78  ..+CHLD: (0,1,1x
      0010: 2c 32 2c 32 78 2c 33 2c  34 29 0d 0a 0d 0a 4f 4b  ,2,2x,3,4)....OK
      0020: 0d 0a                                             ..
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 31
    L2CAP(d): cid 0x0041 len 27 [psm 1]
        SDP SS Req: tid 0x1 len 0x16
          pat uuid-128 00005555-0000-1000-8000-0002ee000001
          max 255
          cont 00
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(d): cid 0x0041 len 10 [psm 1]
        SDP SS Rsp: tid 0x1 len 0x5
          count 0
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 43 57 41 3d  31 0d                    AT+CCWA=1.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 9 fcs 0xe4 
      0000: 41 54 2b 56 47 53 3d 38  0d                       AT+VGS=8.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 9 fcs 0x22 credits 1
      0000: 0d 0a 45 52 52 4f 52 0d  0a                       ..ERROR..
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 4c 43 43 3d  3f 0d                    AT+CLCC=?.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 21
    L2CAP(d): cid 0x0040 len 17 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 13 fcs 0xe4 
      0000: 41 54 2b 43 50 4d 53 3d  22 4d 45 22 0d           AT+CPMS="ME".
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 42
    L2CAP(d): cid 0x0040 len 38 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 33 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 50 4d 53 3a  20 31 2c 31 35 30 2c 34  ..+CPMS: 1,150,4
      0010: 2c 31 35 2c 35 2c 31 36  35 0d 0a 0d 0a 4f 4b 0d  ,15,5,165....OK.
      0020: 0a                                                .
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 53 4d 53 3d  30 0d                    AT+CSMS=0.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 31
    L2CAP(d): cid 0x0040 len 27 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 22 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 53 4d 53 3a  20 31 2c 31 2c 31 0d 0a  ..+CSMS: 1,1,1..
      0010: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 4d 47 46 3d  30 0d                    AT+CMGF=0.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 10 fcs 0xe4 
      0000: 41 54 2b 43 4e 4d 49 3d  3f 0d                    AT+CNMI=?.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 57
    L2CAP(d): cid 0x0040 len 53 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 48 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 4e 4d 49 3a  20 28 30 2d 32 29 2c 28  ..+CNMI: (0-2),(
      0010: 30 2d 33 29 2c 28 30 2c  32 2c 33 29 2c 28 30 2d  0-3),(0,2,3),(0-
      0020: 32 29 2c 28 30 2c 31 29  0d 0a 0d 0a 4f 4b 0d 0a  2),(0,1)....OK..
< ACL data: handle 42 flags 0x02 dlen 26
    L2CAP(d): cid 0x0040 len 22 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 18 fcs 0xe4 
      0000: 41 54 2b 43 4e 4d 49 3d  32 2c 31 2c 30 2c 30 2c  AT+CNMI=2,1,0,0,
      0010: 30 0d                                             0.
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 6 fcs 0x22 credits 1
      0000: 0d 0a 4f 4b 0d 0a                                 ..OK..
> ACL data: handle 42 flags 0x02 dlen 44
    L2CAP(d): cid 0x0040 len 40 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 0 ilen 36 fcs 0x3e 
      0000: 0d 0a 52 49 4e 47 0d 0a  0d 0a 2b 43 4c 49 50 3a  ..RING....+CLIP:
      0010: 20 22 33 31 36 32 38 31  38 36 33 31 34 22 2c 31   "31628186314",1
      0020: 32 39 0d 0a                                       29..
> ACL data: handle 42 flags 0x02 dlen 36
    L2CAP(d): cid 0x0040 len 32 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 0 ilen 28 fcs 0x3e 
      0000: 0d 0a 2b 43 49 45 56 3a  20 33 2c 31 0d 0a 0d 0a  ..+CIEV: 3,1....
      0010: 2b 43 49 45 56 3a 20 34  2c 31 0d 0a              +CIEV: 4,1..
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2a 00 01                                          *..
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:11:9F:60:93:F5 class 0x000000 type SCO
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:11:9F:60:93:F5 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 45 bdaddr 00:11:9F:60:93:F5 type SCO encrypt 0x01
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
    handle 45 ptype 0x00e0
    Packet type: HV1 HV2 HV3 
  0000: 2d 00 e0 00                                       -...
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2a 00 03                                          *..
> HCI Event: Command Status (0x0f) plen 4
    Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 0
> SCO data: handle 45 dlen 60
    0000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
    0030: 00 00 00 00 00 00 00 00  00 00 00 00              ............
--
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
    status 0x00 handle 45 ptype 0x00a0
    Packet type: HV1 HV3 
> SCO data: handle 45 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0010: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0020: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
--
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
  0000: 00                                                .
> SCO data: handle 45 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0010: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0020: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0030: fe ff fe ff fe ff fe ff  fe ff fe ff              ............
--
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 1
    0000: 00                                                .
> SCO data: handle 45 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0010: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0020: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
--
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 26 pf 0 ilen 4 fcs 0xe4 
      0000: 41 54 41 0d                                       ATA.
> SCO data: handle 45 dlen 60
    0000: 9d ff 3c ff 40 ff 9d ff  17 00 76 00 79 00 25 00  ..<.@.....v.y.%.
    0010: c1 ff 54 ff f1 fe 08 ff  94 ff 38 00 cc 00 eb 00  ..T.......8.....
--
> ACL data: handle 42 flags 0x02 dlen 35
    L2CAP(d): cid 0x0040 len 31 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 26 fcs 0x22 credits 1
      0000: 0d 0a 2b 43 4c 43 43 3a  20 31 2c 31 2c 30 2c 30  ..+CLCC: 1,1,0,0
      0010: 2c 30 0d 0a 0d 0a 4f 4b  0d 0a                    ,0....OK..
< SCO data: handle 45 dlen 60
    0000: 04 00 09 00 f9 ff d9 ff  c9 ff bf ff cf ff e4 ff  ................
--
> ACL data: handle 42 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 0 ilen 9 fcs 0x3e 
      0000: 0d 0a 45 52 52 4f 52 0d  0a                       ..ERROR..
> SCO data: handle 45 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0010: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
--
> ACL data: handle 42 flags 0x02 dlen 22
    L2CAP(d): cid 0x0040 len 18 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 0 ilen 14 fcs 0x3e 
      0000: 0d 0a 2b 43 49 45 56 3a  20 31 2c 30 0d 0a        ..+CIEV: 1,0..
> SCO data: handle 45 dlen 60
    0000: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
    0010: fe ff fe ff fe ff fe ff  fe ff fe ff fe ff fe ff  ................
--
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
  0000: 03                                                .
> SCO data: handle 45 dlen 60
    0000: ff ff ff ff 00 00 ff ff  ff ff ff ff 00 00 ff ff  ................
    0010: ff ff 00 00 00 00 ff ff  ff ff 00 00 ff ff ff ff  ................
    0020: ff ff 00 00 ff ff ff ff  ff ff 00 00 ff ff ff ff  ................
    0030: 00 00 00 00 ff ff ff ff  00 00 ff ff              ............
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 1
    0000: 00                                                .
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 45 reason 0x13
    Reason: Remote User Teminated Connection
> SCO data: handle 45 dlen 60
    0000: ff ff ff ff 00 00 ff ff  ff ff ff ff 00 00 ff ff  ................
    0010: ff ff 00 00 00 00 ff ff  ff ff 00 00 ff ff ff ff  ................
    0020: ff ff 00 00 ff ff ff ff  ff ff 00 00 ff ff ff ff  ................
--
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 45 reason 0x16
    Reason: Connection Terminated by Local Host
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 0 dlci 26 pf 1 ilen 0 fcs 0x67 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 0 dlci 26 pf 1 ilen 0 fcs 0x4d 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2a 00 05                                          *..
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c 
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 42 reason 0x13
    Reason: Remote User Teminated Connection
< HCI Command: Reset (0x03|0x0003) plen 0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-devel] RFCOMM connection loss on SCO disconnect
  2005-03-21 16:04 [Bluez-devel] RFCOMM connection loss on SCO disconnect Victor Shcherbatyuk
@ 2005-03-22  8:47 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2005-03-22  8:47 UTC (permalink / raw)
  To: BlueZ Mailing List

Hi Victor,

> In the attachment there is complete log (right from the establishment of
> the very first connection), looks like the phone issues DISC for RFCOMM.
> This happens only if SCO connection is there. Disabling SCO ( when we
> ignore connect request) "fixes" the problem, but unfortunatelly this is
> not acceptable. I'm going to check if it can be fixed in some way or
> another...

if the phone says DISC we can't do anything. Maybe that is their way of
interpreting the handsfree profile. I think you have to live with it and
simply reconnect the RFCOMM channel after the disconnect.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-22  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-21 16:04 [Bluez-devel] RFCOMM connection loss on SCO disconnect Victor Shcherbatyuk
2005-03-22  8:47 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2005-03-17 23:37 Victor Shcherbatyuk
2005-03-18 15:38 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox