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... | |
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... | |
#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)
#define WICED_BT_HFP_HF_IND_ID_ENHANCED_SAFETY 1 |
HandsFree Indicator Id.
Enhanced Driver Safety
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.
[out] | event | : HF event |
[out] | p_data | : pointer to event data. |
HF device supported feature flags.
AG supported feature flags.
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.
States of a call during setup procedure.
Call action command.
HF Call status.
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
[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. |
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.
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.
[in] | bd_address | : BD address of the AG. |
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.
[in] | handle | : Connection handle. |
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.
[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. |
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.
[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. |
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.
[in] | handle | : Connection handle. |
[in] | at_cmd | : Null terminated at command string to be sent to AG. |
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.
[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) |
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
[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. |