SWRU580 April 2021 CC2564C , CC2564MODA , CC2564MODN
Description
The following function is responsible for issuing a Service Search Attribute Request to a Remote SDP Server. This function returns zero if successful and a negative value if an error occurred.
Parameters
The command requires two parameter. first parameter is the Inquiry Index and the second is Profile Index.
Command Call Examples
"ServiceDiscovery 1 12" Attempts to Open a Audio Gateway client port on inquiry index #1 and Profile Index Number #12 (Hands-free).
"ServiceDiscovery 3 12" Attempts to Open a Audio Gateway client port on inquiry index #3 and Profile Index Number #12 (Hands-free).
Possible Return Values
(-1) BTPS_ERROR_INVALID_PARAMETER (-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-40) BTPS_ERROR_MEMORY_ALLOCATION_ERROR (-54) BTPS_ERROR_EXPECTED_UUID_ENTRY (-64) BTPS_ERROR_INTERNAL_ERROR (-103) BTPS_ERROR_FEATURE_NOT_AVAILABLE
API Call
SDP_Service_Search_Attribute_Request(BluetoothStackID, InquiryResultList[(TempParam->Params[0].intParam - 1)], 1, &SDPUUIDEntry, 1, &AttributeID, SDP_Event_Callback, (unsigned long)0)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI SDP_Service_Search_Attribute_Request(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, unsigned int NumberServiceUUID, SDP_UUID_Entry_t SDP_UUID_Entry[], unsigned int NumberAttributeListElements, SDP_Attribute_ID_List_Entry_t AttributeIDList[], SDP_Response_Callback_t SDP_Response_Callback, unsigned long CallbackParameter)
Description of API
The following function is responsible for issuing an SDP Service Search Attribute Request to the specified BD_ADDR. This function will return the result of the Service Search Attribute Request in the SDP Response Callback that is specified in the calling of this function. This function accepts as input, the Bluetooth Stack ID of the Bluetooth Protocol Stack that the SDP Client resides on, the Bluetooth Board Address to remotely connect to (the Remote SDP Server will reside on this BD_ADDR), the Number of Service UUID's that are to be searched for, the Servcee UUID's to actually search for, the Number of Entries in the Attribute List that are to be queried, the Attribute List to actually use in the Query, the SDP Response Callback Function, and the SDP Response Callback Function Callback Parameter. This function will return a positive, non-zero, return code if successful, or a negative return error code if there was an error. If this function is successful, the user can call the SDP_Cancel_Service_Request() function to cancel a the SDP Service Search Request prematurely.It should be noted that the Number of UUID Parameter must be at least one, and the Service UUID Parameter must point to a List of at least the Number of UUID's that have been specified. Finally, the BD_ADDR Parameter and the SDP_Reponse_Callback Parameter MUST be valid or the call to this function will be unsuccessful. It should also be noted that the Number of Attributes that are in the Attribute List must be at least one, and the Attribute ID List Parameter must point to a List of Attribute ID's that contains at least the Number of Attribute List Entries that have been specified. Finally, the BD_ADDR Parameter and the SDP_Reponse_Callback Parameter MUST be valid or the call to this function will be unsuccessful.
Description
The following function is responsible for opening an Audio Gateway client port. This function returns zero on successful execution and a negative value on all errors.
Parameters
The command requires two parameter. first parameter is the Inquiry Index and the second is the remote device Port Number
Command Call Examples
"OpenAudioGatewayClient 1 1" Attempts to Open a Audio Gateway client port on inquiry index #1 and remote Port Number #1.
"OpenAudioGatewayClient 2 3" Attempts to Open a Audio Gateway client port on inquiry index #2 and remote Port Number #3.
Possible Return Values
(0) AG Client opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Open_Remote_Hands-free_Port(BluetoothStackID, InquiryResultList[(TempParam->Params[0].intParam-1)], TempParam->Params[1].intParam, DEFAULT_AG_SUPPORTED_FEATURES, DEFAULT_CALL_HOLDING_SUPPORT, 0, NULL, HFRE_Event_Callback, (unsigned long)0)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Open_Remote_Hands-free_Port(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, unsigned int RemoteServerPort, unsigned long SupportedFeaturesMask, unsigned long CallHoldSupportMask, unsigned int NumberAdditionalIndicators, HFRE_Control_Indicator_Entry_t AdditionalSupportedIndicators[], HFRE_Event_Callback_t EventCallback, unsigned long CallbackParameter)
Description of API
The following function is responsible for Opening a Remote Hands-Free Port on the specified Remote Device. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to open the HFRE Connection as the first parameter. The second parameter specifies the Board Address (NON NULL) of the Remote Bluetooth Device to connect with. The third parameter specifies the features the local Audio Gateway supports. The next parameter is a bit mask which specifies the Call Hold and Multiparty Handling Features that are supported. The fifth parameter to this function is the number of indicator names which appear in the list represented by the previous parameter. The next parameter is a list of additional indicators in which this Audio Gateway will support. If the Additional Indicators parameter is NULL and Number Additional Indicators is zero no additional parameters will be supported. The final two parameters specify the HFRE Event Callback function, and callback parameter, respectively, of the HFRE Event Callback that is to process any further interaction with the specified Remote Port (Opening Status, Close Status,etc). This function returns a non-zero, positive, value if successful, or a negative return error code if this function is unsuccessful. If this function is successful, the return value will represent the HFRE Port ID that can be passed to all other functions that require it. Once a Remote Hands-Free unit is opened, it can only be closed via a call to the HFRE_Close_Port() function (passing the return value from this function).
Description
The following function is responsible for setting up or releasing an audio connection. This function returns zero on successful execution and a negative value on all errors.
Parameters
The Manage Audio command requires only one parameter to which is is an integer value that represents the ManageAudio mode. This value must be specified as 0 (for Release) or 1 (for Setup)
Command Call Examples
"ManageAudio 0" Attempts to Release the Audio Connection.
"ManageAudio 1" Attempts to Setup the Audio Connection.
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Setup_Audio_Connection(BluetoothStackID, CurrentClientPortID)
or HFRE_Release_Audio_Connection(BluetoothStackID, CurrentClientPortID)
API Prototype
int BTPSAPI HFRE_Setup_Audio_Connection(unsigned int BluetoothStackID, unsigned int HFREPortID)
or int BTPSAPI HFRE_Release_Audio_Connection(unsigned int BluetoothStackID, unsigned int HFREPortID)
Description of API
This function is responsible for Setting Up an Audio Connection between the Local and Remote Device. This function may be used by either an Audio Gateway or a Hands-Free unit for which a valid Service Level Connection Exists. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. This function returns zero if successful or a negative return error code if there was an error.
(or) This function is responsible for Releasing an Audio Connection which was previously established by the Remote Device or by a call to the HFRE_Setup_Audio_Connection() function. This function may be used by either an Audio Gateway or a Hands-Free unit. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for updating the current state of the Control Indicators on the Remote Hands-Free unit. This function returns zero on successful execution and a negative value on all errors. indicators name : Call Status, Call Setup, Service availability, Signal indicator, Roam indicator, battchg indicator and Call Held
Parameters
The command requires two parameter. first parameter is the indicators name and the second is the value you want to set.
Command Call Examples
"UpdateControlIndicators Call Setup 1"
"UpdateControlIndicators Call Held 3"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Update_Current_Control_Indicator_Status(BluetoothStackID, PortToUse, 1, &HFREIndicatorUpdate)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Update_Current_Control_Indicator_Status(unsigned int BluetoothStackID, unsigned int HFREPortID, unsigned int NumberUpdateIndicators, HFRE_Indicator_Update_t UpdateIndicators[])
Description of API
The following function is responsible for Updating the Current Control Indicator Status. This function may only be performed by Audio Gateways that have a valid Service Level Connection or by Audio Gateways that have received the etHFRE_Control_Indicator_Request_Indication event. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The third parameter to this function is the number of name/value pairs that are present in the list. The final parameter to this function is a list of name/value pairs for the indicators to be updated. This function returns zero if successful or a negative return error code if there was an error.
CallWaitingDescription
The following function is responsible for sending a Call Waiting Notification to the Remote Hands-Free unit. This function returns zero on successful execution and a negative value on all errors. If the remote device callwaiting feature is supported in the HF device than this will work.
Parameters
The Call Waiting command takes only one parameter, which is the phone number to be sent as part of this response.
Command Call Examples
"CallWaiting +9198787899889"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Send_Call_Waiting_Notification(BluetoothStackID, CurrentClientPortID, TempParam->Params->strParam)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Send_Call_Waiting_Notification(unsigned int BluetoothStackID, unsigned int HFREPortID, char *PhoneNumber)
Description of API
This function is responsible for Sending Call Waiting Notifications to the Remote Device. This function may only be performed by Audio Gateways which have Call Waiting Notification Enabled and have a valid Service Level Connection. This function accepts as its first input parameter the HFRE Port ID. The final parameter is the Phone Number required as one of the parameters within this response. This parameter should be a pointer to a NULL terminated string (if specified) and must have a length less than HFRE_PHONE_NUMBER_LENGTH_MAXIMUM. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for deactivating Voice Recognition Activation on the Audio Gateway and for change the Voice Recognition Activation state on the Hands-free Unit. This function returns zero on successful execution and a negative value on all errors.
Parameters
The Voice Recognition command takes only one parameter, This value must be specified as 0 (for Deactivate) or 1 (to Activate).
Command Call Examples
"SetVoiceRecognitionActivation 0"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Set_Remote_Voice_Recognition_Activation(BluetoothStackID, CurrentClientPortID, (Boolean_t)TempParam->Params->intParam)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Set_Remote_Voice_Recognition_Activation(unsigned int BluetoothStackID, unsigned int HFREPortID, Boolean_t VoiceRecognitionActive)
Description of API
This function is responsible for activation and deactivation of the Voice Recognition which resides on the Remote Audio Gateway when called by a Hands-Free unit. When called by an Audio Gateway this function is responsible for informing the remote Hands-Free unit of the current activation state of the local Voice Recognition function. This function may only be called by local devices that were opened with the Supported Feature Bit set for Voice Recognition. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter is a Boolean flag specifying if this is a call to Activate or Deactivate this function on a Remote Audio Gateway, or to specify that Voice Recoginition is locally Activated or Deactivated to a Remote Hands-Free unit. When active the Voice Recognition function on the Audio Gateway is turned on, when inactive the Voice Recognition function on the Audio Gateway is turned off. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for setting the Speaker Gain on Remote Device. This function returns zero on successful execution and a negative value on all errors. If the remote audio volume control feature is supported in the HF device than this will work.
Parameters
The command requires only one parameter. It would be a integer value for the Speaker Gain.
Command Call Examples
"SetSpeakerGain 5"
"SetSpeakerGain 6"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Set_Remote_Speaker_Gain(BluetoothStackID, CurrentClientPortID, TempParam->Params->intParam)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Set_Remote_Speaker_Gain(unsigned int BluetoothStackID, unsigned int HFREPortID, unsigned int SpeakerGain)
Description of API
This function is responsible for allowing synchronization and setting of the Remote Devices Speaker Gain. This function may only be performed if a valid Service Level Connection exists. When called by a Hands-Free unit this function is provided as a means to inform the Remote Audio Gateway of the current Speaker Gain value. When called by an Audio Gateway this function provides a means for the Audio Gateway to control the Speaker Gain of the Remote Hands-Free unit. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter is the Speaker Gain to be sent to the Remote Device. The Speaker Gain Parameter MUST be between the values of HFRE_SPEAKER_GAIN_MINIMUM and HFRE_SPEAKER_GAIN_MAXIMUM. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for setting the Microphone Gain on Remote Device. This function returns zero on successful execution and a negative value on all errors. If the remote audio volume control feature is supported in the HF device than this will work.
Parameters
The command requires only one parameter. It would be a integer value for the MicroPhone Gain.
Command Call Examples
"SetMicroPhoneGain 5"
"SetMicroPhoneGain 6"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Set_Remote_Microphone_Gain(BluetoothStackID, CurrentClientPortID, TempParam->Params->intParam)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Set_Remote_Microphone_Gain(unsigned int BluetoothStackID, unsigned int HFREPortID, unsigned int MicrophoneGain)
Description of API
This function is responsible for allowing synchronization and setting of the Remote Devices Microphone Gain. This function may only be performed if a valid Service Level Connection exists. When called by a Hands-Free unit this function is provided as a means to inform the Remote Audio Gateway of the current Microphone Gain value. When called by an Audio Gateway this function provides a means for the Audio Gateway to control the Microphone Gain of the Remote Hands-Free unit. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter is the Microphone Gain to be sent to the Remote Device. The Microphone Gain Parameter MUST be between the values of HFRE_MICROPHONE_GAIN_MINIMUM and HFRE_MICROPHONE_GAIN_MAXIMUM. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for disabling Sound Enhancement on the Remote Device. This function returns zero on successful execution and a negative value on all errors. This function may be performed only when a valid Service Level Connection exist but no Audio Connection exists.
Parameters
t is not necessary to include parameters when using this command, A parameter will have no effect on the outcome of DisableRemoteSoundEnhancement.
Command Call Examples
"DisableRemoteSoundEnhancement"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Disable_Remote_Echo_Cancelation_Noise_Reduction(BluetoothStackID, CurrentClientPortID)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Disable_Remote_Echo_Cancelation_Noise_Reduction(unsigned int BluetoothStackID, unsigned int HFREPortID)
Description of API
This function is responsible for Disabling Echo Cancelation and Noise Reduction on the Remote Device. This function may be performed by both the Hands-Free unit and the Audio Gateway for which a valid Service Level Connection exist but no Audio Connection exists. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for sending a Call Line Identification Notification to the Remote Hands-Free unit. This function returns zero on successful execution and a negative value on all errors.
Parameters
The command requires only one parameter. It would be a CALLER id (phone number).
Command Call Examples
"SendCallerIdNotification +9198787899889"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Send_Call_Line_Identification_Notification(BluetoothStackID, CurrentClientPortID, TempParam->Params->strParam)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Send_Call_Line_Identification_Notification(unsigned int BluetoothStackID, unsigned int HFREPortID, char *PhoneNumber)
Description of API
This function is responsible for sending Call Line Identification Notifications to the Remote device. This function may only be performed by Audio Gateways which have Call Line Identification Notification Enabled and have a valid Service Level Connection. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter is the Phone Number required as one of the parameters within this response. This parameter should be a pointer to a NULL terminated string and its length MUST be between the values of HFRE_PHONE_NUMBER_LENGTH_MINIMUM and HFRE_PHONE_NUMBER_LENGTH_MAXIMUM. This function return zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for sending an enable or disable In-Band Ring Indication to the Remote Hands-Free unit. This function returns zero on successful execution and a negative value on all errors.
Parameters
The command requires only one parameter. This value must be specified as 0 (for disable) or 1 (for enabling).
Command Call Examples
"SetRingIndication 1" for enabling In-Band Ring Indication
"SetRingIndication 0" for disable In-Band Ring Indication
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Enable_Remote_InBand_Ring_Tone_Setting(BluetoothStackID, CurrentClientPortID, TempParam->Params[0].intParam? TRUE : FALSE)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Enable_Remote_InBand_Ring_Tone_Setting(unsigned int BluetoothStackID, unsigned int HFREPortID, Boolean_t EnableInBandRing)
Description of API
This function is responsible for Enabling or Disabling In-Band Ring Tone Capabilities for the Local Device. This function may only be performed by Audio Gateways for which a valid Service Level Connection exists. This function may only be used to enable In-Ring Tone Capabilities if the Local Audio Gateway supports this feature. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter is a Boolean flag specifying if this is a call to Enable or Disable this functionality. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for sending a Ring Indication to the Remote Hands-Free unit. This function returns zero on successful execution and a negative value on all errors.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of RingIndication.
Command Call Examples
"RingIndication" send ring indication.
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Ring_Indication(BluetoothStackID, CurrentClientPortID)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Ring_Indication(unsigned int BluetoothStackID, unsigned int HFREPortID)
Description of API
This function is responsible for sending a Ring Indication to the Remote Hands-Free unit. This function may only be performed by Audio Gateways for which a valid Service Level Connection exists. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. This function returns zero if successful or a negative return error code if there was an error.
DescriptionThe following function is responsible for sending the Response and Hold Command (+BTRH) to the remote device. This function returns zero on successful execution and a negative value on all errors.
Parameters
This command requires only one parameter to which is is an integer value that represents the incoming call state. This value must be specified as 0 (incoming call is put on hold), 1 (held call is accept) and 2(held call is reject).
Command Call Examples
"SendIncomingCallState 1" if there is a incoming call.
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Send_Incoming_Call_State(BluetoothStackID, CurrentClientPortID, (HFRE_Call_State_t) CallState)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Send_Incoming_Call_State(unsigned int BluetoothStackID, unsigned int HFREPortID, HFRE_Call_State_t CallState)
Description of API
The following function is responsible for sending information about the incoming call state. This function may only be performed by Audio Gateways that have a valid Service Level Connection. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The final parameter to this function indicates the call state to set as part of this message. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for closing any open HFP ports. This function returns zero on successful execution and a negative value on all errors.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of Close.
Possible Return Values
(0) Client closed successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Close_Port(BluetoothStackID, CurrentClientPortID)
API Prototype
int BTPSAPI HFRE_Close_Port(unsigned int BluetoothStackID, unsigned int HFREPortID)
Description of API
The following function exists to close a HFRE Port that was previously opened by any of the following mechanisms:
- Successful call to HFRE_Open_Remote_Hands-free_Port() function.
- Successful call to HFRE_Open_Remote_Audio_Gateway_Port() function.
- Incoming open request (Hands-Free or Audio Gateway) which the server was opened with either the HFRE_Open_Hands-free_Server_Port() or the HFRE_Open_Audio_Gateway_Server_Port() functions.
This function accepts as input the Bluetooth Stack ID of the Bluetooth Stack which the Open HFRE Port resides and the HFRE Port ID (return value from one of the above mentioned Open functions) of the Port to Close. This function returns zero if successful, or a negative return value if there was an error. This function does NOT Un-Register a HFRE Server Port from the system, it ONLY disconnects any connection that is currently active on the Server Port. The HFRE_Close_Server_Port()function can be used to Un-Register the HFRE Server Port.
Description
The following function is responsible for sending the command to send an Operator Selection Response to the Remote Hands-free Device. When received a request to query the remote network operator selection from the the remote Hands-free device. This function returns zero on successful execution and a negative value on all errors.
Parameters
The Send Operator info command requires only one parameter which is the current Network Operator.
Command Call Examples
"SendOperatorInfo airtel"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Send_Network_Operator_Selection(BluetoothStackID, CurrentClientPortID, 1, TempParam->Params[0].strParam)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Send_Network_Operator_Selection(unsigned int BluetoothStackID, unsigned int HFREPortID, unsigned int NetworkMode, char *NetworkOperator)
Description of API
The following function is responsible for sending the network operator. This function may only be performed by Audio Gateways that have received a request to query the remote network operator selection. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The third parameter to this function is the current Network Mode. The final parameter The final parameter is the current Network Operator. This parameter should be a pointer to a NULL terminated string (if specified) and must have a length less than HFRE_NETWORK_OPERATOR_LENGTH_MAXIMUM. This function returns zero if successful or a negative return error code if there was an error.
Description
The following function is responsible for sending the command to send a subscriber number to the Remote Hands-free Device. when received a request to query the subscriber number information from the remote Hands-free device. This function returns zero on successful execution and a negative value on all errors.
Parameters
The Send Subscriber Number command requires only one parameter which is the phone number to be sent as part of this response.
Command Call Examples
"SendSubNumber +9198787899889"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Send_Subscriber_Number_Information(BluetoothStackID, CurrentClientPortID, TempParam->Params[0].strParam, 4, HFRE_DEFAULT_NUMBER_FORMAT, TRUE)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Send_Subscriber_Number_Information(unsigned int BluetoothStackID, unsigned int HFREPortID, char *PhoneNumber, unsigned int ServiceType, unsigned int NumberFormat, Boolean_t FinalEntry)
Description of API
The following function is responsible for sending Subscriber Number Information. This function may only be performed by Audio Gateways that have received a request to query the subscriber number information. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The third parameter to this function is the phone number to be sent as part of this response. The Phone Number Parameter String Length MUST be between the values of HFRE_PHONE_NUMBER_LENGTH_MINIMUM and HFRE_PHONE_NUMBER_LENGTH_MAXIMUM. The fourth parameter to this function is the Service type related to the specified Phone Number. The fifth paramter to this function is the Number Format to use for this number, The final parameter to this function is a boolean indicating if this is the last subscriber number information entry to be sent therefore requiring that an OK be sent as well. This function returns zero if successful or a negative return error code if there was an error
Description
The following function is responsible for sending the command(s) to send the Call Entry to a remote Hands-free Device. When received a request to query the remote current calls list from the remote Hands-free device. This function returns zero on successful execution and a negative value on all errors.
Parameters
The Send Call list command takes six parameter, they are Index, call direction, call status, call Mode, Multiparty, Phone Number (in the same order).
Command Call Examples
"SendCallList 0 1 1 0 0 5551212"
Possible Return Values
(0) Command sent successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-1000) BTHFRE_ERROR_INVALID_PARAMETER
(-1001) BTHFRE_ERROR_NOT_INITIALIZED
(-1002) BTHFRE_ERROR_INVALID_BLUETOOTH_STACK_ID
(-1003) BTHFRE_ERROR_LIBRARY_INITIALIZATION_ERROR
(-1004) BTHFRE_ERROR_INSUFFICIENT_RESOURCES
(-1005) BTHFRE_ERROR_INVALID_OPERATION
(-1006) BTHFRE_ERROR_INVALID_CODEC_ID
API Call
HFRE_Send_Current_Calls_List(BluetoothStackID, CurrentClientPortID, &CurrentCallListEntry, Final)
API Prototype
BTPSAPI_DECLARATION int BTPSAPI HFRE_Send_Current_Calls_List(unsigned int BluetoothStackID, unsigned int HFREPortID, HFRE_Current_Call_List_Entry_t *CurrentCallListEntry, Boolean_t FinalEntry)
Description of API
The following function is responsible for Sending Current Calls List Entries to the Remote Device. This function may only be performed by Audio Gateways that have received a request to query the remote current calls list. This function accepts as its input parameters the Bluetooth Stack ID for which the HFRE Port ID is valid as well as the HFRE Port ID. The third parameter to this function is the current call list entry to be sent. The final parameter to this function is a boolean indicating if this is the last call list entry to be sent therefore requiring that an OK be sent as well. This function returns zero if successful or a negative return error code if there was an error.