This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564C: HFP AG profile to connect Hand Free kit

Part Number: CC2564C

Hi,

i'm using the TI controller CC2564C, founding some problems in connecting my device to a HandFree.

I need to configure my device in HFP as gateway.

First of all, i'm trying to make a SDP (SDP_Service_Search_Attribute_Request) on my HandFree, sometime works and sometime not; for a lot of time i'm receiving : SDP Conn Err Rx Sz=0x0010 Code: 0

What does this error means ?

After the service discovery is done (sometimes), i do the following: HFRE_Open_Remote_HandsFree_Port.

The first question is: do i need a SDP_Service_Search_Attribute_Request before HFRE_Open_Remote_HandsFree_Port, or if i already known the MAC address and the port i can use HFRE_Open_Remote_HandsFree_Port as a first ?

Because it seems that when SDP_Service_Search_Attribute_Request succeded also HFRE_Open_Remote_HandsFree_Port succeded as in the following:

B.0: HFRE Success ID=0001
-.0: atLinkKeyRequest
-.0: GAP_Auth_Resp Ok
-.0: atPINCodeReq
-.0: GAPAuthRsp Pin Success
-.1: Unhandled GAP Auth Evt: 3
-.0: HFRE Open Port Conf ID:0x0001, Status:0x0000
-.0: HFRE Open Service Level Conn Ind ID:0x0001
-.0: RemoteSupportedFeaturesValid:1
-.0: RemoteSupportedFeatures:0x0000003F
-.0: RemoteCallHoldMultipartySupport:0x00000000
-.0: HFRE_Enable Call Line Identification
-.0: Unknown HFRE Event Received: 11

When both succeded i do the following: HFRE_Setup_Audio_Connection, receiving some information, where it seems that the audio connection is established:

B.0: btAudioConn 1 ok
-.0: HFRE Audio Connection Indication, ID: 0x0001, Status: 0x0000
-.0: HFRE Speaker Gain Indication, ID: 0x0001, Speaker Gain 0x0008
-.0: HFRE Call Waiting Notification Activation Indication, ID: 0x0001, Enabledð
-.0: Unknown HFRE Event Received: 38

But after some seconds (around 5-10 sec) i receive the following:

-.0: HFRE Close Port Indication, ID: 0x0001, Status: 0x0001


Why the remote device close the port ? What does the error mean ?

Summarizing my questions are:

- on SDP_Service_Search_Attribute_Request what the error SDP Conn Err Rx Sz=0x0010 Code: 0 does means ?

- can i use HFRE_Open_Remote_HandsFree_Port without SDP_Service_Search_Attribute_Request  ?

- after HFRE_Setup_Audio_Connection what the indication HFRE Close Port Indication, ID: 0x0001, Status: 0x0001 does means ?

  • Paolo,

    SDP_Service_Search_Attribute_Request: That error can stem from any problem with establishing a connection. Could you capture sniffer logs so that we can try and figure out where exactly that error is being created?

    If you know the MAC Address and port of the remote device, you can use HFRE_Open_Remorte_HandsFree_Port without first using the SDP_Service_Search_Attribute_Request.

    Regarding the connection closing by itself, I will get back to you shortly. I'm looking into the HFP spec to see what could cause that.

  • Hi Dale,

    Cause i do not need SDP_Service_Search_Attribute_Request in order to use HFRE_Open_Remorte_HandsFree_Port, i'm focusing on the HFRE_Open_Remorte_HandsFree_Port that is seems to work better, except for the connection closing after few seconds of the establishment.

    If it could be helpfull here attached there are logs captured by the TI sniffer.

    With logs provided it is possible to understand the reason of the problem ?

    thank you for the support

    Paolo

    t32-HFP.zip

  • Paolo,

    Thank you for the firmware logs, however, please upload them with from the beginning, with initialization of the device included.

    processors.wiki.ti.com/.../CC256x_Logger_User_Guide

  • Hi Dale,

    here attached the log registration from the beginning, i hope that could help to understand why connection/port is closed by remote.

    Please consider that if i connect the HandFree by a smartphone, connection still remain active, but from my application i receive the HFRE Close Port Indication, ID: 0x0001, Status: 0x0001
    Have you loooked to the HFP spec to understand what does "Status: 0x0001" mean ?
    regards,

    Paolo

    t32-HFP2.zip

  • Paolo,

    Something I've noticed in the logs:

    Right before the disconnection occurs, there are 3 commands: HCI_VS_Write_CODEC_Config, HCI_Write_Voice_Setting, and HCI_VS_Wbs_Dissociate. This is not something that is called in the stack, is there anything in your application code that calls these after a connection is established?
  • Hi Dale,

    is the same thing i was checking in the log right now, before your answer,

    i were surprised to find the same strange HCI command, 

    There is only one point in my application were i call the VS_PCM_Codec_Config_Slave_I2S, were inside it is called the HCI command with: VS_WRITE_CODEC_CONFIG_COMMAND_OPCODE.

    I saw also from log that the VS_WRITE_CODEC_CONFIG_COMMAND_OPCODE is called in master mode, that i'm not using.

    But because the connection is terminated before, i'm not calling the function. And i have verified right now with a break point emulator, connection is closed, but not call to VS_PCM_Codec_Config_Slave_I2S are effected as expected.

    Is it possibile that there is some stack setting that perform the setting automatically or there is some event in HFRE_Event_Callback that can call some stack function that inside call the HCI: VS_WRITE_CODEC_CONFIG_COMMAND_OPCODE ?

    thanks,

    regards

    Paolo