SWRU580 April   2021 CC2564C , CC2564MODA , CC2564MODN

 

  1.   Trademarks
  2. Introduction
  3. A2DP (AUD) Demo Guide
    1. 2.1 Demo Overview
    2. 2.2 Demo Application
    3. 2.3 Application Commands
  4. A3DP Sink Demo Guide
    1. 3.1 Demo Overview
    2. 3.2 Demo Application
    3. 3.3 Sink Reference Board Demo Application
    4. 3.4 Multiple Source Demo
    5. 3.5 Application Commands
  5. A3DP Source Demo Guide
    1. 4.1 Demo Overview
    2. 4.2 Demo Application
    3. 4.3 Application Commands
  6. HFP Demo Guide
    1. 5.1 Demo Overview
    2. 5.2 Demo Application
    3. 5.3 Application Commands
  7. HFP Audio Gateway Demo Guide
    1. 6.1 Demo Overview
    2. 6.2 Demo Application
    3. 6.3 Application Commands
  8. HID Demo Guide
    1. 7.1 Demo Overview
    2. 7.2 Demo Application
    3. 7.3 Application Commands
  9. HSP Demo Guide
    1. 8.1 Demo Overview
    2. 8.2 Demo Application
    3. 8.3 Application Command
  10. Map Demo Guide
    1. 9.1 Demo Overview
    2. 9.2 Demo Application
    3. 9.3 Application Command
  11. 10PBAP Demo Guide
    1. 10.1 Demo Overview
    2. 10.2 Demo Application
    3. 10.3 Application Commands
  12. 11SPP Demo Guide
    1. 11.1 Demo Overview
    2. 11.2 Demo Application
    3. 11.3 Application Commands
  13. 12SPPLE Demo Guide
    1. 12.1 Demo Overview
    2. 12.2 Demo Application
    3. 12.3 Demonstrating SPP LE on an iOS Device with the LightBlue App
    4. 12.4 Demonstrating SPP LE on an iOS Device with the SPPLE Transfer App - LEGACY
    5. 12.5 SPP Demo
    6. 12.6 Application Commands
  14. 13SPPDMMulti Demo Guide
    1. 13.1 Demo Overview
    2. 13.2 Demo Application
    3. 13.3 Application Commands
  15. 14ANP Demo Guide
    1. 14.1 Demo Overview
    2. 14.2 Demo Application
    3. 14.3 Application Commands
  16. 15HFP Demo Guide
    1. 15.1 Demo Overview
    2. 15.2 Demo Application
    3. 15.3 Application Commands
  17. 16HTP Demo Guide
    1. 16.1 Demo Overview
    2. 16.2 Demo Application
    3. 16.3 Application Commands
  18. 17PASP Demo Guide
    1. 17.1 Demo Overview
    2. 17.2 Demo Application
    3. 17.3 Application Commands
  19. 18HOGP Demo Guide
    1. 18.1 Demo Overview
    2. 18.2 Demo Application
    3. 18.3 Application Commands
  20. 19PXP Demo Guide
    1. 19.1 Demo Overview
    2. 19.2 Demo Application
    3. 19.3 Applications Commands
  21. 20FMP Demo Guide
    1. 20.1 Demo Overview
    2. 20.2 Demo Application
    3. 20.3 Application Commands
  22. 21CSCP Demo Guide
    1. 21.1 Demo Overview
    2. 21.2 Demo Application
    3. 21.3 Application Commands
  23. 22Revision History

Demo Application

This section provides a description of how to use the demo application to connect two configured board and communicate over Bluetooth. The Bluetooth HFP is a simple Client-Server connection process with one side operating in the Audio-Gateway role and the other operating in the Hands-free role. We will setup one of the boards as a Audio-Gateway client (HFPAG Demo acts as Audio gateway) and use an another board as Hands-free server (using HFP Demo). we Will see how to initiate connection and send indications between the two devices over Bluetooth.

Now use the second board and follow the steps as per either HFP Demo when using Tiva or MSP430 as the server or HFPDemo_HF for MSP432 or STM32F4 as the server. Perform the steps prior to running the Audio-Gateway Bluetooth code on the first board. The second device that is connected to the computer will be the Hands-free Server.

Server setup using HFP demo application
  1. Perform the steps mentioned earlier in Running the Bluetooth Code section to initialize the application.
  2. Give a name for the platform by issuing the SetLocalName. In our example we give it a name of hfpserver.
  3. Open a HFPServer by issuing the command, OpenHFServer. Here we use OpenHFServer to open port 1, the default first port.
    GUID-20210311-CA0I-2NGX-RMLZ-NSNRLKXZMXKX-low.png Figure 6-1 HFP AG Demo Start Server
Client setup on the demo application
  1. Perform the steps mentioned earlier in "Running the Bluetooth Code" section to initialize the application.
    GUID-20210311-CA0I-CT70-8NLF-JLGTF78PKSLJ-low.png Figure 6-2 HFP AG Demo Start Client
  2. Issue the Inquiry command for the HFP server.
    GUID-20210311-CA0I-LC2B-3Q6P-SL0DQ0BXLF8S-low.png Figure 6-3 HFP AG Demo Inquiry
  3. Discover servers of the remote HFP server by issuing the ServiceDiscovery 1 12 , command to get the port number.
    Note: The port ID on the remote Hands free device is 0x01 (The Unsigned int), as highlighted in the image below from the Attribute ID 0x0004. This port ID is used in the following OpenAudioGatewayClient command as its second parameter.
    GUID-20210311-CA0I-MHV3-SWT6-JK13CCQK6RZR-low.png Figure 6-4 HFP AG Demo Discovery
  4. Initiate connection to the remote HFP server by isssuing the OpenAudioGatewayClient 1 1 command.
    GUID-20210311-CA0I-B3HH-XQBG-SRRHHG9X6SRV-low.png Figure 6-5 HFP AG Demo Open Audio Gateway

    You will see the output below from the HFP server.

    GUID-20210311-CA0I-K3M7-F433-PKKGSZQNBL9F-low.png Figure 6-6 HFP AG Status Indication
  5. Sending indications: Issue the RingIndication or SendCallerIdNotification +9198787899889 commands.
    GUID-20210311-CA0I-X7DT-SG3B-QNV82PZDMRVL-low.png Figure 6-7 HFP AG Demo Ring Indication

    You will see the below output from the HFP server.

    GUID-20210311-CA0I-HDPV-R6HW-CCHQLHG1VVBT-low.png Figure 6-8 HFP AG Demo Ring Indication Server
  6. Initiate audio connection/Disconnection and closing the HFP connection by issuing the: ManageAudio <STATE> and CloseAgClient commands.
    GUID-20210311-CA0I-HQ5F-WV6N-9ZMCB9RCQJ8S-low.png Figure 6-9 HFP AG Demo Manage Audio Cycle

    You will see the below output from the HFP server.

    GUID-20210311-CA0I-WZNS-CBJK-29CBXL8MD2WR-low.png Figure 6-10 HFP AG Demo Server Indications
Example: Audio gateway with a commercial headset

This demonstrates setting up the client to connect to a commercial headset.

  1. Perform the steps mentioned earlier in "Running the Bluetooth Code" section to initialize the application.

    OpenStack().

    Bluetooth Stack ID: 1

    WBS support enabled.

    Device Chipset: Unknown (greater 4.1)

    BTPS Version : 4.2.1.0

    Project Type : 6

    FW Version : 12.12

    App Name : HFPDemo_AG

    App Version : 0.3

    LOCAL BD_ADDR: 0x88C255D1D645

    GAP_Set_Connectability_Mode(cmConnectable).

    GAP_Set_Discoverability_Mode(dmGeneralDiscoverable, 0).

    GAP_Set_Pairability_Mode(pmPairableMode).

    GAP_Register_Remote_Authentication() Success.

    ******************************************************************

    * Command Options: Inquiry, DisplayInquiryList, Pair, *

    * EndPairing, PINCodeResponse, PassKeyResponse, *

    * UserConfirmationResponse, *

    * SetDiscoverabilityMode, SetConnectabilityMode,*

    * SetPairabilityMode, *

    * ChangeSimplePairingParameters, *

    * GetLocalAddress, SetLocalName, GetLocalName, *

    * SetClassOfDevice, GetClassOfDevice, *

    * GetRemoteName, ManageAudio, *

    * OpenAudioGatewayClient, CloseAgClient, *

    * ServiceDiscovery, UpdateControlIndicators, *

    * CallWaiting, SendCallerIdNotification, *

    * SetRingIndication, RingIndication, *

    * SetVoiceRecognitionActivation, *

    * SetSpeakerGain, SetMicroPhoneGain, *

    * DisableRemoteSoundEnhancement, *

    * SendOperatorInfo, SendIncomingCallState, *

    * SendSubNumber, SendCallList, *

    * Help *

    ******************************************************************

  2. Issue the Inquiry command for the HFP server.

    HFP AG>Inquiry

    Return Value is 0 GAP_Perform_Inquiry() SUCCESS.

    HFP AG>

    GAP Inquiry Entry Result: 0x244B03F712D3.

    HFP AG>

    GAP Inquiry Entry Result: 0x3402862CCAE9.

    HFP AG>

    GAP Inquiry Entry Result: 0x340286605044.

    HFP AG>

    GAP Inquiry Entry Result: 0x484520902A4E.

    HFP AG>

    GAP Inquiry Entry Result: 0x08DF1F99F8D0.

    HFP AG>

    GAP Inquiry Entry Result: 0x002500F84FAB.

    HFP AG>

    GAP_Inquiry_Result: 6 Found.

    GAP Inquiry Result: 1, 0x244B03F712D3.

    GAP Inquiry Result: 2, 0x3402862CCAE9.

    GAP Inquiry Result: 3, 0x340286605044.

    GAP Inquiry Result: 4, 0x484520902A4E.

    GAP Inquiry Result: 5, 0x08DF1F99F8D0.

    GAP Inquiry Result: 6, 0x002500F84FAB.

  3. Discover services of the remote HFP server by issuing the ServiceDiscovery 5 12 , command to get the port number.
    Note: The port ID on the remote Hands free device is 0x0A (The Unsigned int), from the Attribute ID 0x0004. This port ID is used in the following OpenAudioGatewayClient command as its second parameter after being converted to its decimal equivilant (10).

    HFP AG>ServiceDiscovery

    Usage: SERVICEDISCOVERY [Inquiry Index] [Profile Index] [16/32 bit UUID (Manual only)].

    Profile Index:

    1. Manual (MUST specify 16/32 bit UUID)
    2. L2CAP
    3. Advanced Audio
    4. A/V Remote Control
    5. Basic Imaging
    6. Basic Printing
    7. Dial-up Networking
    8. FAX
    9. File Transfer
    10. Hard Copy Cable Repl.
    11. Health Device
    12. Headset
    13. Handsfree
    14. HID
    15. LAN Access
    16. Message Access
    17. Object Push
    18. Personal Area Network
    19. Phonebook Access
    20. SIM Access
    21. Serial Port
    22. IrSYNC

    Function Error.

    HFP AG>ServiceDiscovery 5 12

    SDP_Service_Search_Attribute_Request(Handsfree) Success.

    HFP AG>

    SDP Service Search Attribute Response Received (Size = 0x0010)

    Service Record: 1:

    Attribute ID 0x0000

    Type: Unsigned Int = 0x00010000

    Attribute ID 0x0001

    Type: Data Element Sequence

    Type: UUID_16 = 0x111E

    Type: UUID_16 = 0x1203

    Attribute ID 0x0004

    Type: Data Element Sequence

    Type: Data Element Sequence

    Type: UUID_16 = 0x0100

    Type: Data Element Sequence

    Type: UUID_16 = 0x0003

    Type: Unsigned Int = 0x0A

    Attribute ID 0x0006

    Type: Data Element Sequence

    Type: Unsigned Int = 0x656E

    Type: Unsigned Int = 0x006A

    Type: Unsigned Int = 0x0100

    Attribute ID 0x0009

    Type: Data Element Sequence

    Type: Data Element Sequence

    Type: UUID_16 = 0x111E

    Type: Unsigned Int = 0x0106

    Attribute ID 0x0100

    Type: Text String = Hands-Free unit

    Attribute ID 0x0311

    Type: Unsigned Int = 0x003F

  4. Initiate connection to the remote HFP server by isssuing the OpenAudioGatewayClient 5 10 command.

    HFP AG>OpenAudioGatewayClient

    Usage: OPENAUDIOGATEWAYCLIENT [Inquiry Index] [Port Number].

    Function Error.

    HFP AG>OpenAudioGatewayClient 5 10

    Bluetooth Device Address: 0x08DF1F99F8D0

    Open Remote HandsFree Port = 000A

    HFRE_Open_Remote_HandsFree_Port: Function Successful ID = 0001.

    OpenRemoteHandsFreePort: HFRE_Update_Current_Control_Indicator_Status Function Status 0.

    You will see the output below from the HFP server

    HFP AG>

    atLinkKeyRequest: 0x08DF1F99F8D0

    GAP_Authentication_Response() Success.

    HFP AG>

    atPINCodeRequest: 0x08DF1F99F8D0

    Respond with the command: PINCodeResponse

    HFP AG>PINCodeResponse 0000

    PINCodeResponse.

    GAP_Authentication_Response(), Pin Code Response Success.

    HFP AG>

    atLinkKeyCreation: 0x08DF1F99F8D0

    Link Key: 0x4AF49AD7072771919BAC62840F1F985D

    Link Key Stored locally.

    HFP AG>

    HFRE Open Port Confirmation, ID: 0x0001, Status: 0x0000.

    HFP AG>

    HFRE Available Codec List Indiocation, ID: 0x0001 NumCodecs: 2 [ 1 2 ]

    HFP AG>

    HFRE Open Service Level Connection Indication, ID: 0x0001

    RemoteSupportedFeaturesValid: TRUE

    RemoteSupportedFeatures: 0x000000BF

    RemoteCallHoldMultipartySupport: 0x00000000

    HFRE_Enable Call Line Identification

    HFP AG>

    HFRE Disable Sound_Enhancement Indication, ID: 0x0001

    HFRE_Send_Terminating_Response (erOK) :: Res = 0

    HFP AG>HFRE Speaker Gain Indication, ID: 0x0001, Speaker Gain 0x000A.

    HFP AG>HFRE Call Line Identification Notification Activation Indication, ID: 0x0001, Enabled: TRUE.

    HFP AG>HFRE Call Waiting Notification Activation Indication, ID: 0x0001, Enabled: TRUE.

    HFP AG>

    HFRE Response Hold Status Indication, ID: 0x0001

    HFRE_Send_Incoming_Call_State (csNone) :: Res = 0

    HFP AG>

    HFRE_Current_Calls_List_Indication

    HFRE_Send_Terminating_Response (erOK) :: Res = 0

  5. Initiate audio connection by issuing the: ManageAudio <STATE> command which, by defaut chooses to uses Modified sub-band coding (MSBC).

    HFP AG>ManageAudio

    Usage: Audio [Release = 0, Setup = 1].

    Function Error.

    HFP AG>ManageAudio 1

    HFRE_Send_Select_Codec:: Codec = 2, Res = 0

    You will see the below output from the HFP server

    HFP AG>

    HFRE Codec Select Confirmation, ID: 0x0001 AcceptedCodec=2

    Setup WBS with Audio for ACL handle 0x0001

    HFRE_Setup_Audio_Connection: Function Successful.

    HFRE_Setup_Audio_Connection:: Res = 0

    HFP AG>

    HFRE Audio Connection Indication, ID: 0x0001, BDADDR=0x08DF1F99F8D0, Status: 0x0000.