Bluetooth Classic Profiles
Hands Free Profile (HFP) HandsFree

General Description

This section describes the API's required to add Hands Free Profile to the user application.

The typical use case for this profile is, a headset wirelessly connected to a mobile phone enabling the user to perform telephone functions through the headset . This library can also connect to an AG supporting HSP only, if the application using this library supports HSP in the SDP.

Data Structures

struct  wiced_bt_hfp_hf_call_data_t
 Call State event data. More...
 
struct  wiced_bt_hfp_hf_volume_data_t
 Volume Change event data. More...
 
struct  wiced_bt_hfp_hf_config_data_t
 WICED HF config. More...
 
struct  wiced_bt_hfp_hf_clip_data_t
 Clip event data. More...
 
struct  wiced_bt_hfp_hf_at_result_t
 HF AT result. More...
 
struct  wiced_bt_hfp_hf_connection_data_t
 HF connection data. More...
 
struct  wiced_bt_hfp_hf_active_call_t
 Active call event data. More...
 
struct  wiced_bt_hfp_hf_bind_data_t
 Bind event data. More...
 
struct  wiced_bt_hfp_hf_event_data_t
 HF Event Data. More...
 

Macros

#define WICED_BT_HFP_HF_CALLER_NUMBER_MAX_LENGTH   32
 Maximum length of caller number.
 
#define WICED_BT_HFP_HF_AT_CMD_RESULT_CODE_MAX_LENGTH   256
 Maximum length of AT command result code.
 
#define WICED_BT_HFP_HF_MAX_CONN   2
 Default Maximum connection supported.
 
#define WICED_BT_HFP_HF_SDP_FEATURE_ECNR   0x0001
 SDP SupportedFeatures attribute bit mapping for HF. More...
 
#define WICED_BT_HFP_HF_SDP_FEATURE_3WAY_CALLING   0x0002
 Call waiting or three-way calling (yes:1, no:0)
 
#define WICED_BT_HFP_HF_SDP_FEATURE_CLIP   0x0004
 CLI presentation capability (yes:1, no:0)
 
#define WICED_BT_HFP_HF_SDP_FEATURE_VRECG   0x0008
 Voice recognition activation (yes:1, no:0)
 
#define WICED_BT_HFP_HF_SDP_FEATURE_REMOTE_VOL_CTRL   0x0010
 Remote volume control (yes:1, no:0)
 
#define WICED_BT_HFP_HF_SDP_FEATURE_WIDEBAND_SPEECH   0x0020
 Wide band speech (yes:1, no:0)
 
#define WICED_BT_HFP_HF_IND_ID_ENHANCED_SAFETY   1
 HandsFree Indicator Id. More...
 
#define WICED_BT_HFP_HF_IND_ID_BATTERY   2
 Battery Level.
 

Typedefs

typedef char wiced_bt_hfp_hf_caller_num_t[WICED_BT_HFP_HF_CALLER_NUMBER_MAX_LENGTH]
 HF caller number.
 
typedef char wiced_bt_hfp_hf_at_result_code_t[WICED_BT_HFP_HF_AT_CMD_RESULT_CODE_MAX_LENGTH]
 HF AT result code.
 
typedef void(* wiced_bt_hfp_hf_event_cb_t) (wiced_bt_hfp_hf_event_t event, wiced_bt_hfp_hf_event_data_t *p_data)
 The HF control path callback. More...
 

Enumerations

enum  wiced_bt_hfp_hf_supported_features_t {
  WICED_BT_HFP_HF_FEATURE_ECNR = 0x00000001,
  WICED_BT_HFP_HF_FEATURE_3WAY_CALLING = 0x00000002,
  WICED_BT_HFP_HF_FEATURE_CLIP_CAPABILITY = 0x00000004,
  WICED_BT_HFP_HF_FEATURE_VOICE_RECOGNITION_ACTIVATION = 0x00000008,
  WICED_BT_HFP_HF_FEATURE_REMOTE_VOLUME_CONTROL = 0x00000010,
  WICED_BT_HFP_HF_FEATURE_ENHANCED_CALL_STATUS = 0x00000020,
  WICED_BT_HFP_HF_FEATURE_ENHANCED_CALL_CONTROL = 0x00000040,
  WICED_BT_HFP_HF_FEATURE_CODEC_NEGOTIATION = 0x00000080,
  WICED_BT_HFP_HF_FEATURE_HF_INDICATORS = 0x00000100,
  WICED_BT_HFP_HF_FEATURE_ESCO_S4_SETTINGS_SUPPORT = 0x00000200,
  WICED_BT_HFP_HF_FEATURE_ENHANCED_VOICE_RECOGNITION = 0x00000400
}
 HF device supported feature flags. More...
 
enum  wiced_bt_hfp_ag_supported_features_t {
  WICED_BT_HFP_AG_FEATURE_3WAY_CALLING = 0x00000001,
  WICED_BT_HFP_AG_FEATURE_ECNR = 0x00000002,
  WICED_BT_HFP_AG_FEATURE_VOICE_RECOGNITION_ACTIVATION = 0x00000004,
  WICED_BT_HFP_AG_FEATURE_INBAND_RING_TONE_CAPABILITY = 0x00000008,
  WICED_BT_HFP_AG_FEATURE_ATTACH_NUMBER_TO_VOICE_TAG = 0x00000010,
  WICED_BT_HFP_AG_FEATURE_ABILITY_TO_REJECT_CALL = 0x00000020,
  WICED_BT_HFP_AG_FEATURE_ENHANCED_CALL_STATUS = 0x00000040,
  WICED_BT_HFP_AG_FEATURE_ENHANCED_CALL_CONTROL = 0x00000080,
  WICED_BT_HFP_AG_FEATURE_EXTENDED_ERROR_RESULT_CODES = 0x00000100,
  WICED_BT_HFP_AG_FEATURE_CODEC_NEGOTIATION = 0x00000200,
  WICED_BT_HFP_AG_FEATURE_HF_INDICATORS = 0x00000400,
  WICED_BT_HFP_AG_FEATURE_ESCO_S4_SETTINGS_SUPPORT = 0x00000800,
  WICED_BT_HFP_AG_FEATURE_ENHANCED_VOICE_RECOGNITION = 0x00001000
}
 AG supported feature flags. More...
 
enum  wiced_bt_hfp_hf_event_t {
  WICED_BT_HFP_HF_CONNECTION_STATE_EVT,
  WICED_BT_HFP_HF_AG_FEATURE_SUPPORT_EVT,
  WICED_BT_HFP_HF_SERVICE_STATE_EVT,
  WICED_BT_HFP_HF_SERVICE_TYPE_EVT,
  WICED_BT_HFP_HF_CALL_SETUP_EVT,
  WICED_BT_HFP_HF_RING_EVT,
  WICED_BT_HFP_HF_INBAND_RING_STATE_EVT,
  WICED_BT_HFP_HF_RSSI_IND_EVT,
  WICED_BT_HFP_HF_BATTERY_STATUS_IND_EVT,
  WICED_BT_HFP_HF_VOLUME_CHANGE_EVT,
  WICED_BT_HFP_HF_CLIP_IND_EVT,
  WICED_BT_HFP_HFP_CODEC_SET_EVT,
  WICED_BT_HFP_HFP_ACTIVE_CALL_EVT,
  WICED_BT_HFP_HF_OK_EVT,
  WICED_BT_HFP_HF_ERROR_EVT,
  WICED_BT_HFP_HF_CME_ERROR_EVT,
  WICED_BT_HFP_HF_CNUM_EVT,
  WICED_BT_HFP_HF_BINP_EVT,
  WICED_BT_HFP_HF_VOICE_RECOGNITION_EVT,
  WICED_BT_HFP_HF_BIND_EVT,
  WICED_BT_HFP_HF_COPS_EVT
}
 HF Events. More...
 
enum  wiced_bt_hfp_hf_connection_state_t {
  WICED_BT_HFP_HF_STATE_DISCONNECTED,
  WICED_BT_HFP_HF_STATE_CONNECTED,
  WICED_BT_HFP_HF_STATE_SLC_CONNECTED
}
 HF Control Connection States. More...
 
enum  wiced_bt_hfp_hf_service_state_t {
  WICED_BT_HFP_HF_SERVICE_STATE_NOT_AVAILABLE,
  WICED_BT_HFP_HF_SERVICE_STATE_AVAILABLE
}
 AG's serivce states. More...
 
enum  wiced_bt_hfp_hf_service_type_t {
  WICED_BT_HFP_HF_SERVICE_TYPE_HOME,
  WICED_BT_HFP_HF_SERVICE_TYPE_ROAMING
}
 AG's serivce type. More...
 
enum  wiced_bt_hfp_hf_callsetup_state_t {
  WICED_BT_HFP_HF_CALLSETUP_STATE_IDLE,
  WICED_BT_HFP_HF_CALLSETUP_STATE_INCOMING,
  WICED_BT_HFP_HF_CALLSETUP_STATE_DIALING,
  WICED_BT_HFP_HF_CALLSETUP_STATE_ALERTING,
  WICED_BT_HFP_HF_CALLSETUP_STATE_WAITING
}
 States of a call during setup procedure. More...
 
enum  wiced_bt_hfp_hf_inband_ring_state_t {
  WICED_BT_HFP_HF_INBAND_RING_DISABLED,
  WICED_BT_HFP_HF_INBAND_RING_ENABLED
}
 In-band ring tone setting in AG. More...
 
enum  wiced_bt_hfp_hf_volume_type_t {
  WICED_BT_HFP_HF_SPEAKER,
  WICED_BT_HFP_HF_MIC
}
 Audio input/output device on the HF Device. More...
 
enum  wiced_bt_hfp_hf_call_action_t {
  WICED_BT_HFP_HF_CALL_ACTION_DIAL,
  WICED_BT_HFP_HF_CALL_ACTION_ANSWER,
  WICED_BT_HFP_HF_CALL_ACTION_HANGUP,
  WICED_BT_HFP_HF_CALL_ACTION_HOLD_0,
  WICED_BT_HFP_HF_CALL_ACTION_HOLD_1,
  WICED_BT_HFP_HF_CALL_ACTION_HOLD_2,
  WICED_BT_HFP_HF_CALL_ACTION_HOLD_3,
  WICED_BT_HFP_HF_CALL_ACTION_HOLD_4
}
 Call action command. More...
 
enum  wiced_bt_hfp_hf_codec_t {
  WICED_BT_HFP_HF_CVSD_CODEC = 1,
  WICED_BT_HFP_HF_MSBC_CODEC = 2
}
 Codec for HF profile. More...
 
enum  wiced_bt_hfp_hf_call_dir_t {
  WICED_BT_HFP_HF_OUTGOING = 0,
  WICED_BT_HFP_HF_INCOMING = 1
}
 HF Call direction. More...
 
enum  wiced_bt_profile_type_t {
  WICED_BT_HFP_PROFILE,
  WICED_BT_HSP_PROFILE
}
 Profile type. More...
 
enum  wiced_bt_hfp_hf_call_status_t {
  WICED_BT_HFP_HF_CALL_ACTIVE = 0,
  WICED_BT_HFP_HF_CALL_HELD,
  WICED_BT_HFP_HF_CALL_DIALING,
  WICED_BT_HFP_HF_CALL_ALERING,
  WICED_BT_HFP_HF_CALL_INCOMING,
  WICED_BT_HFP_HF_CALL_WAITING,
  WICED_BT_HFP_HF_CALL_HELD_BY_RSP_HOLD
}
 HF Call status. More...
 
enum  wiced_bt_hfp_hf_call_mode_t {
  WICED_BT_HFP_HF_MODE_VOICE = 0,
  WICED_BT_HFP_HF_MODE_DATA,
  WICED_BT_HFP_HF_MODE_FAX
}
 HF Call mode. More...
 

Functions

wiced_result_t wiced_bt_hfp_hf_init (wiced_bt_hfp_hf_config_data_t *p_config_data, wiced_bt_hfp_hf_event_cb_t event_cb)
 The API to initialize the HFP-HF component and register with the stack. More...
 
wiced_result_t wiced_bt_hfp_hf_deinit (void)
 The API to deregister the HFP-HF component from the stack and to clean up internal data structures. More...
 
wiced_result_t wiced_bt_hfp_hf_connect (wiced_bt_device_address_t bd_address)
 The API to initiate a HFP connection to an AG. More...
 
wiced_result_t wiced_bt_hfp_hf_disconnect (uint16_t handle)
 The API to disconnect from an AG. More...
 
wiced_result_t wiced_bt_hfp_hf_perform_call_action (uint16_t handle, wiced_bt_hfp_hf_call_action_t action, char *number)
 The API to manipulate a call (i.e., to answer, hold, hangup, reject, etc). More...
 
wiced_result_t wiced_bt_hfp_hf_notify_volume (uint16_t handle, wiced_bt_hfp_hf_volume_type_t volume_type, uint8_t volume_level)
 The API to send the current speaker/mic volume level to AG. More...
 
wiced_result_t wiced_bt_hfp_hf_send_at_cmd (uint16_t handle, char *at_cmd)
 The API to send the at command to the AG Called by the application to send an command to AG. More...
 
wiced_result_t wiced_bt_hfp_hf_lrac_switch_get (void *p_opaque, uint16_t *p_sync_data_len)
 The API to get LRAC Switch data. More...
 
wiced_result_t wiced_bt_hfp_hf_lrac_switch_set (void *p_opaque, uint16_t sync_data_len)
 The API to set LRAC switch data. More...
 

Macro Definition Documentation

◆ WICED_BT_HFP_HF_SDP_FEATURE_ECNR

#define WICED_BT_HFP_HF_SDP_FEATURE_ECNR   0x0001

SDP SupportedFeatures attribute bit mapping for HF.

Table 5.2 of Hand-Free Profile 1.7.1 EC and/or NR function (yes:1, no:0)

◆ WICED_BT_HFP_HF_IND_ID_ENHANCED_SAFETY

#define WICED_BT_HFP_HF_IND_ID_ENHANCED_SAFETY   1

HandsFree Indicator Id.

Enhanced Driver Safety

Typedef Documentation

◆ wiced_bt_hfp_hf_event_cb_t

typedef void(* wiced_bt_hfp_hf_event_cb_t) (wiced_bt_hfp_hf_event_t event, wiced_bt_hfp_hf_event_data_t *p_data)

The HF control path callback.

The application implements a callback of this type to receive HF events and commands.

Parameters
[out]event: HF event
[out]p_data: pointer to event data.
Returns
None

Enumeration Type Documentation

◆ wiced_bt_hfp_hf_supported_features_t

HF device supported feature flags.

Enumerator
WICED_BT_HFP_HF_FEATURE_ECNR 

HF feature Echo Noise Cancellation (ECNR)

WICED_BT_HFP_HF_FEATURE_3WAY_CALLING 

HF feature Three-way calling.

WICED_BT_HFP_HF_FEATURE_CLIP_CAPABILITY 

HF feature Clip capability.

WICED_BT_HFP_HF_FEATURE_VOICE_RECOGNITION_ACTIVATION 

HF feature Voice recognition activation.

WICED_BT_HFP_HF_FEATURE_REMOTE_VOLUME_CONTROL 

HF feature Remote volume control.

WICED_BT_HFP_HF_FEATURE_ENHANCED_CALL_STATUS 

HF feature Enhanced call status.

WICED_BT_HFP_HF_FEATURE_ENHANCED_CALL_CONTROL 

HF feature Enhanced call control.

WICED_BT_HFP_HF_FEATURE_CODEC_NEGOTIATION 

HF feature Codec negotiation.

WICED_BT_HFP_HF_FEATURE_HF_INDICATORS 

HF feature HF indicators.

WICED_BT_HFP_HF_FEATURE_ESCO_S4_SETTINGS_SUPPORT 

HF feature eSCO S4 Settings Supported.

WICED_BT_HFP_HF_FEATURE_ENHANCED_VOICE_RECOGNITION 

HF feature Enhanced Voice Recognition status.

◆ wiced_bt_hfp_ag_supported_features_t

AG supported feature flags.

Enumerator
WICED_BT_HFP_AG_FEATURE_3WAY_CALLING 

AG feature Three-way calling.

WICED_BT_HFP_AG_FEATURE_ECNR 

AG feature Echo Noise Cancellation (ECNR)

WICED_BT_HFP_AG_FEATURE_VOICE_RECOGNITION_ACTIVATION 

AG feature Voice recognition activation.

WICED_BT_HFP_AG_FEATURE_INBAND_RING_TONE_CAPABILITY 

AG feature In-band ring tone capability.

WICED_BT_HFP_AG_FEATURE_ATTACH_NUMBER_TO_VOICE_TAG 

AG feature Attach a number to voice tag.

WICED_BT_HFP_AG_FEATURE_ABILITY_TO_REJECT_CALL 

AG feature Ability to reject a call.

WICED_BT_HFP_AG_FEATURE_ENHANCED_CALL_STATUS 

AG feature Enhanced call status.

WICED_BT_HFP_AG_FEATURE_ENHANCED_CALL_CONTROL 

AG feature Enhanced call control.

WICED_BT_HFP_AG_FEATURE_EXTENDED_ERROR_RESULT_CODES 

AG feature Extended Error Result Codes.

WICED_BT_HFP_AG_FEATURE_CODEC_NEGOTIATION 

AG feature Codec negotiation.

WICED_BT_HFP_AG_FEATURE_HF_INDICATORS 

AG feature HF Indicators.

WICED_BT_HFP_AG_FEATURE_ESCO_S4_SETTINGS_SUPPORT 

AG featuree SCO S4 Settings Supported.

WICED_BT_HFP_AG_FEATURE_ENHANCED_VOICE_RECOGNITION 

AG featuree Recognition Status.

◆ wiced_bt_hfp_hf_event_t

HF Events.

These are received via wiced_bt_hfp_hf_event_cb_t() callback function. see wiced_bt_hfp_hf_event_data_t for payload.

Enumerator
WICED_BT_HFP_HF_CONNECTION_STATE_EVT 

Received on control path connection state change.

WICED_BT_HFP_HF_AG_FEATURE_SUPPORT_EVT 

Indicates HFP features supported in AG.

WICED_BT_HFP_HF_SERVICE_STATE_EVT 

Indicates AG's cellular network connection state.

WICED_BT_HFP_HF_SERVICE_TYPE_EVT 

Indicates whether AG is connected to home or romaing network.

WICED_BT_HFP_HF_CALL_SETUP_EVT 

Received when there is a change in call state, e.g., incoming call, call termination.

WICED_BT_HFP_HF_RING_EVT 

Ring indication (during incoming call) received.

WICED_BT_HFP_HF_INBAND_RING_STATE_EVT 

Indicates if the AG supports sending the ring-tone to HF over audio connection.

WICED_BT_HFP_HF_RSSI_IND_EVT 

Indicates AG's cellular signal strength.

WICED_BT_HFP_HF_BATTERY_STATUS_IND_EVT 

Indicates AG's battery status.

WICED_BT_HFP_HF_VOLUME_CHANGE_EVT 

Received when there is a change in the microphone or speaker volume is changed by AG.

WICED_BT_HFP_HF_CLIP_IND_EVT 

Indicates calling line identification name/number.

WICED_BT_HFP_HFP_CODEC_SET_EVT 

Received when codec is selected (If Codec negotiation is supported)

WICED_BT_HFP_HFP_ACTIVE_CALL_EVT 

Response of AT+CLCC command.

WICED_BT_HFP_HF_OK_EVT 

Received AT+OK response.

WICED_BT_HFP_HF_ERROR_EVT 

Received AT+ERROR response.

WICED_BT_HFP_HF_CME_ERROR_EVT 

Received AT+CME ERROR response.

WICED_BT_HFP_HF_CNUM_EVT 

Received AT+CNUM response.

WICED_BT_HFP_HF_BINP_EVT 

Received AT+BINP response.

WICED_BT_HFP_HF_VOICE_RECOGNITION_EVT 

Received AT+BVRA response.

WICED_BT_HFP_HF_BIND_EVT 

Indicators Update event.

WICED_BT_HFP_HF_COPS_EVT 

Received AT+COPS response(current Network Name)

◆ wiced_bt_hfp_hf_connection_state_t

HF Control Connection States.

Enumerator
WICED_BT_HFP_HF_STATE_DISCONNECTED 

HF control connection is closed.

WICED_BT_HFP_HF_STATE_CONNECTED 

HF control connection established.

WICED_BT_HFP_HF_STATE_SLC_CONNECTED 

HF synchronized with AG's state, ready to send/recive commands/notifications.

◆ wiced_bt_hfp_hf_service_state_t

AG's serivce states.

Enumerator
WICED_BT_HFP_HF_SERVICE_STATE_NOT_AVAILABLE 

AG's cellular services not available.

WICED_BT_HFP_HF_SERVICE_STATE_AVAILABLE 

AG is connected to cellular services.

◆ wiced_bt_hfp_hf_service_type_t

AG's serivce type.

Enumerator
WICED_BT_HFP_HF_SERVICE_TYPE_HOME 

AG is connected to home network.

WICED_BT_HFP_HF_SERVICE_TYPE_ROAMING 

AG is connected to a romaing network.

◆ wiced_bt_hfp_hf_callsetup_state_t

States of a call during setup procedure.

Enumerator
WICED_BT_HFP_HF_CALLSETUP_STATE_IDLE 

No call set up in progress.

WICED_BT_HFP_HF_CALLSETUP_STATE_INCOMING 

There is an incoming call.

WICED_BT_HFP_HF_CALLSETUP_STATE_DIALING 

Outgoing call is being setup up.

WICED_BT_HFP_HF_CALLSETUP_STATE_ALERTING 

Remote party is being alterted of the call.

WICED_BT_HFP_HF_CALLSETUP_STATE_WAITING 

Incoming call is waiting (received when a call is already active)

◆ wiced_bt_hfp_hf_inband_ring_state_t

In-band ring tone setting in AG.

Enumerator
WICED_BT_HFP_HF_INBAND_RING_DISABLED 

AG will not send ring-tone thru audio connection, HF will use some means to alert the user of an incoming call.

WICED_BT_HFP_HF_INBAND_RING_ENABLED 

AG will send the ring-tone thru audio connection.

◆ wiced_bt_hfp_hf_volume_type_t

Audio input/output device on the HF Device.

Enumerator
WICED_BT_HFP_HF_SPEAKER 

Refers to speaker on the HF Device.

WICED_BT_HFP_HF_MIC 

Refers to microphone on the HF Device.

◆ wiced_bt_hfp_hf_call_action_t

Call action command.

Enumerator
WICED_BT_HFP_HF_CALL_ACTION_DIAL 

Place an outgoing call request.

WICED_BT_HFP_HF_CALL_ACTION_ANSWER 

Answer an incoming call.

WICED_BT_HFP_HF_CALL_ACTION_HANGUP 

Hangup an active call, reject an incoming call, end an outgoing call (which is being setup)

WICED_BT_HFP_HF_CALL_ACTION_HOLD_0 

Release a held call, or reject a waiting call (UDUB)

WICED_BT_HFP_HF_CALL_ACTION_HOLD_1 

Release active call and activate a held or waiting call.

WICED_BT_HFP_HF_CALL_ACTION_HOLD_2 

Place active call on hold, and accept a waiting call or retrieve a held call.

WICED_BT_HFP_HF_CALL_ACTION_HOLD_3 

Adds a held call to the conversation.

WICED_BT_HFP_HF_CALL_ACTION_HOLD_4 

Connects the two calls and disconnects the subscriber from both calls (Explicit Call Transfer).

◆ wiced_bt_hfp_hf_codec_t

Codec for HF profile.

Enumerator
WICED_BT_HFP_HF_CVSD_CODEC 

Received seleceted codec type CVSD.

WICED_BT_HFP_HF_MSBC_CODEC 

Received seleceted codec type mSBC.

◆ wiced_bt_hfp_hf_call_dir_t

HF Call direction.

Enumerator
WICED_BT_HFP_HF_OUTGOING 

Active Call Direction Outgoing.

WICED_BT_HFP_HF_INCOMING 

Active Call Direction Incoming.

◆ wiced_bt_profile_type_t

Profile type.

Enumerator
WICED_BT_HFP_PROFILE 

Received profile connected to HFP.

WICED_BT_HSP_PROFILE 

Received profile connected to HSP.

◆ wiced_bt_hfp_hf_call_status_t

HF Call status.

Enumerator
WICED_BT_HFP_HF_CALL_ACTIVE 

Status of the call Active.

WICED_BT_HFP_HF_CALL_HELD 

Status of the call Held.

WICED_BT_HFP_HF_CALL_DIALING 

Status of the call Dialing.

WICED_BT_HFP_HF_CALL_ALERING 

Status of the call Alerting.

WICED_BT_HFP_HF_CALL_INCOMING 

Status of the call Incoming.

WICED_BT_HFP_HF_CALL_WAITING 

Status of the call Waiting.

WICED_BT_HFP_HF_CALL_HELD_BY_RSP_HOLD 

Status of the call held by response hold.

◆ wiced_bt_hfp_hf_call_mode_t

HF Call mode.

Enumerator
WICED_BT_HFP_HF_MODE_VOICE 

Type of call Voice.

WICED_BT_HFP_HF_MODE_DATA 

Type of call Data.

WICED_BT_HFP_HF_MODE_FAX 

Type of call Fax.

Function Documentation

◆ wiced_bt_hfp_hf_init()

wiced_result_t wiced_bt_hfp_hf_init ( wiced_bt_hfp_hf_config_data_t p_config_data,
wiced_bt_hfp_hf_event_cb_t  event_cb 
)

The API to initialize the HFP-HF component and register with the stack.

Called by the application before any other API is called. Application provides the SINK configuration data and callback to receive control events

Parameters
[in]p_config_data: HF configuration parameters array for each server. see wiced_bt_hfp_hf_config_data_t.
[in]event_cb: Callback function for receiving HF events.
Returns
wiced_result_t
WICED_ALREADY_INITIALIZED : if already in initialized
WICED_BADARG : if parameter(s) are out of range or not in correct state
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_deinit()

wiced_result_t wiced_bt_hfp_hf_deinit ( void  )

The API to deregister the HFP-HF component from the stack and to clean up internal data structures.

Called by the application when the HFP-HF component is no longer needed by it.

Returns
wiced_result_t
WICED_SUCCESS : if successfully deinitialized

◆ wiced_bt_hfp_hf_connect()

wiced_result_t wiced_bt_hfp_hf_connect ( wiced_bt_device_address_t  bd_address)

The API to initiate a HFP connection to an AG.

Called by the application to connect to an AG with the given address.

Parameters
[in]bd_address: BD address of the AG.
Returns
wiced_result_t
WICED_NOTUP : if hf not initialized
WICED_OUT_OF_HEAP_SPACE : if out of memory
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_disconnect()

wiced_result_t wiced_bt_hfp_hf_disconnect ( uint16_t  handle)

The API to disconnect from an AG.

Called by the application to disconnect from an AG with a given address.

Parameters
[in]handle: Connection handle.
Returns
wiced_result_t
WICED_NOTUP : if hf not initialized
WICED_OUT_OF_HEAP_SPACE : if out of memory
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_perform_call_action()

wiced_result_t wiced_bt_hfp_hf_perform_call_action ( uint16_t  handle,
wiced_bt_hfp_hf_call_action_t  action,
char *  number 
)

The API to manipulate a call (i.e., to answer, hold, hangup, reject, etc).

Allows the application to take actions indicated in wiced_bt_hfp_hf_call_action_t.

Parameters
[in]handle: Connection handle.
[in]action: Action to be initiated, see wiced_bt_hfp_hf_call_action_t.
[in]number: Contains a NULL terminated number to be called, if NULL, the last number redial (LNR) is initiated. valid when action is WICED_BT_HFP_HF_CALL_ACTION_DIAL, for all other actions this is ignored.
Returns
wiced_result_t
WICED_NOTUP : if hf not initialized
WICED_OUT_OF_HEAP_SPACE : if out of memory
WICED_BADARG : if parameter(s) are out of range
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_notify_volume()

wiced_result_t wiced_bt_hfp_hf_notify_volume ( uint16_t  handle,
wiced_bt_hfp_hf_volume_type_t  volume_type,
uint8_t  volume_level 
)

The API to send the current speaker/mic volume level to AG.

Called by the application to notify the AG of the change in volume of mic or speaker.

Parameters
[in]handle: Connection handle.
[in]volume_type: Mic or speaker for which the volume was changed.
[in]volume_level: Volume level from 0 to 15.
Returns
wiced_result_t
WICED_NOTUP : if hf not initialized
WICED_OUT_OF_HEAP_SPACE : if out of memory
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_send_at_cmd()

wiced_result_t wiced_bt_hfp_hf_send_at_cmd ( uint16_t  handle,
char *  at_cmd 
)

The API to send the at command to the AG Called by the application to send an command to AG.

The command sent is passed thru for the library. The response is received through WICED_BT_HFP_HF_AT_RESULT_CODE_IND_EVT.

Parameters
[in]handle: Connection handle.
[in]at_cmd: Null terminated at command string to be sent to AG.
Returns
wiced_result_t
WICED_NOTUP : if hf not initialized
WICED_OUT_OF_HEAP_SPACE : if out of memory
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_lrac_switch_get()

wiced_result_t wiced_bt_hfp_hf_lrac_switch_get ( void *  p_opaque,
uint16_t *  p_sync_data_len 
)

The API to get LRAC Switch data.

Called by the application to get the LRAC Switch Data.

Note
Supported only on chips that support LRAC feature.
Parameters
[in]p_opaque: The pointer to a buffer which will be filled with LRAC Switch data (current HFP Sink State).
[in]p_sync_data_len: Size of the buffer (IN), size filled (OUT)
Returns
wiced_result_t
WICED_BADARG : if parameter(s) are out of range
WICED_BT_SUCCESS otherwise.

◆ wiced_bt_hfp_hf_lrac_switch_set()

wiced_result_t wiced_bt_hfp_hf_lrac_switch_set ( void *  p_opaque,
uint16_t  sync_data_len 
)

The API to set LRAC switch data.

Called by the application to set the LRAC Switch Data

Note
Supported only on chips that support LRAC feature.
Parameters
[in]p_opaque: The pointer to a buffer which contains LRAC Switch data (new HFP Sink State).
[in]sync_data_len: Size of the buffer.
Returns
wiced_result_t
WICED_BADARG : if parameter(s) are out of range
WICED_BT_SUCCESS otherwise.