Failed to connect Handsfree profile with Ubuntu 12.04

Asked by Vinod on 2014-09-12

Hi,

I am trying to establish handsfree connection with ubuntu 12.04 but the connection never succeed.

Can anyone help me how to establish successful Handsfree connection with Ubuntu 12.04.

I have been using Bluez-4.98 and OFono-0.41 .

I have enabled Gateway in /etc/bluetooth/audio.conf and even then It failed to connect.

I have attached hcidump logs.

Help me to solve this issue.

HCI sniffer - Bluetooth packet analyzer ver 2.2
device: hci0 snap_len: 1028 filter: 0xffffffff
2014-09-12 18:58:46.907964 < HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 78:CA:39:*:*:* ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
2014-09-12 18:58:46.910239 > HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
2014-09-12 18:58:48.208231 > HCI Event: Role Change (0x12) plen 8
    status 0x35 bdaddr 78:CA:39:*:*:* role 0x00
    Error: Role Switch Failed
2014-09-12 18:58:48.430231 > HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr 78:CA:39:*:*:* role 0x01
    Role: Slave
2014-09-12 18:58:48.633231 > HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 2 bdaddr 78:CA:39:*:*:* type ACL encrypt 0x00
2014-09-12 18:58:48.634741 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 2
2014-09-12 18:58:48.636257 > HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
2014-09-12 18:58:48.699241 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 2 slots 5
2014-09-12 18:58:48.833236 > HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 2
    Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
2014-09-12 18:58:48.833386 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 78:CA:39:*:*:* mode 2 clkoffset 0x0000
2014-09-12 18:58:48.833415 < ACL data: handle 2 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
2014-09-12 18:58:48.835244 > HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2014-09-12 18:58:48.902238 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:48.967740 > ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0280
        Fixed Channels
        Unicast Connectless Data Reception
2014-09-12 18:58:48.967878 < ACL data: handle 2 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
2014-09-12 18:58:49.038237 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.105365 > ACL data: handle 2 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000006
        L2CAP Signalling Channel
        L2CAP Connless
2014-09-12 18:58:49.105541 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
2014-09-12 18:58:49.123223 > HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 78:CA:39:*:*:* name 'Vinod...S iPhone'
2014-09-12 18:58:49.174243 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.241359 > ACL data: handle 2 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
2014-09-12 18:58:49.241476 < ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x00b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
2014-09-12 18:58:49.242728 > ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x3100 scid 0x0040 result 0 status 0
      Connection successful
2014-09-12 18:58:49.242842 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x3100 flags 0x00 clen 0
2014-09-12 18:58:49.244241 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.309982 > ACL data: handle 2 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
2014-09-12 18:58:49.310133 < ACL data: handle 2 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000002
        L2CAP Signalling Channel
2014-09-12 18:58:49.311238 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.377731 > ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 256
2014-09-12 18:58:49.377875 < ACL data: handle 2 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x3100 flags 0x00 result 0 clen 4
      MTU 256
2014-09-12 18:58:49.378858 > ACL data: handle 2 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 672
2014-09-12 18:58:49.379197 < ACL data: handle 2 flags 0x02 dlen 24
    L2CAP(d): cid 0x3100 len 20 [psm 1]
        SDP SSA Req: tid 0x0 len 0xf
          pat uuid-16 0x111f (Handsfree AG)
          max 65535
          aid(s) 0x0000 - 0xffff
          cont 00
2014-09-12 18:58:49.380236 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.448237 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.449237 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:49.517984 > ACL data: handle 2 flags 0x02 dlen 160
    L2CAP(d): cid 0x0040 len 156 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x97
          count 148
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x4f49111f
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x111f (Handsfree AG) uuid-16 0x1203 (Audio) >
              aid 0x0002 (SrvRecState)
                 uint 0x0
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x8 > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 uint 0x6672 uint 0x6a uint 0x110 uint 0x6465 uint 0x6a uint 0x120 uint 0x6a61 uint 0x6a uint 0x130 >
              aid 0x0008 (SrvAvail)
                 uint 0xff
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x111e (Handsfree) uint 0x105 > >
              aid 0x0100 (SrvName)
                 str "Handsfree Gateway"
              aid 0x0301 (SuppDataStoresList)
                 uint 0x1
              aid 0x0311 (SuppFeatures)
                 uint 0xf
          cont 00
2014-09-12 18:58:49.519001 < HCI Command: Authentication Requested (0x01|0x0011) plen 2
    handle 2
2014-09-12 18:58:49.521241 > HCI Event: Command Status (0x0f) plen 4
    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
2014-09-12 18:58:49.523239 > HCI Event: Link Key Request (0x17) plen 6
    bdaddr 78:CA:39:*:*:*
2014-09-12 18:58:49.523632 < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
    bdaddr 78:CA:39:*:*:* key ********************************
2014-09-12 18:58:49.525229 > HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Reply (0x01|0x000b) ncmd 1
    status 0x00 bdaddr 78:CA:39:*:*:*
2014-09-12 18:58:49.655236 > HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 2
2014-09-12 18:58:49.655368 < HCI Command: Set Connection Encryption (0x01|0x0013) plen 3
    handle 2 encrypt 0x01
2014-09-12 18:58:49.657242 > HCI Event: Command Status (0x0f) plen 4
    Set Connection Encryption (0x01|0x0013) status 0x00 ncmd 1
2014-09-12 18:58:50.083238 > HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 2 encrypt 0x01
2014-09-12 18:58:50.083384 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0041
2014-09-12 18:58:50.203229 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.270229 > ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x3201 scid 0x0041 result 1 status 1
      Connection pending - Authentication pending
2014-09-12 18:58:50.271354 > ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x3201 scid 0x0041 result 0 status 0
      Connection successful
2014-09-12 18:58:50.271437 < ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x3201 flags 0x00 clen 4
      MTU 1013
2014-09-12 18:58:50.339102 > ACL data: handle 2 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 2048
2014-09-12 18:58:50.339198 < ACL data: handle 2 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x3201 flags 0x00 result 0 clen 4
      MTU 2048
2014-09-12 18:58:50.340237 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.407604 > ACL data: handle 2 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 1013
2014-09-12 18:58:50.407884 < ACL data: handle 2 flags 0x02 dlen 8
    L2CAP(d): cid 0x3201 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
2014-09-12 18:58:50.409229 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.478258 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.545101 > ACL data: handle 2 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
2014-09-12 18:58:50.545252 < ACL data: handle 2 flags 0x02 dlen 18
    L2CAP(d): cid 0x3201 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 16 frame_type 0 credit_flow 15 pri 7 ack_timer 0
      frame_size 1008 max_retrans 0 credits 7
2014-09-12 18:58:50.613226 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.677613 > ACL data: handle 2 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 16 frame_type 0 credit_flow 14 pri 7 ack_timer 0
      frame_size 1007 max_retrans 0 credits 0
2014-09-12 18:58:50.678118 < ACL data: handle 2 flags 0x02 dlen 8
    L2CAP(d): cid 0x3201 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 16 pf 1 ilen 0 fcs 0x77
2014-09-12 18:58:50.747226 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.755103 > ACL data: handle 2 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 16 pf 1 ilen 0 fcs 0xbc
2014-09-12 18:58:50.755775 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(d): cid 0x3201 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 16 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
2014-09-12 18:58:50.756352 > ACL data: handle 2 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 16 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
2014-09-12 18:58:50.756685 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(d): cid 0x3201 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 16 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
2014-09-12 18:58:50.757701 < ACL data: handle 2 flags 0x02 dlen 8
    L2CAP(d): cid 0x3201 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 16 pf 1 ilen 0 fcs 0x96
2014-09-12 18:58:50.782241 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.783242 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.783850 > ACL data: handle 2 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 16 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 0 b3 0 len 0
2014-09-12 18:58:50.785101 > ACL data: handle 2 flags 0x02 dlen 9
    L2CAP(d): cid 0x0041 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 16 pf 1 ilen 0 fcs 0xe2 credits 255
2014-09-12 18:58:50.785138 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.785546 < ACL data: handle 2 flags 0x02 dlen 9
    L2CAP(d): cid 0x3201 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 16 pf 1 ilen 0 fcs 0x38 credits 33
2014-09-12 18:58:50.786232 > ACL data: handle 2 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 16 pf 1 ilen 0 fcs 0xbc
2014-09-12 18:58:50.786420 < ACL data: handle 2 flags 0x02 dlen 8
    L2CAP(d): cid 0x3201 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
2014-09-12 18:58:50.786436 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x3201 scid 0x0041
2014-09-12 18:58:50.812259 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.813242 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.814252 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:50.815119 > ACL data: handle 2 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
2014-09-12 18:58:50.816241 > ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x3201 scid 0x0041
2014-09-12 18:58:51.548606 < ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x3100 scid 0x0040
2014-09-12 18:58:51.598237 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 2 packets 1
2014-09-12 18:58:51.666488 > ACL data: handle 2 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x3100 scid 0x0040
2014-09-12 18:58:52.689247 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 2 reason 0x13
    Reason: Remote User Terminated Connection

Regards,
Vinod.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Vinod
Solved:
2014-09-13
Last query:
2014-09-13
Last reply:
2014-09-13

Have you paired the headset ok?

Have you tried it in Trusty?

Vinod (vinodrayapudi) said : #2

Hi,

Thanks for your time and reply.
This issue is solved.
It is due to uncompatible versions.

I have got this problem, If I use Bluez-4.98 and OFono-0.41 but this issue resolved when I upgrade OFono with 1.0 version.

Thanks alot for your time.

Regards,
Vinod.