#include "hci.h"
#include "classic/sdp_client_rfcomm.h"
#include "classic/hfp.h"
#include "classic/hfp_gsm_model.h"
Data Structures | |
struct | hfp_phone_number_t |
Functions | |
void | hfp_ag_accept_held_incoming_call (void) |
void | hfp_ag_activate_voice_recognition (hci_con_handle_t acl_handle, int activate) |
void | hfp_ag_answer_incoming_call (void) |
Put the current call on hold, if it exists, and accept incoming call. More... | |
void | hfp_ag_call_dropped (void) |
Pass the call droped event to the AG. More... | |
void | hfp_ag_clear_last_dialed_number (void) |
void | hfp_ag_create_sdp_record (uint8_t *service, uint32_t service_record_handle, int rfcomm_channel_nr, const char *name, uint8_t ability_to_reject_call, uint16_t supported_features, int wide_band_speech) |
Create HFP Audio Gateway (AG) SDP service record. More... | |
void | hfp_ag_establish_audio_connection (hci_con_handle_t acl_handle) |
Establish audio connection. More... | |
void | hfp_ag_establish_service_level_connection (bd_addr_t bd_addr) |
Establish RFCOMM connection, and perform service level connection agreement: More... | |
void | hfp_ag_hold_incoming_call (void) |
void | hfp_ag_incoming_call (void) |
Pass the accept incoming call event to the AG. More... | |
void | hfp_ag_init (uint16_t rfcomm_channel_nr) |
Set up HFP Audio Gateway (AG) device without additional supported features. More... | |
void | hfp_ag_init_ag_indicators (int ag_indicators_nr, hfp_ag_indicator_t *ag_indicators) |
Set AG indicators. More... | |
void | hfp_ag_init_call_hold_services (int call_hold_services_nr, const char *call_hold_services[]) |
Set Call Hold services. More... | |
void | hfp_ag_init_codecs (int codecs_nr, uint8_t *codecs) |
Set codecs. More... | |
void | hfp_ag_init_hf_indicators (int hf_indicators_nr, hfp_generic_status_indicator_t *hf_indicators) |
Set HF indicators. More... | |
void | hfp_ag_init_supported_features (uint32_t supported_features) |
Set supported features. More... | |
void | hfp_ag_join_held_call (void) |
Join held call with active call. More... | |
void | hfp_ag_notify_incoming_call_waiting (hci_con_handle_t acl_handle) |
void | hfp_ag_outgoing_call_accepted (void) |
Pass the accept outgoing call event to the AG. More... | |
void | hfp_ag_outgoing_call_established (void) |
Pass the outgoing call established event to the AG. More... | |
void | hfp_ag_outgoing_call_rejected (void) |
Pass the reject outgoing call event to the AG. More... | |
void | hfp_ag_outgoing_call_ringing (void) |
Pass the outgoing call ringing event to the AG. More... | |
void | hfp_ag_register_packet_handler (btstack_packet_handler_t callback) |
Register callback for the HFP Audio Gateway (AG) client. More... | |
void | hfp_ag_reject_held_incoming_call (void) |
void | hfp_ag_reject_phone_number_for_voice_tag (hci_con_handle_t acl_handle) |
void | hfp_ag_release_audio_connection (hci_con_handle_t acl_handle) |
Release audio connection. More... | |
void | hfp_ag_release_service_level_connection (hci_con_handle_t acl_handle) |
Release the RFCOMM channel and the audio connection between the HF and the AG. More... | |
void | hfp_ag_report_extended_audio_gateway_error_result_code (hci_con_handle_t acl_handle, hfp_cme_error_t error) |
Report Extended Audio Gateway Error result codes in the AG. More... | |
void | hfp_ag_send_dtmf_code_done (hci_con_handle_t acl_handle) |
void | hfp_ag_send_phone_number_for_voice_tag (hci_con_handle_t acl_handle, const char *phone_number) |
void | hfp_ag_set_battery_level (int level) |
void | hfp_ag_set_clip (uint8_t type, const char *number) |
Store phone number with initiated call. More... | |
void | hfp_ag_set_microphone_gain (hci_con_handle_t acl_handle, int gain) |
void | hfp_ag_set_registration_status (int status) |
void | hfp_ag_set_roaming_status (int status) |
void | hfp_ag_set_signal_strength (int strength) |
void | hfp_ag_set_speaker_gain (hci_con_handle_t acl_handle, int gain) |
void | hfp_ag_set_subcriber_number_information (hfp_phone_number_t *numbers, int numbers_count) |
void | hfp_ag_set_use_in_band_ring_tone (int use_in_band_ring_tone) |
Enable in-band ring tone. More... | |
void | hfp_ag_terminate_call (void) |
Reject incoming call, if exists, or terminate active call. More... | |
void hfp_ag_accept_held_incoming_call | ( | void | ) |
void hfp_ag_activate_voice_recognition | ( | hci_con_handle_t | acl_handle, |
int | activate | ||
) |
void hfp_ag_answer_incoming_call | ( | void | ) |
Put the current call on hold, if it exists, and accept incoming call.
void hfp_ag_call_dropped | ( | void | ) |
Pass the call droped event to the AG.
void hfp_ag_clear_last_dialed_number | ( | void | ) |
void hfp_ag_create_sdp_record | ( | uint8_t * | service, |
uint32_t | service_record_handle, | ||
int | rfcomm_channel_nr, | ||
const char * | name, | ||
uint8_t | ability_to_reject_call, | ||
uint16_t | supported_features, | ||
int | wide_band_speech | ||
) |
Create HFP Audio Gateway (AG) SDP service record.
service | |
rfcomm_channel_nr | |
name | |
ability_to_reject_call | |
suported_features | 32-bit bitmap, see HFP_AGSF_* values in hfp.h |
wide_band_speech | supported |
void hfp_ag_establish_audio_connection | ( | hci_con_handle_t | acl_handle | ) |
Establish audio connection.
The status of Audio connection establishment is reported via is reported via HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE.
bd_addr | Bluetooth address of the HF |
void hfp_ag_establish_service_level_connection | ( | bd_addr_t | bd_addr | ) |
Establish RFCOMM connection, and perform service level connection agreement:
bd_addr | Bluetooth address of the HF |
void hfp_ag_hold_incoming_call | ( | void | ) |
void hfp_ag_incoming_call | ( | void | ) |
Pass the accept incoming call event to the AG.
void hfp_ag_init | ( | uint16_t | rfcomm_channel_nr | ) |
Set up HFP Audio Gateway (AG) device without additional supported features.
rfcomm_channel_nr |
void hfp_ag_init_ag_indicators | ( | int | ag_indicators_nr, |
hfp_ag_indicator_t * | ag_indicators | ||
) |
Set AG indicators.
indicators_nr | |
indicators |
void hfp_ag_init_call_hold_services | ( | int | call_hold_services_nr, |
const char * | call_hold_services[] | ||
) |
Set Call Hold services.
indicators_nr | |
indicators |
void hfp_ag_init_codecs | ( | int | codecs_nr, |
uint8_t * | codecs | ||
) |
Set codecs.
codecs_nr | |
codecs |
void hfp_ag_init_hf_indicators | ( | int | hf_indicators_nr, |
hfp_generic_status_indicator_t * | hf_indicators | ||
) |
Set HF indicators.
indicators_nr | |
indicators |
void hfp_ag_init_supported_features | ( | uint32_t | supported_features | ) |
Set supported features.
supported_features | 32-bit bitmap, see HFP_AGSF_* values in hfp.h |
void hfp_ag_join_held_call | ( | void | ) |
Join held call with active call.
void hfp_ag_notify_incoming_call_waiting | ( | hci_con_handle_t | acl_handle | ) |
void hfp_ag_outgoing_call_accepted | ( | void | ) |
Pass the accept outgoing call event to the AG.
void hfp_ag_outgoing_call_established | ( | void | ) |
Pass the outgoing call established event to the AG.
void hfp_ag_outgoing_call_rejected | ( | void | ) |
Pass the reject outgoing call event to the AG.
void hfp_ag_outgoing_call_ringing | ( | void | ) |
Pass the outgoing call ringing event to the AG.
void hfp_ag_register_packet_handler | ( | btstack_packet_handler_t | callback | ) |
Register callback for the HFP Audio Gateway (AG) client.
callback |
void hfp_ag_reject_held_incoming_call | ( | void | ) |
void hfp_ag_reject_phone_number_for_voice_tag | ( | hci_con_handle_t | acl_handle | ) |
void hfp_ag_release_audio_connection | ( | hci_con_handle_t | acl_handle | ) |
Release audio connection.
The status of releasing the Audio connection is reported via is reported via HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE.
bd_addr | Bluetooth address of the HF |
void hfp_ag_release_service_level_connection | ( | hci_con_handle_t | acl_handle | ) |
Release the RFCOMM channel and the audio connection between the HF and the AG.
If the audio connection exists, it will be released. The status of releasing the SLC connection is reported via HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED.
bd_addr | Bluetooth address of the HF |
void hfp_ag_report_extended_audio_gateway_error_result_code | ( | hci_con_handle_t | acl_handle, |
hfp_cme_error_t | error | ||
) |
Report Extended Audio Gateway Error result codes in the AG.
Whenever there is an error relating to the functionality of the AG as a result of AT command, the AG shall send +CME ERROR:
bd_addr | Bluetooth address of the HF |
error |
void hfp_ag_send_dtmf_code_done | ( | hci_con_handle_t | acl_handle | ) |
void hfp_ag_send_phone_number_for_voice_tag | ( | hci_con_handle_t | acl_handle, |
const char * | phone_number | ||
) |
void hfp_ag_set_battery_level | ( | int | level | ) |
void hfp_ag_set_clip | ( | uint8_t | type, |
const char * | number | ||
) |
Store phone number with initiated call.
type | |
number |
void hfp_ag_set_microphone_gain | ( | hci_con_handle_t | acl_handle, |
int | gain | ||
) |
void hfp_ag_set_registration_status | ( | int | status | ) |
void hfp_ag_set_roaming_status | ( | int | status | ) |
void hfp_ag_set_signal_strength | ( | int | strength | ) |
void hfp_ag_set_speaker_gain | ( | hci_con_handle_t | acl_handle, |
int | gain | ||
) |
void hfp_ag_set_subcriber_number_information | ( | hfp_phone_number_t * | numbers, |
int | numbers_count | ||
) |
void hfp_ag_set_use_in_band_ring_tone | ( | int | use_in_band_ring_tone | ) |
Enable in-band ring tone.
use_in_band_ring_tone |
void hfp_ag_terminate_call | ( | void | ) |
Reject incoming call, if exists, or terminate active call.