13deb3ec6SMatthias Ringwald /* 23deb3ec6SMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 33deb3ec6SMatthias Ringwald * 43deb3ec6SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 53deb3ec6SMatthias Ringwald * modification, are permitted provided that the following conditions 63deb3ec6SMatthias Ringwald * are met: 73deb3ec6SMatthias Ringwald * 83deb3ec6SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 93deb3ec6SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 103deb3ec6SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 113deb3ec6SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 123deb3ec6SMatthias Ringwald * documentation and/or other materials provided with the distribution. 133deb3ec6SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 143deb3ec6SMatthias Ringwald * contributors may be used to endorse or promote products derived 153deb3ec6SMatthias Ringwald * from this software without specific prior written permission. 163deb3ec6SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 173deb3ec6SMatthias Ringwald * personal benefit and not for any commercial purpose or for 183deb3ec6SMatthias Ringwald * monetary gain. 193deb3ec6SMatthias Ringwald * 203deb3ec6SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 213deb3ec6SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 223deb3ec6SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 233deb3ec6SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 243deb3ec6SMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 253deb3ec6SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 263deb3ec6SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 273deb3ec6SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 283deb3ec6SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 293deb3ec6SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 303deb3ec6SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 313deb3ec6SMatthias Ringwald * SUCH DAMAGE. 323deb3ec6SMatthias Ringwald * 333deb3ec6SMatthias Ringwald * Please inquire about commercial licensing options at 343deb3ec6SMatthias Ringwald * [email protected] 353deb3ec6SMatthias Ringwald * 363deb3ec6SMatthias Ringwald */ 373deb3ec6SMatthias Ringwald 38*fe5a6c4eSMilanka Ringwald /** 39*fe5a6c4eSMilanka Ringwald * @title HFP Audio Gateway (AG) 40*fe5a6c4eSMilanka Ringwald * 41*fe5a6c4eSMilanka Ringwald */ 423deb3ec6SMatthias Ringwald 433deb3ec6SMatthias Ringwald #ifndef btstack_hfp_ag_h 443deb3ec6SMatthias Ringwald #define btstack_hfp_ag_h 453deb3ec6SMatthias Ringwald 463deb3ec6SMatthias Ringwald #include "hci.h" 47efda0b48SMatthias Ringwald #include "classic/sdp_client_rfcomm.h" 483edc84c5SMatthias Ringwald #include "classic/hfp.h" 4974386ee0SMatthias Ringwald #include "classic/hfp_gsm_model.h" 503deb3ec6SMatthias Ringwald 513deb3ec6SMatthias Ringwald #if defined __cplusplus 523deb3ec6SMatthias Ringwald extern "C" { 533deb3ec6SMatthias Ringwald #endif 543deb3ec6SMatthias Ringwald 553deb3ec6SMatthias Ringwald /* API_START */ 56ce263fc8SMatthias Ringwald typedef struct { 57ce263fc8SMatthias Ringwald uint8_t type; 58ce263fc8SMatthias Ringwald const char * number; 59ce263fc8SMatthias Ringwald } hfp_phone_number_t; 603deb3ec6SMatthias Ringwald 613deb3ec6SMatthias Ringwald /** 623deb3ec6SMatthias Ringwald * @brief Create HFP Audio Gateway (AG) SDP service record. 63a0ffb263SMatthias Ringwald * @param service 64a0ffb263SMatthias Ringwald * @param rfcomm_channel_nr 65a0ffb263SMatthias Ringwald * @param name 66a0ffb263SMatthias Ringwald * @param ability_to_reject_call 67a0ffb263SMatthias Ringwald * @param suported_features 32-bit bitmap, see HFP_AGSF_* values in hfp.h 684f84bf36SMatthias Ringwald * @param wide_band_speech supported 693deb3ec6SMatthias Ringwald */ 704f84bf36SMatthias Ringwald 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); 713deb3ec6SMatthias Ringwald 723deb3ec6SMatthias Ringwald /** 73a0ffb263SMatthias Ringwald * @brief Set up HFP Audio Gateway (AG) device without additional supported features. 74a0ffb263SMatthias Ringwald * @param rfcomm_channel_nr 753deb3ec6SMatthias Ringwald */ 76a0ffb263SMatthias Ringwald void hfp_ag_init(uint16_t rfcomm_channel_nr); 77a0ffb263SMatthias Ringwald 78a0ffb263SMatthias Ringwald /** 79a0ffb263SMatthias Ringwald * @brief Set codecs. 80a0ffb263SMatthias Ringwald * @param codecs_nr 81a0ffb263SMatthias Ringwald * @param codecs 82a0ffb263SMatthias Ringwald */ 837ca89cabSMatthias Ringwald void hfp_ag_init_codecs(int codecs_nr, const uint8_t * codecs); 84a0ffb263SMatthias Ringwald 85a0ffb263SMatthias Ringwald /** 86a0ffb263SMatthias Ringwald * @brief Set supported features. 87a0ffb263SMatthias Ringwald * @param supported_features 32-bit bitmap, see HFP_AGSF_* values in hfp.h 88a0ffb263SMatthias Ringwald */ 89a0ffb263SMatthias Ringwald void hfp_ag_init_supported_features(uint32_t supported_features); 90a0ffb263SMatthias Ringwald 91a0ffb263SMatthias Ringwald /** 92a0ffb263SMatthias Ringwald * @brief Set AG indicators. 93a0ffb263SMatthias Ringwald * @param indicators_nr 94a0ffb263SMatthias Ringwald * @param indicators 95a0ffb263SMatthias Ringwald */ 967ca89cabSMatthias Ringwald void hfp_ag_init_ag_indicators(int ag_indicators_nr, const hfp_ag_indicator_t * ag_indicators); 97a0ffb263SMatthias Ringwald 98a0ffb263SMatthias Ringwald /** 99a0ffb263SMatthias Ringwald * @brief Set HF indicators. 100a0ffb263SMatthias Ringwald * @param indicators_nr 101a0ffb263SMatthias Ringwald * @param indicators 102a0ffb263SMatthias Ringwald */ 1037ca89cabSMatthias Ringwald void hfp_ag_init_hf_indicators(int hf_indicators_nr, const hfp_generic_status_indicator_t * hf_indicators); 104a0ffb263SMatthias Ringwald 105a0ffb263SMatthias Ringwald /** 106a0ffb263SMatthias Ringwald * @brief Set Call Hold services. 107a0ffb263SMatthias Ringwald * @param indicators_nr 108a0ffb263SMatthias Ringwald * @param indicators 109a0ffb263SMatthias Ringwald */ 110a0ffb263SMatthias Ringwald void hfp_ag_init_call_hold_services(int call_hold_services_nr, const char * call_hold_services[]); 111a0ffb263SMatthias Ringwald 1123deb3ec6SMatthias Ringwald 1133deb3ec6SMatthias Ringwald /** 1143deb3ec6SMatthias Ringwald * @brief Register callback for the HFP Audio Gateway (AG) client. 115a0ffb263SMatthias Ringwald * @param callback 1163deb3ec6SMatthias Ringwald */ 11713839019SMatthias Ringwald void hfp_ag_register_packet_handler(btstack_packet_handler_t callback); 1183deb3ec6SMatthias Ringwald 1193deb3ec6SMatthias Ringwald /** 120a0ffb263SMatthias Ringwald * @brief Enable in-band ring tone. 121a0ffb263SMatthias Ringwald * @param use_in_band_ring_tone 12266a048abSMatthias Ringwald */ 12366a048abSMatthias Ringwald void hfp_ag_set_use_in_band_ring_tone(int use_in_band_ring_tone); 12466a048abSMatthias Ringwald 12566a048abSMatthias Ringwald 12666a048abSMatthias Ringwald // actions used by local device / user 12766a048abSMatthias Ringwald 12866a048abSMatthias Ringwald /** 1293deb3ec6SMatthias Ringwald * @brief Establish RFCOMM connection, and perform service level connection agreement: 1303deb3ec6SMatthias Ringwald * - exchange of supported features 1313deb3ec6SMatthias Ringwald * - report Audio Gateway (AG) indicators and their status 1323deb3ec6SMatthias Ringwald * - enable indicator status update in the AG 1333deb3ec6SMatthias Ringwald * - accept the information about available codecs in the Hands-Free (HF), if sent 1343deb3ec6SMatthias Ringwald * - report own information describing the call hold and multiparty services, if possible 1353deb3ec6SMatthias Ringwald * - report which HF indicators are enabled on the AG, if possible 136a0ffb263SMatthias Ringwald * The status of SLC connection establishment is reported via 137a0ffb263SMatthias Ringwald * HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED. 138a0ffb263SMatthias Ringwald * 139a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 1403deb3ec6SMatthias Ringwald */ 1413deb3ec6SMatthias Ringwald void hfp_ag_establish_service_level_connection(bd_addr_t bd_addr); 1423deb3ec6SMatthias Ringwald 1433deb3ec6SMatthias Ringwald /** 1443deb3ec6SMatthias Ringwald * @brief Release the RFCOMM channel and the audio connection between the HF and the AG. 145a0ffb263SMatthias Ringwald * If the audio connection exists, it will be released. 146a0ffb263SMatthias Ringwald * The status of releasing the SLC connection is reported via 147a0ffb263SMatthias Ringwald * HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED. 148a0ffb263SMatthias Ringwald * 149a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 1503deb3ec6SMatthias Ringwald */ 151d97d752dSMilanka Ringwald void hfp_ag_release_service_level_connection(hci_con_handle_t acl_handle); 1523deb3ec6SMatthias Ringwald 1533deb3ec6SMatthias Ringwald /** 154a0ffb263SMatthias Ringwald * @brief Establish audio connection. 155a0ffb263SMatthias Ringwald * The status of Audio connection establishment is reported via is reported via 156a0ffb263SMatthias Ringwald * HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE. 157a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 158aa4dd815SMatthias Ringwald */ 159d97d752dSMilanka Ringwald void hfp_ag_establish_audio_connection(hci_con_handle_t acl_handle); 1603deb3ec6SMatthias Ringwald 1613deb3ec6SMatthias Ringwald /** 162a0ffb263SMatthias Ringwald * @brief Release audio connection. 163a0ffb263SMatthias Ringwald * The status of releasing the Audio connection is reported via is reported via 164a0ffb263SMatthias Ringwald * HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE. 165a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 1663deb3ec6SMatthias Ringwald */ 167d97d752dSMilanka Ringwald void hfp_ag_release_audio_connection(hci_con_handle_t acl_handle); 1683deb3ec6SMatthias Ringwald 16966a048abSMatthias Ringwald /** 170a0ffb263SMatthias Ringwald * @brief Put the current call on hold, if it exists, and accept incoming call. 17166a048abSMatthias Ringwald */ 17266a048abSMatthias Ringwald void hfp_ag_answer_incoming_call(void); 1733deb3ec6SMatthias Ringwald 174aa4dd815SMatthias Ringwald /** 175a0ffb263SMatthias Ringwald * @brief Join held call with active call. 176aa4dd815SMatthias Ringwald */ 17766a048abSMatthias Ringwald void hfp_ag_join_held_call(void); 17866a048abSMatthias Ringwald 17966a048abSMatthias Ringwald /** 180a0ffb263SMatthias Ringwald * @brief Reject incoming call, if exists, or terminate active call. 18166a048abSMatthias Ringwald */ 18266a048abSMatthias Ringwald void hfp_ag_terminate_call(void); 18366a048abSMatthias Ringwald 18466a048abSMatthias Ringwald /* 185a0ffb263SMatthias Ringwald * @brief Put incoming call on hold. 18666a048abSMatthias Ringwald */ 18766a048abSMatthias Ringwald void hfp_ag_hold_incoming_call(void); 18866a048abSMatthias Ringwald 18966a048abSMatthias Ringwald /* 190a0ffb263SMatthias Ringwald * @brief Accept the held incoming call. 19166a048abSMatthias Ringwald */ 19266a048abSMatthias Ringwald void hfp_ag_accept_held_incoming_call(void); 19366a048abSMatthias Ringwald 19466a048abSMatthias Ringwald /* 195a0ffb263SMatthias Ringwald * @brief Reject the held incoming call. 19666a048abSMatthias Ringwald */ 19766a048abSMatthias Ringwald void hfp_ag_reject_held_incoming_call(void); 19866a048abSMatthias Ringwald 19966a048abSMatthias Ringwald /* 200a0ffb263SMatthias Ringwald * @brief Set microphone gain. 201a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 202a0ffb263SMatthias Ringwald * @param gain Valid range: [0,15] 20366a048abSMatthias Ringwald */ 204d97d752dSMilanka Ringwald void hfp_ag_set_microphone_gain(hci_con_handle_t acl_handle, int gain); 20566a048abSMatthias Ringwald 20666a048abSMatthias Ringwald /* 207a0ffb263SMatthias Ringwald * @brief Set speaker gain. 208a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 209a0ffb263SMatthias Ringwald * @param gain Valid range: [0,15] 21066a048abSMatthias Ringwald */ 211d97d752dSMilanka Ringwald void hfp_ag_set_speaker_gain(hci_con_handle_t acl_handle, int gain); 21266a048abSMatthias Ringwald 21366a048abSMatthias Ringwald /* 214a0ffb263SMatthias Ringwald * @brief Set battery level. 215a0ffb263SMatthias Ringwald * @param level Valid range: [0,5] 21666a048abSMatthias Ringwald */ 21766a048abSMatthias Ringwald void hfp_ag_set_battery_level(int level); 21866a048abSMatthias Ringwald 21966a048abSMatthias Ringwald /* 220a0ffb263SMatthias Ringwald * @brief Clear last dialed number. 22166a048abSMatthias Ringwald */ 22266a048abSMatthias Ringwald void hfp_ag_clear_last_dialed_number(void); 22366a048abSMatthias Ringwald 224a0ffb263SMatthias Ringwald /* 2259de679b7SMilanka Ringwald * @brief Set last dialed number. 2269de679b7SMilanka Ringwald */ 2279de679b7SMilanka Ringwald void hfp_ag_set_last_dialed_number(const char * number); 2289de679b7SMilanka Ringwald 2299de679b7SMilanka Ringwald /* 230a0ffb263SMatthias Ringwald * @brief Notify the HF that an incoming call is waiting 231a0ffb263SMatthias Ringwald * during an ongoing call. The notification will be sent only if the HF has 232a0ffb263SMatthias Ringwald * has previously enabled the "Call Waiting notification" in the AG. 233a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 234a0ffb263SMatthias Ringwald */ 235d97d752dSMilanka Ringwald void hfp_ag_notify_incoming_call_waiting(hci_con_handle_t acl_handle); 23666a048abSMatthias Ringwald 23766a048abSMatthias Ringwald // Voice Recognition 23866a048abSMatthias Ringwald 23966a048abSMatthias Ringwald /* 240a0ffb263SMatthias Ringwald * @brief Activate voice recognition. 241a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 242a0ffb263SMatthias Ringwald * @param activate 24366a048abSMatthias Ringwald */ 244d97d752dSMilanka Ringwald void hfp_ag_activate_voice_recognition(hci_con_handle_t acl_handle, int activate); 24566a048abSMatthias Ringwald 24645796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_activate(hci_con_handle_t acl_handle); 24745796ff1SMilanka Ringwald 24845796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_status(hci_con_handle_t acl_handle, hfp_voice_recognition_state_t state); 24945796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_starting_sound(hci_con_handle_t acl_handle); 25045796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_ready_for_input(hci_con_handle_t acl_handle); 25145796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_processing_input(hci_con_handle_t acl_handle); 25245796ff1SMilanka Ringwald 25345796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_message(hci_con_handle_t acl_handle, hfp_voice_recognition_state_t state, hfp_voice_recognition_message_t msg); 25445796ff1SMilanka Ringwald void hfp_ag_enhanced_voice_recognition_deactivate(hci_con_handle_t acl_handle); 25545796ff1SMilanka Ringwald 25666a048abSMatthias Ringwald /* 257a0ffb263SMatthias Ringwald * @brief Send a phone number back to the HF. 258a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 259a0ffb263SMatthias Ringwald * @param phone_number 26066a048abSMatthias Ringwald */ 261d97d752dSMilanka Ringwald void hfp_ag_send_phone_number_for_voice_tag(hci_con_handle_t acl_handle, const char * phone_number); 26266a048abSMatthias Ringwald 26366a048abSMatthias Ringwald /* 264a0ffb263SMatthias Ringwald * @brief Reject sending a phone number to the HF. 265a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 26666a048abSMatthias Ringwald */ 267d97d752dSMilanka Ringwald void hfp_ag_reject_phone_number_for_voice_tag(hci_con_handle_t acl_handle); 26866a048abSMatthias Ringwald 269a0ffb263SMatthias Ringwald /** 270a0ffb263SMatthias Ringwald * @brief Store phone number with initiated call. 271a0ffb263SMatthias Ringwald * @param type 272a0ffb263SMatthias Ringwald * @param number 273a0ffb263SMatthias Ringwald */ 274a0ffb263SMatthias Ringwald void hfp_ag_set_clip(uint8_t type, const char * number); 275a0ffb263SMatthias Ringwald 27666a048abSMatthias Ringwald 27766a048abSMatthias Ringwald // Cellular Actions 278aa4dd815SMatthias Ringwald 279aa4dd815SMatthias Ringwald /** 280a0ffb263SMatthias Ringwald * @brief Pass the accept incoming call event to the AG. 281aa4dd815SMatthias Ringwald */ 282aa4dd815SMatthias Ringwald void hfp_ag_incoming_call(void); 283aa4dd815SMatthias Ringwald 284aa4dd815SMatthias Ringwald /** 285fe899794SMatthias Ringwald * @brief Outgoing call initiated 286fe899794SMatthias Ringwald */ 287fe899794SMatthias Ringwald void hfp_ag_outgoing_call_initiated(const char * number); 288fe899794SMatthias Ringwald 289fe899794SMatthias Ringwald /** 290a0ffb263SMatthias Ringwald * @brief Pass the reject outgoing call event to the AG. 291aa4dd815SMatthias Ringwald */ 292aa4dd815SMatthias Ringwald void hfp_ag_outgoing_call_rejected(void); 293aa4dd815SMatthias Ringwald 294aa4dd815SMatthias Ringwald /** 295a0ffb263SMatthias Ringwald * @brief Pass the accept outgoing call event to the AG. 296aa4dd815SMatthias Ringwald */ 297aa4dd815SMatthias Ringwald void hfp_ag_outgoing_call_accepted(void); 298aa4dd815SMatthias Ringwald 299aa4dd815SMatthias Ringwald /** 300a0ffb263SMatthias Ringwald * @brief Pass the outgoing call ringing event to the AG. 301aa4dd815SMatthias Ringwald */ 302aa4dd815SMatthias Ringwald void hfp_ag_outgoing_call_ringing(void); 303aa4dd815SMatthias Ringwald 304aa4dd815SMatthias Ringwald /** 305a0ffb263SMatthias Ringwald * @brief Pass the outgoing call established event to the AG. 306aa4dd815SMatthias Ringwald */ 307aa4dd815SMatthias Ringwald void hfp_ag_outgoing_call_established(void); 308aa4dd815SMatthias Ringwald 309aa4dd815SMatthias Ringwald /** 310a0ffb263SMatthias Ringwald * @brief Pass the call droped event to the AG. 311aa4dd815SMatthias Ringwald */ 312aa4dd815SMatthias Ringwald void hfp_ag_call_dropped(void); 313a0ffb263SMatthias Ringwald 314aa4dd815SMatthias Ringwald /* 315a0ffb263SMatthias Ringwald * @brief Set network registration status. 316a0ffb263SMatthias Ringwald * @param status 0 - not registered, 1 - registered 317aa4dd815SMatthias Ringwald */ 318aa4dd815SMatthias Ringwald void hfp_ag_set_registration_status(int status); 319aa4dd815SMatthias Ringwald 320aa4dd815SMatthias Ringwald /* 321a0ffb263SMatthias Ringwald * @brief Set network signal strength. 322a0ffb263SMatthias Ringwald * @param strength [0-5] 323aa4dd815SMatthias Ringwald */ 324aa4dd815SMatthias Ringwald void hfp_ag_set_signal_strength(int strength); 325aa4dd815SMatthias Ringwald 326aa4dd815SMatthias Ringwald /* 327a0ffb263SMatthias Ringwald * @brief Set roaming status. 328a0ffb263SMatthias Ringwald * @param status 0 - no roaming, 1 - roaming active 329aa4dd815SMatthias Ringwald */ 330aa4dd815SMatthias Ringwald void hfp_ag_set_roaming_status(int status); 331aa4dd815SMatthias Ringwald 332aa4dd815SMatthias Ringwald /* 333a0ffb263SMatthias Ringwald * @brief Set subcriber number information, e.g. the phone number 334a0ffb263SMatthias Ringwald * @param numbers 335a0ffb263SMatthias Ringwald * @param numbers_count 336aa4dd815SMatthias Ringwald */ 337ce263fc8SMatthias Ringwald void hfp_ag_set_subcriber_number_information(hfp_phone_number_t * numbers, int numbers_count); 338ce263fc8SMatthias Ringwald 339ce263fc8SMatthias Ringwald /* 340a0ffb263SMatthias Ringwald * @brief Called by cellular unit after a DTMF code was transmitted, so that the next one can be emitted. 341a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 342ce263fc8SMatthias Ringwald */ 343d97d752dSMilanka Ringwald void hfp_ag_send_dtmf_code_done(hci_con_handle_t acl_handle); 344ce263fc8SMatthias Ringwald 34566a048abSMatthias Ringwald /** 34666a048abSMatthias Ringwald * @brief Report Extended Audio Gateway Error result codes in the AG. 34766a048abSMatthias Ringwald * Whenever there is an error relating to the functionality of the AG as a 34866a048abSMatthias Ringwald * result of AT command, the AG shall send +CME ERROR: 34966a048abSMatthias Ringwald * - +CME ERROR: 0 - AG failure 35066a048abSMatthias Ringwald * - +CME ERROR: 1 - no connection to phone 35166a048abSMatthias Ringwald * - +CME ERROR: 3 - operation not allowed 35266a048abSMatthias Ringwald * - +CME ERROR: 4 - operation not supported 35366a048abSMatthias Ringwald * - +CME ERROR: 5 - PH-SIM PIN required 35466a048abSMatthias Ringwald * - +CME ERROR: 10 - SIM not inserted 35566a048abSMatthias Ringwald * - +CME ERROR: 11 - SIM PIN required 35666a048abSMatthias Ringwald * - +CME ERROR: 12 - SIM PUK required 35766a048abSMatthias Ringwald * - +CME ERROR: 13 - SIM failure 35866a048abSMatthias Ringwald * - +CME ERROR: 14 - SIM busy 35966a048abSMatthias Ringwald * - +CME ERROR: 16 - incorrect password 36066a048abSMatthias Ringwald * - +CME ERROR: 17 - SIM PIN2 required 36166a048abSMatthias Ringwald * - +CME ERROR: 18 - SIM PUK2 required 36266a048abSMatthias Ringwald * - +CME ERROR: 20 - memory full 36366a048abSMatthias Ringwald * - +CME ERROR: 21 - invalid index 36466a048abSMatthias Ringwald * - +CME ERROR: 23 - memory failure 36566a048abSMatthias Ringwald * - +CME ERROR: 24 - text string too long 36666a048abSMatthias Ringwald * - +CME ERROR: 25 - invalid characters in text string 36766a048abSMatthias Ringwald * - +CME ERROR: 26 - dial string too long 36866a048abSMatthias Ringwald * - +CME ERROR: 27 - invalid characters in dial string 36966a048abSMatthias Ringwald * - +CME ERROR: 30 - no network service 37066a048abSMatthias Ringwald * - +CME ERROR: 31 - network Timeout. 37166a048abSMatthias Ringwald * - +CME ERROR: 32 - network not allowed – Emergency calls only 372a0ffb263SMatthias Ringwald * 373a0ffb263SMatthias Ringwald * @param bd_addr Bluetooth address of the HF 374a0ffb263SMatthias Ringwald * @param error 375ce263fc8SMatthias Ringwald */ 376d97d752dSMilanka Ringwald void hfp_ag_report_extended_audio_gateway_error_result_code(hci_con_handle_t acl_handle, hfp_cme_error_t error); 3779cae807eSMatthias Ringwald 37820b2edb6SMatthias Ringwald /** 37920b2edb6SMatthias Ringwald * @brief De-Init HFP AG 38020b2edb6SMatthias Ringwald */ 38120b2edb6SMatthias Ringwald void hfp_ag_deinit(void); 38220b2edb6SMatthias Ringwald 3833deb3ec6SMatthias Ringwald /* API_END */ 3843deb3ec6SMatthias Ringwald 385bc06f5acSMatthias Ringwald // testing 386bc06f5acSMatthias Ringwald hfp_ag_indicator_t * hfp_ag_get_ag_indicators(hfp_connection_t * hfp_connection); 38766a048abSMatthias Ringwald 3883deb3ec6SMatthias Ringwald #if defined __cplusplus 3893deb3ec6SMatthias Ringwald } 3903deb3ec6SMatthias Ringwald #endif 3913deb3ec6SMatthias Ringwald 3923deb3ec6SMatthias Ringwald #endif 393