SWRU580 April 2021 CC2564C , CC2564MODA , CC2564MODN
Description
The following command is responsible for checking changing the current baud rate used to talk to the Radio.
Parameters
This command requires one parameter which is the Baud Rate that needs to be set.
Possible Return Values
(0) Success
(-1) BTPS_ERROR_INVALID_PARAMETER
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
API Call
VS_Update_UART_Baud_Rate(BluetoothStackID, (DWord_t)TempParam->Params[0].intParam);
API Prototype
int BTPSAPI VS_Update_UART_Baud_Rate(unsigned int BluetoothStackID, DWord_t BaudRate)
Description of API
The following function prototype represents the vendor specific function which is used to change the Bluetooth UART for the Local Bluetooth Device specified by the Bluetooth Protocol Stack that is specified by the Bluetooth Protocol Stack ID. The second parameter specifies the new baud rate to set. This change encompasses both changing the speed of the Bluetooth chip (by issuing the correct commands) and then, if successful, informing the HCI Driver of the change (so the driver can communicate with the Bluetooth device at the new baud rate). This function returns zero if successful or a negative return error code if there was an error.
Description
The following command is for opening a connection to a remote A2DP endpoint (Sink).
Parameters
This command requires one parameter which is the Inquiry Index of the Remote Bluetooth Device. This value can be found after an Inquiry or displayed when the command DisplayInquiryList is used. If the desired remote device does not appear in the list, it cannot be paired with.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-1) BTPS_ERROR_INVALID_PARAMETER
(-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_Open_Remote_Stream(BluetoothStackID, InquiryResultList[(TempParam->Params[0].intParam - 1)], astSRC)
API Prototype
int BTPSAPI AUD_Open_Remote_Stream(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, AUD_Stream_Type_t StreamType)
Description of API
The following function is responsible for opening a remote streaming endpoint on the specified remote device. This function accepts as input the Bluetooth stack ID of the Bluetooth protocol stack that the requested Audio Manager is present, followed by the remote Bluetooth device AND the local Stream type. This function returns zero if successful or a negative return error code if there was an error.
Description
The following command 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_Close_Stream(BluetoothStackID, RemoteSinkBD_ADDR, astSRC);
API Prototype
int BTPSAPI AUD_Close_Stream(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, AUD_Stream_Type_t StreamType)
Description of API
The following function is responsible for Closing a currently open stream endpoint on the local device. This function accepts as input the Bluetooth stack ID of the Bluetooth protocol stack that the requested Audio Manager is present, followed by the remote device address of the connected stream, followed by the stream endpoint type to close (local Stream Endpoint). This function returns zero if successful or a negative return error code if there was an error.
Description
This command is responsible for handling a 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
AUD_Change_Stream_State(BluetoothStackID, RemoteSinkBD_ADDR, astSRC, astStreamStarted);
API Prototype
int BTPSAPI AUD_Change_Stream_State(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, AUD_Stream_Type_t StreamType, AUD_Stream_State_t StreamState)
Description of API
The following function is responsible for Changing the Stream State of a currently opened stream endpoint on the local device. This function accepts as input the Bluetooth stack ID of the Bluetooth protocol stack that the requested Audio Manager is present, followed by the remote device address of the connected stream, followed by the stream endpoint type to change the state of (local Stream Endpoint), followed by the new Stream Endpoint state. This function returns zero if successful or a negative return error code if there was an error.
Description
This command is responsible for handling a local 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
AUD_Change_Stream_State(BluetoothStackID, RemoteSinkBD_ADDR, astSRC, astStreamStarted);
API Prototype
int BTPSAPI AUD_Change_Stream_State(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, AUD_Stream_Type_t StreamType, AUD_Stream_State_t StreamState)
Description of API
The following function is responsible for Changing the Stream State of a currently opened stream endpoint on the local device. This function accepts as input the Bluetooth stack ID of the Bluetooth protocol stack that the requested Audio Manager is present, followed by the remote device address of the connected stream, followed by the stream endpoint type to change the state of (local Stream Endpoint), followed by the new Stream Endpoint state. This function returns zero if successful or a negative return error code if there was an error.