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

Application Commands

Generic Access Profile Commands
Note: Reference the appendix for all Generic Access Profile Commands
A3DP Profile Commands
OpenSink

Description

The following function is responsible for initializing AUD if necessary, and initializing the A3DP subsystem.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of OpenSink.

Possible Return Values

(0) A3DP Endpoint opened successfully

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-2001) BTAUD_ERROR_NOT_INITIALIZED

(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID

(-2005) BTAUD_ERROR_ALREADY_CONNECTED

(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED

(-2010) BTAUD_ERROR_STREAM_ALREADY_CONNECTED

(-2013) BTAUD_ERROR_STREAM_IS_ACTIVE

(-2032) BTAUD_ERROR_STREAM_CONNECTED

API Call

AUD_Initialize(BluetoothStackID, NULL, &InitializationInfoSNK, AUD_Event_Callback, 0)

API Prototype

int BTPSAPI AUD_Initialize(unsigned int BluetoothStackID, AUD_Initialization_Info_t *SRCInitializationInfo, AUD_Initialization_Info_t *SNKInitializationInfo, AUD_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for Registering an Audio Manager. Note that only one Audio Manager can be Registered for each Bluetooth stack. This function accepts the Bluetooth stack ID of the Bluetooth stack which this Server is to be associated with. The second parameter to this function is the Audio Manager Configuration Specification. The final two parameters specify the Audio Manager Event Callback function and Callback parameter, respectively, of the Audio Manager Event Callback that is to process any further events associated with this Audio Manager. This function returns zero if successful, or a negative return error code if an error occurred (see BTERRORS.H).

CloseSink

Description

The following function is responsible for cleaning up AUD and the A3DP stream, if the stream is opened and/or playing. Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.

Possible Return Values

(0) A3DP Endpoint opened successfully

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-2001) BTAUD_ERROR_NOT_INITIALIZED

(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID

(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED (-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE

API Call

AUD_Un_Initialize(BluetoothStackID);

API Prototype

int BTPSAPI AUD_Un_Initialize(unsigned int BluetoothStackID)

Description of API

The following function is responsible for Unregistering an Audio Manager (which was Registered by a successful call to either the AUD_Initialize() function. This function accepts as input the Bluetooth stack ID of the Bluetooth protocol stack that the Audio Manager was registered for. This function returns zero if successful, or a negative return error code if an error occurred see BTERRORS.H).

RemotePlay

Description

This function is responsible for handling an AVRCP Play command issued by the user.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.

Possible Return Values

(0) A3DP Endpoint opened successfully

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-2001) BTAUD_ERROR_NOT_INITIALIZED

(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID

(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP

(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED

(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM (-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED

(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE

(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT

(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE

(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS

(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS

(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT

(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT

(-2021) BTAUD_ERROR_SAME_FORMAT

(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS

(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA

(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND

(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED

(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED

(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA

(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED

(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS

(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED

API Call

SendRemoteControlCommand(rcPlay);

API Prototype

int SendRemoteControlCommand(RemoteControlCommand_t Command)

Description of API

The following function is used to send the specified remote control to the currently connected remote control device.

remote Pause

Description

This function is responsible for handling an AVRCP Pause command issued by the user.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.

Possible Return Values

(0) A3DP Endpoint opened successfully

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-2001) BTAUD_ERROR_NOT_INITIALIZED

(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID

(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP

(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED

(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM

(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED

(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE

(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT

(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE

(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS

(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS

(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT

(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT

(-2021) BTAUD_ERROR_SAME_FORMAT

(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS

(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA

(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND

(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED

(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED

(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA

(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED

(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS

(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED

API Call

SendRemoteControlCommand(rcPause);

API Prototype

int SendRemoteControlCommand(RemoteControlCommand_t Command)

Description of API

The following function is used to send the specified remote control to the currently connected remote control device.

RemoteNext

Description

This function is responsible for handling an AVRCP Next command issued by the user.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.

Possible Return Values

(0) A3DP Endpoint opened successfully

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-2001) BTAUD_ERROR_NOT_INITIALIZED

(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID

(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP

(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED

(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM

(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED

(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE

(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT

(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE

(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS

(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS

(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT

(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT

(-2021) BTAUD_ERROR_SAME_FORMAT

(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS

(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA

(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND

(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED

(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED

(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA

(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED

(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS

(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED

API Call

SendRemoteControlCommand(rcNext);

API Prototype

int SendRemoteControlCommand(RemoteControlCommand_t Command)

Description of API

The following function is used to send the specified remote control to the currently connected remote control device.

RemotePrev

Description

This function is responsible for handling an AVRCP Back command issued by the user.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.

Possible Return Values

(0) A3DP Endpoint opened successfully

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-2001) BTAUD_ERROR_NOT_INITIALIZED

(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID

(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP

(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED

(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM

(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED

(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE

(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT

(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE

(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS

(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS

(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT

(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT

(-2021) BTAUD_ERROR_SAME_FORMAT

(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS

(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA

(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND

(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED

(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED

(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA

(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED

(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS

(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED

API Call

SendRemoteControlCommand(rcBack);

API Prototype

int SendRemoteControlCommand(RemoteControlCommand_t Command)

Description of API

The following function is used to send the specified remote control to the currently connected remote control device.