# 执行蓝牙 HFP 音频网关功能

Source: [https://docs.qualcomm.com/doc/80-70017-13SC/topic/perform-bluetooth-hfp-ag-functions.html](https://docs.qualcomm.com/doc/80-70017-13SC/topic/perform-bluetooth-hfp-ag-functions.html)

可以使用 `hfp_ag_menu` 选项执行 HFP 音频网关功能。

开始之前，请设置设备并转至如[设置设备的 HFP 功能](https://docs.qualcomm.com/doc/80-70017-13SC/topic/set-up-hfp.html#hfp-set-up__section_w52_kvd_lcc_navyanka_08-19-24-1310-42-670)中所述的 HFP 音频网关菜单。

## 连接至音频网关

要连接到音频网关，请运行以下命令：

    connect <bt_address>Copy to clipboard

**参数**

`<bt_address>` 是远程设备的蓝牙地址。

**示例**

要连接到具有蓝牙地址 `20:19:d8:36:90:40` 的远程设备，请运行以下命令：

    connect 20:19:d8:36:90:40Copy to clipboard

**示例输出**

connect 20:19:d8:36:90:40
    HandleHfpAGConnand cnd_id = 22
     BtHfpAgMsgHandler event = 687
     AG: Processing event = 687
    state_disconnected_handler Processing event 687
    connecting with device 28:19:d8:36:90:40 BtHfpAgMsgHandler event = 629 
     AG: Processing event = 629
    state_pending_handler Processing event 629
    connected with device 20:19:d8:36:90:48 wbs_callback
     BtHfpAgMsgHandler event = 654
     AG: Processing event = 654
    state_connected_handler Processing event = 65Wat_cind_callback
     BtHfpAgMsgHandler event = 657
     AG: Processing event = 657
    state_connected_handler Processing event = 657Sending CIND resp to device 20:19:d8:36:90:40 
     BtHfpAgMsgHandler event = 630
     AG: Processing event = 630
    state_connected_handler Processing event = 630SLC connected with device 28:19:d8:36:90:40 noice_reduction_callback 
     BtHfpAgMsgHandler event = 653 
     AG: Processing event = 653
    state_connected_handler Processing event = 653volune_control_callback : speaker volume is 12
     BtHfpAgMsgHandler event = 650
     AG: Processing event = 650
    state_connected_handler Processing event = 650unknown_at_callback
     BtHfpAgMsgHandler event = 660
     AG: Processing event = 660
    state_connected_handler Processing event = 660unknown_at_callback
     BtHfpAgMsgHandler event = 668
     AG: Processing event = 668
    state_connected_handler Processing event = 668at_clcc_callback
     BtHfpAgMsgHandler event = 659
     AG: Processing event = 659
    state_connected_handler Processing event = 659Sending CLCC resp to device 20:19:d8: 36:90:40unknown_at_callback
     BtHfpAgMsgHandler event = 660
     AG: Processing event = 660Copy to clipboard

## 断开音频网关

要断开音频网关，请运行以下命令：

    disconnect <bt_address>Copy to clipboard

**参数**

`<bt_address>` 是远程设备的蓝牙地址。

**示例**

请运行以下命令，以便断开蓝牙地址为 `20:19:d8:36:90:40` 的远程设备：

    disconnect 20:19:d8:36:90:40Copy to clipboard

**示例输出**

disconnect 20:19:d8:36:90:40
    HandleHfpAGComnand cnd_id = 23
     BtHfpAgMsgHandler event = 688
     AG: Processing event = 608
    state_connected_handler Processing event = 688Disconnecting with device 20:19:d8:36:90:40 BtHfpAgMsgHandler event = 632
     AG: Processing event = 632
    state_pending_handler Processing event 632
    
    Disconnected from or Unable to connect with device 20:19:d8:36:90:40 Wrong option selectedCopy to clipboard

**上一级主题：** [免提配置文件](https://docs.qualcomm.com/doc/80-70017-13SC/topic/set-up-hfp.html)

Last Published: Jan 23, 2025

[Previous Topic
执行蓝牙 HFP 客户端功能](https://docs.qualcomm.com/bundle/publicresource/80-70017-13SC/topics/perform-bluetooth-hfp-client-functions.md) [Next Topic
调试](https://docs.qualcomm.com/bundle/publicresource/80-70017-13SC/topics/bt_debugging.md)