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.

How to make hfp don't appear classic device on the phone

Other Parts Discussed in Thread: CC2564

hi:

we just want to control phone,and don't need audio . but when we connect to phone, the phone think our device is a audio device,the picture is showed at below!

when the call is comming or dial the call,the phone appear classic device to choose  for audio!  we don't want it appears on the phone!  how to make it  ? 

  • Hi,

    Can you please clarify a few points?

    1. "we just want to control phone,and don't need audio" -> Does this mean you only want the AVRCP profile, and not the A2DP profile?
    2. "when the call is comming or dial the call,the phone appear classic device to choose for audio! we don't want it appears on the phone! how to make it ? " -> Or, do you mean that you don't want SCO audio on your headset but just the call control functionality?

    If you are referring about (2), then you can try to disconnect SCO (on the sample app, try "ManageAudio 0") OR disable SCO & eSCO support (Byte 1, Bit 3 & Byte 3, Bit 7 from processors.wiki.ti.com/.../CC256x_VS_HCI_Commands

    But please note that this also depends on the remote side implementation.

    Regards,
    Gigi Joseph.
  • "disable SCO & eSCO support (Byte 1, Bit 3 & Byte 3, Bit 7)"-> which hci command we need to use? I read HCI_VS_Write_SCO_Configuration (0xFE10) command ,but I never see that (Byte 1, Bit 3 & Byte 3, Bit 7) can disable SCO & eSCO support!
  • Hi,

    I have pasted the link to the HCI command - processors.wiki.ti.com/.../CC256x_VS_HCI_Commands

    Please let me know if you've any further questions.

    Regards,
    Gigi Joseph.
  • Hi,

    I have read the HCI command,but i don't know which command i need to use for disable SCO & eSCO support! In the link to the HCI command,i don't see any command can disable SCO & eSCO support! So, I want you tell me how to disable SCO & eSCO support more detailed!
  • Hi,

    HCI_VS_Set_Supported_Features (0xFF26)

    Description: 
    This command changes the supported features of the device. 

    Command Parameters:

    HCI_VS_Set_Supported_Features (0xFF26) Byte, Bit, Support

    Command ParameterSize (bytes)ValueParameter Description
    Byte 1 0
    1
    2
    3
    4
    5
    6
    7
    Byte 0
    Byte 1
    Byte 2
    Byte 3
    Byte 4
    Byte 5
    Byte 6
    Byte 7
    Bit 1 0 – 7
    0xXX
    Single bit
    Whole byte value
    Support 1 0
    1
    0xFF
    Not supported
    Supported
    Change whole byte

    Return Parameters:

    Returned ValueDescriptionSize (bytes)Events Generated
    0x00
    0x01 – 0xFF
    Command succeeded.
    Command failed.
    1 Command Complete


    Example:

    If you want to disable Sniff Mode,for Sniff mode Byte is 0 and Bit is 7. The bytes/bits are defined according to the "FEATURE MASK DEFINITION"(in Part C) of the Bluetooth specification.

    Send_HCI_VS_Set_Supported_Features 0xFF26, 0x00, 0x07, 0x00
    Wait_HCI_Command_Complete_VS_Set_Supported_Features_Event 5000, 0x00, 0xff26, 0x00
    


    To disable SCO, use    : Byte: 1, Bit 3
    To disable eSCO, use  : Byte 3, Bit 7 


    Regards,
    Gigi Joseph.

  • Gigi,
    As discussed with customer f2f, confirmed with you, To Disable SCO/eSCO, does it mean to have Audio Frame data out of transmit between Smart watch and phone?


    Pls let me have more description for this issue, this is the critical issue from Shenzhen in China.

    Customer developed the BT stack based on TI STM32+CC2564 via Audio player ref design, they found the smart phone has no audio output once BT connected, but their smart watch project has no Audio player and they need the smart phone could keep audio output if BT connected, the smart watch is only to control smart phone, but no Audio transmit.

    Meanwhile customer finished the HFP protocol but Audio transmit still on, they hope if they can modified it based on HFP? To remove or disable the audio transmit?


    Regards,
    Andy
  • Andy,

    Yes, if you disable SCO & eSCO support, then SCO connection will not be established between the phone & watch. They should send the command after the service pack is downloaded - inside the OpenStack()

    They can try with the below pseudo code:

    ***
    {

    /* Disable SCO Support --> Byte 1, Bit 3 */
    /* Send_HCI_VS_Set_Supported_Features 0xFF26, 0x01, 0x03, 0x00 */
    Byte_t DisableSCO[] = {0x01, 0x03, 0x00};

    /* Disable eSCO Support --> Byte 3, Bit 7 */
    /* Send_HCI_VS_Set_Supported_Features 0xFF26, 0x03, 0x07, 0x00 */
    Byte_t DisableESCO[] = {0x03, 0x07, 0x00};


    Byte_t Buffer[32];
    Byte_t Status;
    int Result;
    Byte_t ReturnLength;

    Result = HCI_Send_Raw_Command(BluetoothStackID, HCI_COMMAND_CODE_VENDOR_SPECIFIC_DEBUG_OGF, 0x0326, sizeof(DisableSCO), DisableSCO, &Status, &ReturnLength, Buffer, TRUE);

    if((Result < 0) || (Status != 0) || (ReturnLength < 1) || (Buffer[0] != HCI_ERROR_CODE_NO_ERROR)){
    /*Failure Case*/
    }
    else{
    /*Success Case*/
    }

    Result = HCI_Send_Raw_Command(BluetoothStackID, HCI_COMMAND_CODE_VENDOR_SPECIFIC_DEBUG_OGF, 0x0326, sizeof(DisableESCO), DisableESCO, &Status, &ReturnLength, Buffer, TRUE);

    if((Result < 0) || (Status != 0) || (ReturnLength < 1) || (Buffer[0] != HCI_ERROR_CODE_NO_ERROR)){
    /*Failure Case*/
    }
    else{
    /*Success Case*/
    }
    }
    ***

    Note: This does not guarantee what the smartphone displays on it's UI. This depends on the smartphone itself. But the phone should not initiate a SCO connection with this setting (meaning the audio will remain in the smartphone side).

    Regards,
    Gigi Joseph.
  • Hi,Gigi:

    We disabled SOC and ESOC,but it also have some problems!

    Note: our device don't have I2C,not use codec,because we don't have mic and speaker!

    1. When we are use WeChat to recording sound, we found can not hear any sound. (This condition happened after  call event,but some phone happened all the time).the log is below:

    etHFRE_Codec_Select_Indication, ID: 0x0001
    Codec ID: 2.
    SelectedCodecID 2
    ConnectionHandle 1 for 0xAC387042EEE3.
    Setup WBS, initializeAudio result = 0 for HFP port index 0
    HFRE_Send_Select_Codec 2
    WBS_Connected_Port_ID: 1

    HFRE16>
    HFRE Command Result, ID: 0x0001
    Type 0
    Code 0.

    HFRE16>
    etHFRE_Codec_Select_Indication, ID: 0x0001
    Codec ID: 1.
    SelectedCodecID 1
    HFRE_Send_Select_Codec 1
    WBS_Connected_Port_ID: 1

    HFRE16>
    HFRE Command Result, ID: 0x0001
    Type 0
    Code 0.

    HFRE16>
    HFRE Control Indicator Status Indication, ID: 0x0001
    Description: SIGNAL
    Value : TRUE.
    ServerPortIndex : 1.
    IsConnected : TRUE.
    IsCallWaiting : FALSE.
    IsCallOnHold : FALSE.
    IsInActiveCall : FALSE.
    IsInActiveSCO : FALSE.
    IsInActiveAudio : TRUE.
    WBS_Connected_Port_ID: 1
    NumberOfAnsweredCalls: 0

    HFRE16>
    etHFRE_Codec_Select_Indication, ID: 0x0001
    Codec ID: 2.
    SelectedCodecID 2
    HFRE_Send_Select_Codec 2
    WBS_Connected_Port_ID: 1

    HFRE16>
    HFRE Command Result, ID: 0x0001
    Type 0
    Code 0.

    HFRE16>
    etHFRE_Codec_Select_Indication, ID: 0x0001
    Codec ID: 1.
    SelectedCodecID 1
    HFRE_Send_Select_Codec 1
    WBS_Connected_Port_ID: 1

    HFRE16>
    HFRE Command Result, ID: 0x0001
    Type 0
    Code 0.

    HFRE16>
    HFRE Control Indicator Status Indication, ID: 0x0001
    Description: SIGNAL
    Value : TRUE.
    ServerPortIndex : 1.
    IsConnected : TRUE.
    IsCallWaiting : FALSE.
    IsCallOnHold : FALSE.
    IsInActiveCall : FALSE.
    IsInActiveSCO : FALSE.
    IsInActiveAudio : TRUE.
    WBS_Connected_Port_ID: 1
    NumberOfAnsweredCalls: 0

    HFRE16>

    2. All the phones also recognize our device as audio device.  All the phones auto connect our device as audio device!

    3. If we  disconnect our device as audio device on the phone,  our device can't hangup call,accept call,dial call!Picture is below: 

    4.when dial call,accept call,hangup call, the phones also appear our device in  audio options!

  • Hi,

    1. I'm not sure I understood the use case. Can you share some logs ? Air sniffer/ Snoop logs?
    2. This is expected as you are connected to the "Hands free profile".
    3. This is also expected as you are disconnecting the Hands free profile connection that you have with the phone.
    4. Basically, this depends on the phone side implementation. Most phones distinguish devices based on supported profiles. Since the remote device supports HFP, it gets displayed as an "audio device". An actual audio (SCO/eSCO) connection should not go through because that support is blocked in the "Supported Features" bit mask. I don't see any work around for this.

    Regards,
    Gigi Joseph.
  • session_hfp.rarJoseph,

    Pls find the logs attached.

    The use case is CC2564 running in the smart watch, smart phone will connect with smart watch by BT. The key issue is smart phone won't output audio voice after BT connected, for example when smartphone record voice, but play it without voice.

    Customer develop the stack based on TI STM32+CC2564 ref design, as we know the ref design has additional audio player in the board, there were audio transmit included when BT connected. And customer use HFP for the smart watch to control with smart phone.

    So we thought it should be HFP issue which transmit not only control data but the audio data, as it make the voice data from smart phone to smart watch. But customer smart watch has no Audio Amp and they do not need the audio player, they want smart phone keep the audio play when BT connected with smart watch, while it only control data transmit with smart watch, such as dial in/out reminder,  

    Therefore, we asked if we modify the HFP to make transmit only for control data between smart watch and smart phone. Say if SCO/eSCO could work for it?

    We also thought the phone will display BT audio device because the HFP has audio data transmit section, that's why we asked if we can have the smartphone not display the BT Audio device, while it make the audio data transmit disabled but only enable control data transmit..

    Appreciate your support to suggest if we can do it in HFP as customer has finish most based on HFP?

    If not, is there any other workaround for this BT control data transmit but not include Audio?

    Pls kindly let us know if any unclear, thanks for your support.

    Regards,

    Andy.

  • Andy,

    What exactly do you want to control with the HFP? Answer phone call, display call info, etc or you are talking about Play/Stop type of audio control? It is not clear from the discussions.

    Regards,

    Miguel

  • Add input,
    Customer only want smart watch for call display, answer/reject etc func to control smart phone, while smart phone will keep the voice stream, so far customer did it based on HFP, but there were voice stream integrated, question is how to avoid the voice stream only keep the control func in HFP.
    If we could not use HFP only for control, would you pls suggest which profile/protocol could support it?

    Thanks & Regards,
    Andy
  • Hi,Miguel:

    Our device is smart watch,we use sppble profile to transfer data,aud profile to control music,hfp to control call!

    we just want to accept call,reject call,hangup call,dial call through hfp profile! Our device don't have microphone and speaker,so we don't use I2S port !

    So, Our device don't surpport audio transmission!

    Gigi tell us can't enale BLE and WBS feature at the same time and disable SOC and eSOC.

    So,we disable WBS feature and SOC/eSOC. Now,when our device connect to phone,it will affect phone's audio. The phones recognize our device as audio device,It push audio to our device and receive audio from our device!

    So,when the phone connect to our device,the phone's audio don't  worked normally!

    why BLE and WBS feature can't  work at the same time?

    why pebble time watch can make BLE and WBS feature work at the same time?