public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Losing SCO connection
@ 2008-05-13 22:30 Michael Oh
  2008-05-15  9:50 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Oh @ 2008-05-13 22:30 UTC (permalink / raw)
  To: bluez-users

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

Hi,
I wrote a little app that tries to support the hands-free (HF) profile but I am having trouble keeping the SCO connection alive.  Using an RFCOMM connection, I am able to establish the HF Service Level Connection per HF Profile specification and then create an SCO connection to a mobile phone.  But SCO seems to get disconnected by the phone after about 40-50msec of bidirectional voice data.  I can reconnect SCO but the phone disconnects it again.  Once in a while, this problem doesn't occur and SCO stays alive.  When this happens, I can tear down and bring up the HF setup repeatedly without any problem unless I power cycle the phone or the linux machine.  I would like to make it work on consistent basis.
Please note that I am using the bluez lib only. I am not relying on the "services" utilities in the bluez-util package (I turned them all off).  Also, my SDP setup code seems to operate okay (i.e. output of "sdptool browse local" looks fine)
Setup:
    - Fedora 8 with
        kernel 2.6.24.4
        bluez-lib 3.20
        L2CAP v2.9
        RFCOMM v1.8
        SCO v0.5
    - Bluetooth dongle: Targus with Broadcom 2045    - phone: Nokia 6085
I have tried another phone and another BT dongle and the problem is still there so I am leaning it's either my code or bluez...
I have attached the hcidump output of a problematic session if anyone wants to take a look.
TIA for any tips or comments,
Michael


      

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

HCI sniffer - Bluetooth packet analyzer ver 1.41
device: hci0 snap_len: 1028 filter: 0xffffffff
2008-05-13 14:02:10.298662 < HCI Command: Write Class of Device (0x03|0x0024) plen 3
    class 0x200408
2008-05-13 14:02:10.300739 > HCI Event: Command Complete (0x0e) plen 4
    Write Class of Device (0x03|0x0024) ncmd 1
    status 0x00
2008-05-13 14:02:10.300873 < HCI Command: Read Class of Device (0x03|0x0023) plen 0
2008-05-13 14:02:10.302742 > HCI Event: Command Complete (0x0e) plen 7
    Read Class of Device (0x03|0x0023) ncmd 1
    status 0x00 class 0x200408
2008-05-13 14:02:10.303631 < HCI Command: Write Class of Device (0x03|0x0024) plen 3
    class 0x200408
2008-05-13 14:02:10.305738 > HCI Event: Command Complete (0x0e) plen 4
    Write Class of Device (0x03|0x0024) ncmd 1
    status 0x00
2008-05-13 14:02:10.305830 < HCI Command: Read Class of Device (0x03|0x0023) plen 0
2008-05-13 14:02:10.307737 > HCI Event: Command Complete (0x0e) plen 7
    Read Class of Device (0x03|0x0023) ncmd 1
    status 0x00 class 0x200408
2008-05-13 14:02:10.307753 < HCI Command: Read Voice Setting (0x03|0x0025) plen 0
2008-05-13 14:02:10.309738 > HCI Event: Command Complete (0x0e) plen 6
    Read Voice Setting (0x03|0x0025) ncmd 1
    status 0x00 voice setting 0x0060
2008-05-13 14:02:10.309915 < HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:1F:01:B9:E9:79 ptype 0xcc18 rswitch 0x00 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 
2008-05-13 14:02:10.312744 > HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
2008-05-13 14:02:10.904663 > HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 12 bdaddr 00:1F:01:B9:E9:79 type ACL encrypt 0x00
2008-05-13 14:02:10.904684 < ACL data: handle 12 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
2008-05-13 14:02:10.904694 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 12
2008-05-13 14:02:10.907662 > HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
2008-05-13 14:02:10.907674 < HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
    handle 12 policy 0x02
    Link policy: HOLD 
2008-05-13 14:02:10.908661 > HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 12
    Features: 0xbf 0xee 0x0f 0xc6 0x9a 0x39 0x00 0x00
2008-05-13 14:02:10.909662 > HCI Event: Command Complete (0x0e) plen 6
    Write Link Policy Settings (0x02|0x000d) ncmd 1
    status 0x00 handle 12
2008-05-13 14:02:10.909674 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:1F:01:B9:E9:79 mode 2 clkoffset 0x0000
2008-05-13 14:02:10.911662 > HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2008-05-13 14:02:10.934658 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 12 slots 5
2008-05-13 14:02:10.958664 > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0000
2008-05-13 14:02:10.958679 < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0040
2008-05-13 14:02:10.965661 > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
2008-05-13 14:02:10.965674 < ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1013 
2008-05-13 14:02:10.967663 > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 32772 
2008-05-13 14:02:10.967675 < ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 32772 
2008-05-13 14:02:10.971661 > ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 1013 
2008-05-13 14:02:10.971689 < ACL data: handle 12 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 
2008-05-13 14:02:10.973653 > HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:1F:01:B9:E9:79 name 'Nokia 6085'
2008-05-13 14:02:10.974654 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 4
2008-05-13 14:02:10.978661 > ACL data: handle 12 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 
2008-05-13 14:02:10.978688 < ACL data: handle 12 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 1008 max_retrans 0 credits 7
2008-05-13 14:02:10.985659 > ACL data: handle 12 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
2008-05-13 14:02:10.985684 < ACL data: handle 12 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 
2008-05-13 14:02:11.028648 > HCI Event: Link Key Request (0x17) plen 6
    bdaddr 00:1F:01:B9:E9:79
2008-05-13 14:02:11.028784 < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
    bdaddr 00:1F:01:B9:E9:79 key AD9373F5DBAEF3EA7D7AF0056776BC78
2008-05-13 14:02:11.037648 > HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Reply (0x01|0x000b) ncmd 1
    status 0x00 bdaddr 00:1F:01:B9:E9:79
2008-05-13 14:02:11.131638 > HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 12 encrypt 0x01
2008-05-13 14:02:11.131649 > ACL data: handle 12 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 
2008-05-13 14:02:11.131682 < ACL data: handle 12 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 0
2008-05-13 14:02:11.133639 > ACL data: handle 12 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 0
2008-05-13 14:02:11.133665 < ACL data: handle 12 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 0
2008-05-13 14:02:11.134639 > ACL data: handle 12 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 30
2008-05-13 14:02:11.135633 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 4
2008-05-13 14:02:11.138641 > ACL data: handle 12 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 0 b2 1 b3 0 len 0
2008-05-13 14:02:11.138666 < ACL data: handle 12 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
2008-05-13 14:02:11.138678 < ACL data: handle 12 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 43 49 4e 44 3d  3f 0d 0a                 AT+CIND=?..
2008-05-13 14:02:11.149639 > ACL data: handle 12 flags 0x02 dlen 109
    L2CAP(d): cid 0x0040 len 105 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 100 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)),(
      0040: 22 63 61 6c 6c 73 65 74  75 70 22 2c 28 30 2d 33  "callsetup",(0-3
      0050: 29 29 2c 28 22 63 61 6c  6c 68 65 6c 64 22 2c 28  )),("callheld",(
      0060: 30 2d 32 29                                       0-2)
2008-05-13 14:02:11.149732 < ACL data: handle 12 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 3f  0d 0a                    AT+CIND?..
2008-05-13 14:02:11.151637 > ACL data: handle 12 flags 0x02 dlen 67
    L2CAP(d): cid 0x0040 len 63 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 0 ilen 59 fcs 0x3e 
      0000: 29 2c 28 22 62 61 74 74  63 68 67 22 2c 28 30 2d  ),("battchg",(0-
      0010: 35 29 29 2c 28 22 72 6f  61 6d 22 2c 28 30 2c 31  5)),("roam",(0,1
      0020: 29 29 2c 28 22 73 69 67  6e 61 6c 22 2c 28 30 2d  )),("signal",(0-
      0030: 35 29 29 0d 0a 0d 0a 4f  4b 0d 0a                 5))....OK..
2008-05-13 14:02:11.151710 < ACL data: handle 12 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 45 52 3d  0d 0a                    AT+CMER=..
2008-05-13 14:02:11.154630 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 4
2008-05-13 14:02:11.158638 > ACL data: handle 12 flags 0x02 dlen 41
    L2CAP(d): cid 0x0040 len 37 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 26 pf 1 ilen 32 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: 2c 30 2c 34 2c 30 2c 33  0d 0a 0d 0a 4f 4b 0d 0a  ,0,4,0,3....OK..
2008-05-13 14:02:11.159635 > ACL data: handle 12 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..
2008-05-13 14:02:11.224627 > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0041
2008-05-13 14:02:11.224645 < ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
2008-05-13 14:02:11.232634 > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 65535 
2008-05-13 14:02:11.232649 < ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 65535 
2008-05-13 14:02:11.232654 < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
2008-05-13 14:02:11.237621 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 4
2008-05-13 14:02:11.240628 > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
2008-05-13 14:02:11.242631 > ACL data: handle 12 flags 0x02 dlen 17
    L2CAP(d): cid 0x0041 len 13 [psm 1]
        SDP SS Req: tid 0x4 len 0x8
          pat uuid-16 0x111e (Handsfree)
          max 255
          cont 00
2008-05-13 14:02:11.242714 < ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(d): cid 0x0041 len 14 [psm 1]
        SDP SS Rsp: tid 0x4 len 0x9
          count 1
          handle 0x10000
          cont 00
2008-05-13 14:02:11.249625 > ACL data: handle 12 flags 0x02 dlen 24
    L2CAP(d): cid 0x0041 len 20 [psm 1]
        SDP SA Req: tid 0x5 len 0xf
          handle 0x10000
          max 65435
          aid(s) 0x0001 (SrvClassIDList) 0x0311 (SuppFeatures)
          cont 00
2008-05-13 14:02:11.249693 < ACL data: handle 12 flags 0x02 dlen 31
    L2CAP(d): cid 0x0041 len 27 [psm 1]
        SDP SA Rsp: tid 0x5 len 0x16
          count 19
          aid 0x0001 (SrvClassIDList)
             < uuid-16 0x111e (Handsfree) uuid-16 0x1203 (Audio) >
          aid 0x0311 (SuppFeatures)
             uint 0x0
          cont 00
2008-05-13 14:02:11.256625 > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
2008-05-13 14:02:11.256640 < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
2008-05-13 14:02:11.263622 > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0041
2008-05-13 14:02:11.263637 < ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
2008-05-13 14:02:11.267616 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 4
2008-05-13 14:02:11.270625 > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 65535 
2008-05-13 14:02:11.270640 < ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 65535 
2008-05-13 14:02:11.270644 < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
2008-05-13 14:02:11.279623 > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
2008-05-13 14:02:11.280620 > ACL data: handle 12 flags 0x02 dlen 31
    L2CAP(d): cid 0x0041 len 27 [psm 1]
        SDP SS Req: tid 0x6 len 0x16
          pat uuid-128 00005555-0000-1000-8000-0002ee000001
          max 255
          cont 00
2008-05-13 14:02:11.280681 < ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(d): cid 0x0041 len 10 [psm 1]
        SDP SS Rsp: tid 0x6 len 0x5
          count 0
          cont 00
2008-05-13 14:02:11.288623 > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
2008-05-13 14:02:11.288638 < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
2008-05-13 14:02:11.292620 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 4
2008-05-13 14:02:12.259416 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 12 voice setting 0x0060
2008-05-13 14:02:12.261492 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2008-05-13 14:02:12.338480 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x00 handle 6 bdaddr 00:1F:01:B9:E9:79 type eSCO
    Air mode: CVSD
2008-05-13 14:02:12.338595 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.342484 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.342587 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.352479 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.352480 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.352482 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.352518 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.352543 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.352554 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362476 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362478 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362479 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362481 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362511 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362533 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362545 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.362556 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.372476 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.372477 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.372479 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.372512 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.372534 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.372545 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.378485 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 6 reason 0x13
    Reason: Remote User Terminated Connection
2008-05-13 14:02:12.378632 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 12 voice setting 0x0060
2008-05-13 14:02:12.382474 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.382484 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2008-05-13 14:02:12.428467 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x00 handle 6 bdaddr 00:1F:01:B9:E9:79 type eSCO
    Air mode: CVSD
2008-05-13 14:02:12.432470 > SCO data: handle 6 flags 0x00 dlen 48
    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 ff ff 00 00 ff 00  ................
    0020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2008-05-13 14:02:12.432471 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.432504 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.432527 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.442471 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.442473 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.442474 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.442507 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.442522 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.442534 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.452465 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.452466 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.452468 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.452498 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.452513 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.452525 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462464 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462465 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462466 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462467 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462496 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462511 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462522 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.462533 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.468465 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 6 reason 0x13
    Reason: Remote User Terminated Connection
2008-05-13 14:02:12.468580 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 12 voice setting 0x0060
2008-05-13 14:02:12.472464 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.472481 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2008-05-13 14:02:12.518457 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x00 handle 6 bdaddr 00:1F:01:B9:E9:79 type eSCO
    Air mode: CVSD
2008-05-13 14:02:12.522457 > SCO data: handle 6 flags 0x00 dlen 48
    0000: 00 00 00 00 00 00 00 00  00 ff ff 00 00 ff 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  ................
2008-05-13 14:02:12.522557 < SCO data: handle 6 flags 0x00 dlen 48
    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  ................
2008-05-13 14:02:12.532460 > SCO data: handle 6 flags 0x00 dlen 48
    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  ................

[-- Attachment #3: Type: text/plain, Size: 230 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- 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

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

* Re: [Bluez-users] Losing SCO connection
  2008-05-13 22:30 Michael Oh
@ 2008-05-15  9:50 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2008-05-15  9:50 UTC (permalink / raw)
  To: BlueZ users

Hi Michael,

> I wrote a little app that tries to support the hands-free (HF) profile but I am having trouble keeping the SCO connection alive.  Using an RFCOMM connection, I am able to establish the HF Service Level Connection per HF Profile specification and then create an SCO connection to a mobile phone.  But SCO seems to get disconnected by the phone after about 40-50msec of bidirectional voice data.  I can reconnect SCO but the phone disconnects it again.  Once in a while, this problem doesn't occur and SCO stays alive.  When this happens, I can tear down and bring up the HF setup repeatedly without any problem unless I power cycle the phone or the linux machine.  I would like to make it work on consistent basis.
> Please note that I am using the bluez lib only. I am not relying on the "services" utilities in the bluez-util package (I turned them all off).  Also, my SDP setup code seems to operate okay (i.e. output of "sdptool browse local" looks fine)
> Setup:
>     - Fedora 8 with
>         kernel 2.6.24.4
>         bluez-lib 3.20
>         L2CAP v2.9
>         RFCOMM v1.8
>         SCO v0.5
>     - Bluetooth dongle: Targus with Broadcom 2045    - phone: Nokia 6085
> I have tried another phone and another BT dongle and the problem is still there so I am leaning it's either my code or bluez...

did you try a CSR based dongle? It looks like the remote side is
disconnecting. Maybe it has something to do with your HFP control
channel handling. Can't really tell.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Losing SCO connection
@ 2008-05-16 23:08 Michael Oh
  2008-05-17  7:18 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Oh @ 2008-05-16 23:08 UTC (permalink / raw)
  To: BlueZ users

It seems like some phones just don't like having a SCO connection up when v=
oice call is not in progress.=A0 So instead of actively trying to connect t=
o the phone, I just let the phone connect to my SCO listener socket as need=
ed and I don't have the disconnect problem anymore.=A0 i.e. I just had to r=
everse the server/client direction in my app.
There's one remaining problem though.=A0 Occasionally, I hear garbage voice=
 on the receive side of SCO.=A0 hcidump shows maybe the 16-bit samples are =
in wrong endianness.=A0 This stays like that until the SCO is closed and re=
established.=A0 Anyone seen this problem?=A0=A0 I will try out a CSR dongle=
 also.
Thanks,
Michael

----- Original Message ----
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Sent: Thursday, May 15, 2008 2:50:32 AM
Subject: Re: [Bluez-users] Losing SCO connection

Hi Michael,

> I wrote a little app that tries to support the hands-free (HF) profile bu=
t I am having trouble keeping the SCO connection alive.=A0 Using an RFCOMM =
connection, I am able to establish the HF Service Level Connection per HF P=
rofile specification and then create an SCO connection to a mobile phone.=
=A0 But SCO seems to get disconnected by the phone after about 40-50msec of=
 bidirectional voice data.=A0 I can reconnect SCO but the phone disconnects=
 it again.=A0 Once in a while, this problem doesn't occur and SCO stays ali=
ve.=A0 When this happens, I can tear down and bring up the HF setup repeate=
dly without any problem unless I power cycle the phone or the linux machine=
.=A0 I would like to make it work on consistent basis.
> Please note that I am using the bluez lib only. I am not relying on the "=
services" utilities in the bluez-util package (I turned them all off).=A0 A=
lso, my SDP setup code seems to operate okay (i.e. output of "sdptool brows=
e local" looks fine)
> Setup:
>=A0 =A0 - Fedora 8 with
>=A0 =A0 =A0 =A0 kernel 2.6.24.4
>=A0 =A0 =A0 =A0 bluez-lib 3.20
>=A0 =A0 =A0 =A0 L2CAP v2.9
>=A0 =A0 =A0 =A0 RFCOMM v1.8
>=A0 =A0 =A0 =A0 SCO v0.5
>=A0 =A0 - Bluetooth dongle: Targus with Broadcom 2045=A0 =A0 - phone: Noki=
a 6085
> I have tried another phone and another BT dongle and the problem is still=
 there so I am leaning it's either my code or bluez...

did you try a CSR based dongle? It looks like the remote side is
disconnecting. Maybe it has something to do with your HFP control
channel handling. Can't really tell.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft =

Defy all challenges. Microsoft(R) Visual Studio 2008. =

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users



      =


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft =

Defy all challenges. Microsoft(R) Visual Studio 2008. =

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Losing SCO connection
  2008-05-16 23:08 [Bluez-users] Losing SCO connection Michael Oh
@ 2008-05-17  7:18 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2008-05-17  7:18 UTC (permalink / raw)
  To: BlueZ users

Hi Michael,

> It seems like some phones just don't like having a SCO connection up  
> when voice call is not in progress.  So instead of actively trying  
> to connect to the phone, I just let the phone connect to my SCO  
> listener socket as needed and I don't have the disconnect problem  
> anymore.  i.e. I just had to reverse the server/client direction in  
> my app.
> There's one remaining problem though.  Occasionally, I hear garbage  
> voice on the receive side of SCO.  hcidump shows maybe the 16-bit  
> samples are in wrong endianness.  This stays like that until the SCO  
> is closed and reestablished.  Anyone seen this problem?   I will try  
> out a CSR dongle also.

look through the mailing list archives. It can happen that everything  
is off by one. Either use 8 bit SCO or try to detect it.

Regards

Marcel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

end of thread, other threads:[~2008-05-17  7:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 23:08 [Bluez-users] Losing SCO connection Michael Oh
2008-05-17  7:18 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2008-05-13 22:30 Michael Oh
2008-05-15  9:50 ` Marcel Holtmann

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