蓝牙协议官方文档HFP v1.8 核心内容翻译解析

一、HFP协议简介

1.1 什么是HFP

HFP:蓝牙免提协议,整个文档主要定义了实现HFP的设备应使用的协议和实现步骤。这类设备最常见的例子是与手机一起使用的车载免提设备,或可穿戴无线耳机。协议定义了支持HFP的两个设备如何点对点交互。HFP通常使用于耳机,或嵌入式免提设备无线连接,手机用来作为音频输入和输出的基础,通过HFP实现典型的电话功能控制,但不操作实际的手机通话。

1.2 HFP协议依赖结构

1.3 HFP处于整个协议栈中的层级如下:

 1.4 HFP设备实现的连接结构及角色定义

Audio Gateway (AG)(音频网关): 音频网关的作用是用于输入和输出。作为音频网关的典型设备是手机

Hands-Free unit (HF)(免提设备):作为音频网关的远程音频输入和输出机制的设备。同时还具有远程控制AG端的能力。
1.5 HFP此协议可支持的feature
“M”表示强制支持“O”表示可选支持

  

以下列出了上面各个feature在HFP建立和各个信令交互阶段对于的使用

二、HFP协议信令交互

2.1 Service Level Connection(专指HFP服务级别的连接)建立和初始化
SLC只是一个泛指,并不是一个具体的连接或者AT指令,可以理解为HFP建立的一个阶段 ,SLC的建立依赖RFCOMM,在此之前需要L2CAP发起RFCOMM逻辑链路的建立,RFCOMM建立完成后进行SCL的初始化。
        协议规定首先需要HF端发送AT+BRSF来告知AG端HF所支持的features,AG端则通过+BRSF来告知对方自身所支持的feature,实现双方feature的交换。
如果双方的features中都支持编码协商,HF应该发送AT+BAC告诉AG端支持的编码list
        由于AG端可以有协议以外的指示器状态,在不确定AG端有支持哪些指示器的状态,协议规定HF端先通过 AT+CIND=? (AT Command: Get supported indicators)查询AG端支持的指示器状态,之后HF再通过 AT+CIND=?(AT Command: Get indicators' status)查询当前支持的指示器状态。紧接着HF通过AT+CMER(AT Command: Activates "indicator status reporting" )开启AG端的指示器状态报告,AG端回复“OK”后开启成功,例如在有来电的情况下,AG端会主动通过+CIEV..来更新通话状态给到HF端。并且HF端发送开启指示器状态报告更新后,AG端将一直保持启用,除非HF再次发送AT指令关闭或者hfp断开连接。
        CIND用来确认AG支持的指示器,在BRSF feature如果双方都支持HF Indicators ,HF将发送AT+BIND通知AG端HF所支持的指示器通知列表,然后通过AT+BIND=?再问询AG端所支持的HF哪些指示器类型。
        如果在BRSF交互AG和HFfeature时,双方都支持(Call waiting or 3-way calling:Supported)三方通话,HF端将发送AT+CHLD=?(    AT Command: Retrieve "Three way calling" Information
)来查询三方通话支持的信息,反之BRSF中feature有一方不支持,将不需要发出。
        在以上指令完成后,SLC完成初始化(类似以上几个AT指令,例如支持三方通话,则在AT+CHLD指令HF和AG交互完成后;不支持三方通话,则在AT+CMER指令HF和AG交互完成后)。

2.2 HFP链路断开和SLC释放

链路断开重新建立后,新的连接建立后HF应忽略上一次连接的+ciev等通话指示器状态。

SLC启用断开后,应立即断开L2CAP建立的相应的RFCOMM数据通道,如果是用户操作或者关闭蓝牙则启用断开释放流程,还有另一种场景在蓝牙存在sco通话链路时如果断开SCL,则需要在通话结束后AG端重新发起SLC的建立。

在SLC建立完成后,AG和HF进行一些信令交互

2.3 AG通过+CIEV发送注册状态

2.4 AG通过+CIEV发送信号强度

2.5 AG通过+CIEV发送漫游状态

 2.6 AG通过+CIEV发送电池电量

2.7 HF通过AT+COPS查询AG端运营商名称 
AT+COPS=3,0 设置长字母数字格式。长字母数字被定义为最多16个字符。值3无功能意义,作为第一个参数表示此命令只影响格式参数(第二个参数)。第二个参数0是将格式设置为“长字母数字”所需的值。
AT+COPS? 查询AG端运营商,通常抓包工具不显示中文,会解析乱码

HF端通过AT+CMEE开启/关闭AG端错误状态报告

2.8 AG端通过+CME ERROR: <err> 通知HF错误代码

 HF和AG建立SCO音频通话链路,双方都可以主动发起

2.9 AG通过CIEV更新call state

通话状态call state ,格式+CIEV: <ind>,<value>,call state指示器为1;主要用来告知HF端是否有通话的状态

CALL= 0  没有通话;CALL= 1  通话存在;(这里通常AG给的状态是+CIEV 1,1)

图4.9为HF端通过ATA接听接入的电话后,AG端+CIEV更新通话状态。

图4.10为AG端接听接入的电话

AG端挂断电话通话状态+CIEV:<CALL>,0

CALL= 0  没有通话;CALL= 1  通话存在;(这里通常AG给的状态是+CIEV 1,0)

图4.11为HF 发送AT+CHUP主动挂断电话

图4.12为AG端挂断电话

 电话通话阶段,AG端告知HF端通话的各个阶段

格式:+CIEV: <ind>,<value>
通常CALLSETUP指示器为2
0=没有需要状态呼叫设置的通话。
1=一个接入的电话正在进行中。
2=一个拨出的电话在呼叫中。
3=拨出的电话在响铃中。

通话呼叫保持指示器

+CIEV:<CallHeld Indicator>,<value>
0=没有保持的call
1=呼叫被保持或者活跃/保持的通话进行切换(AG存在active call和held call)
2=没有保持或者活跃的通话

2.10 HFP 音频连接设置

AG端触发连接:

 HF端触发连接:

HF端触发连接先由HF端通过AT+BCC触发AG端支持的编码器连接

 HFP AUDIO 编码协商以及SCO同步链路的建立

有几点值得注意:

1.应当都是由AG端主动发送+BCS选择编码,HF端回应AT+BCS指定的编码,AG端回复OK,完成协商,如果HF端回复的AT+BCS编码与AG端+BCS的编码不一致,则AG端回复ERROR

2.如果在AG端主动发送+BCS选择编码后,HF判断此时不支持该编码,HF回复AT+BAC,重新告诉AG端所支持的编码,AG端应重新开始+BCS编码协商,协商完成后编码一直有效,下一次sco连接无需重复协商

3.如果SCO同步连接已经建立完成,但是之前的编码协商建立失败,需要重新进行编码连接

4.选用msbc编码SCO建立连接基带层连接失败,则强制使用CVSD作为编解码器格式

对于接入来电的应答In-Band Ringing(AG和HF铃声同步)

如果不支持In-Band Ringing(AG和HF铃声同步)则应AG应持续发送ring给到HF端,让HF响铃,如果BRSF 交换feature时,支持inbandring,AG端应在响铃时建立sco去同步把铃声送到HF端。(关键区别在于支持的情况下会先建立audio sco通路,把AG铃声送到HF端,不支持则不需要再ring阶段建立sco,只发送ring给到HF端,HF端自己决定响铃类型)

2.11 BSIR 设置inbandring

在SCL建立之后去关闭inbandring

AG +BSIR 0  关闭,1开启

HF端AT指令 

以下指令交互流程简单,只写明概念

ATA   HF端接听电话指令

AT+CHUP  HF端挂断电话指令

ATD number  HF拨号

AT+BLDN  HF端回拨最后一通电话

AT+CCWA  HF端激活通话等待通知

2.12 三方通话,呼叫等待通知

已经存在一个call等待响应,此时另一个新的call加入,AG应当主动发送+CCWA和CIEV带有callsetup=1的状态通知到HF端,HF端如果拒接电话,应当发送AT+CHLD :0,同时AG端更新CIEV callsetup=0 挂断状态给到HF

如果HF选择接入call,HF应当发送AT+CHLD =1 or 2,HF不能仅使用一个AT+CHLD信令将waiting call切换成active call,可以使用AT+CHLD=2,接着发送AT+CHLD=3来实现

2.13 AT+CLIP 来电显示

HF端通过AT+CLIP= 1开启来电显示后,AG端需要在触发响铃时发送+CLIP通知HF端号码信息,一旦开启来电显示,就不会关闭,除非HF通过AT+CLIP=0来关闭

2.14 AT+NREC 噪音减弱和回声消除

如果AG端支持NREC,HF端也支持,则HF端应在建立sco连接前通过AT+NREC关闭AG端NREC,如果AG端在不支持NREC的情况下收到AT指令关系NREC,则会回复ERROR错误指示器代码,并且AT+NREC不支持参数1启用。

2.15 BVRA 语音识别

AT+BVRA= 1  HF端初始化启用语言识别,AG端应主动拉起sco,建立语音链路,个别厂商这里会定制仍然使用手机麦克风收音,不拉起sco

 AG端初始化启用语音识别+BVRA:1

 AG和HF端关闭BVRA

语音识别激活后协议交互流程

通过文本实现的语音识别交互

 2.16 BINP 添加语音识别号码用来语音拨号

 AT+BINP=1 HF端请求一个语音识别号码

+BINP: <Phone number> AG端回复+BINP携带一个号码

2.17 AT+VTS HF端启用运营商DTMF双音多频 

2.18 远程音频音量控制

VGS VGM

AG端可以通过+VGS:value 和+VGM:value  (value音量增益等级一般为0-15)来控制HF端扬声器和麦克风增益,该功能是否支持在AT+BRSF的features中体现

 音量同步

HF端通过AT+VGS:<value>;AT+VGM:<value>;来告知AG端HF端的音量增益等级,正常AG端的音量值会跟随该值变化

2.20 BRTH 暂停和激活call

BRTH:0 暂停当前通话的呼叫

 HF端发起暂停通话在协议中的交互流程

AG端触发流程

 重新接入挂起的call

AT+BTRH:1,HF端重新接入暂停的call,继续重新建立sco音频链路

AG端恢复挂起的call

HF端拒接挂起的call,这里也可以通过AT+CHUP挂断

AG端拒接挂起的call,直接+ciev 0更新到HF。对方挂断同样更新ciev 0

2.21 CNUM 查询本机号码

AG存在号码则正常通过+CNUM回应HF的AT+CNUM

 AG不存在,本机号码为空则直接回复ok

2.22 CLCC 通话状态查询

HF端主要获取AG端建立通话对方的number和通话状态,如果没有存在的通话,则AG端直接回复OK

2.23 CHLD 活跃挂起的call

AT+CHLD=1<idx>使对应的call active,AG响应ok后,通过ciev更新call状态

 AT+CHLD=2<idx> ,存在多方通话,只使指定的call变为active

 三 、AT指令HF端和AG端交互详细参数查询

ATA
Standard call answer AT command. 
ATDdd…dd;
Standard AT command intended for placing a call to a phone number. Only voice calls are covered in
ATD>nnn...;
Extension of the standard ATD command, intended for memory dialing. Only voice calls are covered
ERROR
Standard error indication code. It shall be issued on detection of any syntax, format or procedure
error condition. The “Mobile Equipment Error” report code “+CME ERROR:” is covered below. 
OK
Standard acknowledgement to the execution of a command. 
NO CARRIER, BUSY, NO ANSWER, DELAYED, BLACKLISTED
Extended response indication codes for AT commands. These codes shall be issued from the AG to
the HF as responses to AT commands from the HF to the AG or from the AG as unsolicited result
codes. These are in addition to the +CME ERROR: responses.
RING
Standard “incoming call” indication. 
AT+CCWA
Standard “Call Waiting notification” AT command. Within the
AT+CCWA=[<n>[,<mode>[,<class>]]]command, only enabling/disabling of the Call Waiting
notification unsolicited result code +CCWA , using the <n> parameter, is covered in this specification.
+CCWA
Standard “Call Waiting notification” unsolicited result code.
In the +CCWA result code only <number> and <type> parameters are covered in this specification.
Other parameters are not considered relevant in this specification and shall be ignored by the HF.
The <number> parameter shall be a text string and shall always be contained within double-quotes.
The <type> field specifies the format of the phone number provided, and can be one of the following
values:
values 128-143: The phone number format may be a national or international format, and may
contain prefix and/or escape digits. No changes on the number presentation are required.
values 144-159: The phone number format is an international number, including the country code
prefix. If the plus sign ("+") is not included as part of the number and shall be added by the AG as
needed.
values 160-175: National number. No prefix nor escape digits included.
AT+CHLD
Standard call hold and multiparty handling AT command. In the AT+CHLD=<n> command, this
specification only covers values for <n> of 0, 1, 1<idx>, 2, 2<idx>, 3 and 4, where:
-
0 = Releases all held calls or sets User Determined User Busy (UDUB) for a waiting call.
-
1 = Releases all active calls (if any exist) and accepts the other (held or waiting) call.
-
1<idx> = Releases call with specified index (<idx>).
-
2 = Places all active calls (if any exist) on hold and accepts the other (held or waiting) call.
-
2<idx> = Request private consultation mode with specified call (<idx>). (Place all calls on hold
EXCEPT the call indicated by <idx>.)
-
3 = Adds a held call to the conversation.
-
4 = Connects the two calls and disconnects the subscriber from both calls (Explicit Call Transfer).
Support for this value and its associated functionality is optional for the HF.
-
Where both a held and a waiting call exist, the above procedures shall apply to the waiting call
(i.e., not to the held call) in conflicting situation.
The test command AT+CHLD=? may be used for retrieving information about the call hold and
multiparty services available in the AG .
AT+CHUP
Standard hang-up AT command. Execution command causes the AG to terminate the currently active
call. This command shall have no impact on the state of a held call except in the use of rejecting a
call placed on hold by the Respond and Hold feature as defined in Section 4.30.6 .
AT+CHUP is also used as the command to reject any incoming call prior to answer.
AT+CIND
Standard indicator update AT command. Only read command AT+CIND? and test command
AT+CIND=? are required in this specification.
The AT+CIND? read command is used to get current status of the AG indicators.
The AG shall return all the indicators listed in the AT+CIND=? command.
The deactivation of any indicator(s) using AT+BIA command shall have no effect on the AG’s
response to the AT+CIND? read command.
The AT+CIND=? test command is used to retrieve the mapping between each indicator supported by
the AG and its corresponding range and order index. It shall be issued at least once before any other
command related to these indicators (AT+CIND? or AT+CMER) is used.
The Hands Free Profile specification limits the number of indicators returned by the AG to a maximum
of 20.
The following indicators are covered in this specification:
-
service: Service availability indication, where:
<value>=0 implies no service. No Home/Roam network available.
<value>=1 implies presence of service. Home/Roam network available.
-
call: Standard call status indicator, where:
<value>=0 means there are no calls in progress
<value>=1 means at least one call is in progress Hands-Free Profile / Profile Specification
-
callsetup: Bluetooth proprietary call set up status indicator 4 . Support for this indicator is optional
for the HF. When supported, this indicator shall be used in conjunction with, and as an extension
of the standard call indicator. Possible values are as follows:
<value>=0 means not currently in call set up.
<value>=1 means an incoming call process ongoing.
<value>=2 means an outgoing call set up is ongoing.
<value>=3 means remote party being alerted in an outgoing call.
-
callheld: Bluetooth proprietary call hold status indicator. Support for this indicator is mandatory for
the AG, optional for the HF. Possible values are as follows:
0= No calls held
1= Call is placed on hold or active/held calls swapped
(The AG has both an active AND a held call)
2= Call on hold, no active call
-
signal: Signal Strength indicator, where:
<value>= ranges from 0 to 5
-
roam: Roaming status indicator, where:
<value>=0 means roaming is not active
<value>=1 means a roaming is active
-
battchg: Battery Charge indicator of AG, where:
<value>=ranges from 0 to 5
+CIND
Standard list of current phone indicators. See Section 8.9 in [2] .
AT+CLCC
Standard list current calls command. See Section 7.18 in [2] .
+CLCC
Standard list current calls result code. See Section 7.18 in [2] .
Supported parameters are as follows:
-
idx= The numbering (starting with 1) of the call given by the sequence of setting up or receiving
the calls (active, held or waiting) as seen by the served subscriber. Calls hold their number until
they are released. New calls take the lowest available number.
4 This status indicator is not defined in the GSM 07.07 specification Hands-Free Profile / Profile
-
dir= 0 (outgoing), 1 (incoming)
-
status=
o 0 = Active
o 1 = Held
o 2 = Dialing (outgoing calls only)
o 3 = Alerting (outgoing calls only)
o 4 = Incoming (incoming calls only)
o 5 = Waiting (incoming calls only)
o 6 = Call held by Response and Hold
-
mode= 0 (Voice), 1 (Data), 2 (FAX)
-
mpty=
o 0 - this call is NOT a member of a multi-party (conference) call
o 1 - this call IS a member of a multi-party (conference) call
-
number (optional)
-
type (optional)
AT+COPS
The AT+COPS=3,0 shall be sent by the HF to the AG prior to sending the AT+COPS? command.
AT+COPS=3,0 sets the format of the network operator string to the long format alphanumeric.
The AT+COPS? command is used for reading network operator. This profile shall only support the
"reading" of the name of the network operator. The response to this command from the AG shall
return a +COPS:<mode>,<format>,<operator> where:
<mode> contains the current mode and provides no information with regard to the name of the
operator.
<format> specifies the format of the <operator> parameter string, and shall always be 0 for this
specification.
<operator> specifies a quoted string in alphanumeric format representing the name of the network
operator. This string shall not exceed 16 characters. See Section 7.3 in [2] .
AT+CMEE
Standard AT command used to enable the use of result code +CME ERROR: <err> as an indication
of an error relating to the functionality of the AG.
The set command AT+CMEE=1 is covered in this specification.
+CME ERROR
This is the Extended Audio Gateway Error Result Code response. Format of the response is:
+CME
ERROR: <err>. The format of <err> shall be numeric in this specification. The possible values for
<err> covered in this specification are described below. These error codes may be provided
of the standard ERROR response code to provide additional information to the HF. The ERROR
response code is still allowed while using the Extended Audio Gateway Error Result Codes.
+CME ERROR: 0 – AG failure
+CME ERROR: 1 – no connection to phone
+CME ERROR: 3 – operation not allowed
+CME ERROR: 4 – operation not supported
+CME ERROR: 5 – PH-SIM PIN required
+CME ERROR: 10 – SIM not inserted
+CME ERROR: 11 – SIM PIN required
+CME ERROR: 12 – SIM PUK required
+CME ERROR: 13 – SIM failure
+CME ERROR: 14 – SIM busy
+CME ERROR: 16 – incorrect password
+CME ERROR: 17 – SIM PIN2 required
+CME ERROR: 18 – SIM PUK2 required
+CME ERROR: 20 – memory full
+CME ERROR: 21 – invalid index
+CME ERROR: 23 – memory failure
+CME ERROR: 24 – text string too long
+CME ERROR: 25 – invalid characters in text string
+CME ERROR: 26 – dial string too long
+CME ERROR: 27 – invalid characters in dial string
+CME ERROR: 30 – no network service
+CME ERROR: 31 - network Timeout.
+CME ERROR: 32 – network not allowed – Emergency calls only
AT+CLIP
Standard “Calling Line Identification notification” activation AT command. It enables/disables the
Calling Line Identification notification unsolicited result code +CLIP. See Section 7.6 in [2] .
+CLIP
Standard “Calling Line Identification notification” unsolicited result code.
In the +CLIP: <number>, type> [,<subaddr>,<satype> [,[<alpha>] [,<CLI validity>]]] result code. Only
<number> and <type> parameters are covered in this specification. Other parameters are not
considered relevant in this specification and shall be ignored by the HF.
The <number> parameter shall be a text string and shall always be contained within double-quotes. Hands-Free Profile / Profile Specification
Bluetooth SIG Proprietary
Page 90 of 139
The <type> field specifies the format of the phone number provided, and can be one of the following
values:
-
values 128-143: The phone number format may be a national or international format, and may
contain prefix and/or escape digits. No changes on the number presentation are required.
-
values 144-159: The phone number format is an international number, including the country code
prefix. If the plus sign ("+") is not included as part of the number and shall be added by the AG as
needed.
-
values 160-175: National number. No prefix nor escape digits included.
-
AT+CMER
Standard event reporting activation/deactivation AT command.
In the AT+CMER=[<mode>[,<keyp>[,<disp>[,<ind> [,<bfr>]]]]] command, only the <mode>, and <ind>
parameters are relevant for this specification. Only their values <mode>=(3) and <ind>=(0,1) are
covered in this specification. See Section 8.10 in [2] .
The following examples show how the AT+CMER command may be used for activating or
deactivating the “indicator events reporting” result code:
AT+CMER=3,0,0,1 activates “indicator events reporting”.
AT+CMER=3,0,0,0 deactivates “indicator events reporting”.
+CIEV
Standard “indicator events reporting” unsolicited result code.
In the +CIEV: <ind>,<value> result code, only the indicators stated in the AT+CIND command above
are relevant for this specification where:
-
<ind>: Order index of the indicator within the list retrieved from the AG with the AT+CIND=?
command. The first element of the list shall have <ind>=1.
-
<value>: current status of the indicator.
If the HF receives any unknown indicator or value, it shall ignore it.
See Section 8.10 in [2] .
AT+VTS
Standard DTMF generation AT command. Only the AT+VTS=<DTMF> command format is covered in
this specification.
See Annex C.2.11 in [2] .
AT+CNUM
Syntax:
AT+CNUM
(Retrieve Subscriber Number Information)
AT+CNUM=?
(Test Subscriber Number Information – Not Implemented)
Description: Hands-Free Profile / Profile Specification
Bluetooth SIG Proprietary
Page 91 of 139
Command issued by HF for the “Subscriber Number Information” feature in the AG.
Only the action command AT+CNUM format is used.
+CNUM
Syntax:
+CNUM: [<alpha>],<number>, <type>,[<speed> ,<service>] (Response for AT+CNUM)
Description:
Standard Response used for sending the “Subscriber Number Information” from AG to HF.
The AG shall send the +CNUM: response for the AT+CNUM from the HF.
Values:
-
<alpha>: This optional field is not supported, and shall be left blank.
-
<number>: Quoted string containing the phone number in the format specified by <type>.
-
<type> field specifies the format of the phone number provided, and can be one of the following
values:
-
values 128-143: The phone number format may be a national or international format, and may
contain prefix and/or escape digits. No changes on the number presentation are required.
-
values 144-159: The phone number format is an international number, including the country code
prefix. If the plus sign ("+") is not included as part of the number and shall be added by the AG as
needed.
-
values 160-175: National number. No prefix nor escape digits included.
-
<speed>: This optional field is not supported, and shall be left blank.
-
<service>: Indicates which service this phone number relates to. Shall be either 4 (voice) or 5
(fax).
Example:
+CNUM: ,"5551212",129,,4
See section 7.1 in [2] .
AT+BIA (Bluetooth Indicators Activation)
Syntax : AT+BIA=[[<indrep 1>][,[<indrep 2>][,…[,[<indrep n>]]]]]]
Description :
Activates or deactivates the indicators individually. The mapping of the indicators is given by the
“AT+CIND=?” test command (See Section 4.33.2 in [1] )
< indrep x >: reporting state of the indicator x. 1 to activate, 0 to deactivate.
If an indicator state is omitted between commas, the current reporting state of that indicator shall
not change. For example, if the HF sends the command “AT+BIA=,1,,0” only the second and
fourth indicators may be affected. The reporting state of indicators one and three shall remain
unchanged.
If the AG supports more indicators than the number of indicator-reporting-states provided by the
HF, the AG shall maintain the current reporting states of those indicators. For example, if the AG
supports five indicators and the HF sends the command “AT+BIA=1,0,1“ then only the first three
AG indicators may be affected by the command.
Call, Call Setup, and Held Call indicators have been defined as mandatory indicators. This
implies that whatever the reporting state the HF gives, these indicators shall always been kept
activated by the AG.
The AG shall gracefully ignore any excess parameter(s) at the end.
The AG shall silently ignore a request to deactivate a mandatory indicator.
The previous three points allow the HF to activate or deactivate all the indicators, except the
mandatory ones, by using a fixed string.
For example, if the maximum indicator count is 20:
All indicators can be set to active by using the fixed string:
AT+BIA=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
and to inactive (except for the always active ones) by using:
AT+BIA=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
The actual number of allowed indicators is defined by the AT+CIND command.
AT+BINP (Bluetooth INPut)
Syntax: AT+BINP=<datarequest>
Expected response: +BINP: <dataresp 1 >…<dataresp n > Hands-Free Profile / Profile
Description:
Command used for requesting some specific data input from the AG 5 . On reception of this
command the AG shall perform the proper actions such that the requested information is sent
back to the HF using the +BINP response.
The type of data the HF shall expect in the <dataresp> parameter returned by the AG depends on
the information requested in each case.
Only support for execution command is mandated. Neither the read nor test commands are
mandatory.
Values:
<datarequest>: 1, where
1 = Phone number corresponding to the last voice tag recorded in the HF.
<dataresp1..n>: Data parameters returned by the AG. Their contents depend on the value of the
<datarequest> parameter as follows:
<datarequest> value
<dataresp> parameters
1
<Phone number>:
Phone number string (max. 32 digits). The format (type of address)
of the phone number string shall conform with the rules stated in
[7] , sub-clause 10.5.4.7, for a value (in integer format) of the type
of address octet of 145, if dialing string includes international
access code character “+”, and for a value of 129 otherwise.
AT+BLDN (Bluetooth Last Dialed Number)
Syntax: AT+BLDN
Description:
Command used for calling the last phone number dialed. On reception of this command, the AG
shall set up a voice call to the last phone number dialed.
Only support for execution command is mandated. Neither the read nor test commands are
mandatory.
AT+BVRA (Bluetooth Voice Recognition Activation)
Syntax: AT+BVRA=<vrec>
Description:
Enables/disables the voice recognition function in the AG. If the Enhanced Voice Recognition
Status feature is supported, this command is used to indicate to the AG that the HF is ready to
render audio output.
Only support for execution command is mandated. Neither the read nor test commands are
mandatory. If the Enhanced Voice Recognition Status feature is supported, the AG shall only
5 AT+BINP was created with future extensibility in mind. While the Hands-Free Profile only specifies a <datarequest> value of 1 (i.e.,
phone number), future profiles may choose to add values for <datarequest> to support the retrieval of additional data from the AG. Hands-Free Profile / Profile Specification
Bluetooth SIG Proprietary
Page 95 of 139
transmit audio to the HF if the AG has previously received AT+BVRA=2 from the HF and an
eSCO link has been established.
The value 2 shall only be used if both the AG and the HF support the Enhanced Voice
Recognition Status feature.
Values:
<vrec>: 0, 1, or 2, entered as integer values, where
0 =
Disable Voice recognition in the AG.
If the Enhanced Voice Recognition Status feature is supported, this value terminates
the current VR session.
If the Enhanced Voice Recognition Status feature is supported, this value may also
be used to refuse the +BVRA=1 request from the AG to start a new VR session.
1 = Enable voice recognition in the AG.
2 = This value shall only be used if both the AG and the HF support the Enhanced Voice
Recognition Status feature. This value indicates that the HF is ready to accept audio when
the Audio Connection is first established. The HF shall only send this value if the eSCO link
has been established.
The HF may send this value during an ongoing VR session to terminate audio output from the
AG (if there is any) and prepare the AG for new audio input.
+BVRA (Bluetooth Voice Recognition Activation)
Syntax: +BVRA: <vrect> [,<vrecstate>][,<textualRepresentation>]
Description:
Unsolicited result code used to notify the HF when the voice recognition function in the AG is
activated/deactivated autonomously from the AG. If the Enhanced Voice Recognition Status
feature is supported, then this value is also used to indicate state changes in the AG´s voice
recognition engine.
The unsolicited +BVRA: 1 result code shall not be sent by the AG to the HF if the corresponding
voice recognition activation has been initiated by the HF. Likewise, the unsolicited +BVRA: 0
result code shall not be sent by the AG to the HF if the corresponding voice recognition
deactivation has been initiated by the HF, regardless of which side initiated the voice recognition
activation.
If the Enhanced Voice Recognition Status feature is supported, the AG shall only transmit audio
to the HF if the AG has previously received AT+BVRA=2 from the HF and an eSCO link has been
established.
Values:
<vrect>: 0, entered as integer value, where
0 = Voice recognition is disabled in the AG
1 = Voice recognition is enabled in the AG Hands-Free Profile / Profile Specification
<vrecstate>:
Bitmask that reflects the current state of the voice recognition engine on the AG. When there is no active
voice recognition session, Bit 0 shall be set to 0. If Bit 0 is set to 0, all other bits shall be set to 0.
The <vrecstate> shall be present if both the AG and HF support the Enhanced Voice Recognition Status
feature; otherwise, it shall not be present.
<textualRepresentation>: <textID>,<textType>,<textOperation>,<string>
The textualRepresentation shall only be present if both the AG and HF support the Voice Recognition
Text feature.
<textID>: Unique ID of the current text as a hexadecimal string (a maximum of 4 characters in length, but
less than 4 characters in length is valid). TextID shall change if the textType has changed. Each textID
value shall be unique for a VR session. TextID values shall not be valid across VR sessions.
<textType>: ID of the textType from the following list:
<string>: The <string> parameter shall be a UTF-8 text string and shall always be contained within double
quotes. The length of the string depends on the implementation.
The following example of a +BVRA command contains a textual representation of the sentence “Message
to Melissa.” In the example, the state of the voice recognition engine accepts further audio input, the
textID is 12AB, the textType is ‘recognized text from audio input’ and the operation is
+BVRA: 1,1,12AB,0,1,“Message to Melissa”
AT+BRSF (Bluetooth Retrieve Supported Features)
Syntax: AT+BRSF=<HF supported features bitmap>
Description:
Notifies the AG of the supported features available in the HF, and requests information about the
supported features in the AG. The supported features shall be represented as a decimal value.
Values:
<HF supported features bitmap>: a decimal numeric string, which represents the value of a 32 bit
unsigned integer. The 32 bit unsigned integer represents a bitmap of the supported features in
the HF as follows:
+BRSF (Bluetooth Retrieve Supported Features)
Syntax: +BRSF: <AG supported features bitmap>
Description:
Result code sent by the AG in response to the AT+BRSF command, used to notify the HF what
features are supported in the AG. The supported features shall be represented as a decimal
Values:
<AG supported features bitmap>: a decimal numeric string, which represents the value of a 32 bit
unsigned integer. The 32 bit unsigned integer represents a bitmap of the supported features in
the AG as follows:
AT+NREC (Noise Reduction and Echo Canceling)
Syntax: AT+NREC=<nrec>
Description:
Command issued to disable any Echo Canceling and Noise Reduction functions embedded in the
AG.
Only support for execution command is mandated. Neither the read nor test commands are
mandatory.
Values:
<nrec>: 0, entered as integer value, where
0 = Disable EC/NR in the AG
AT+VGM (Gain of Microphone) Hands-Free Profile / Profile Specification
Syntax: AT+VGM=<gain>
Description:
Command issued by the HF to report its current microphone gain level setting to the AG. <gain>
is a decimal numeric constant, relating to a particular (implementation dependent) volume level
controlled by the HF. This command does not change the microphone gain of the AG; it simply
indicates the current value of the microphone gain in the HF.
Only support for execution command is mandated. Neither the read nor test commands are
mandatory.
Values:
<gain>: 0 -15, entered as integer values, where
0 = Minimum gain
15 = Maximum gain
AT+VGS (Gain of Speaker)
Syntax: AT+VGS=<gain>
Description:
Command issued by the HF to report its current speaker gain level setting to the AG. <gain> is a
decimal numeric constant, relating to a particular (implementation dependent) volume level
controlled by the HF. This command does not change the speaker gain of the AG; it simply
indicates the current value of the speaker volume in the HF.
Only support for execution command is mandated. Neither the read nor test commands are
mandatory.
Values:
<gain>: 0 -15, entered as integer values, where
0 = Minimum gain
15 = Maximum gain
+VGM (Gain of Microphone)
Syntax: +VGM:<gain>
Description:
Unsolicited result code issued by the AG to set the microphone gain of the HF. <gain> is a
decimal numeric constant, relating to a particular (implementation dependent) volume level
controlled by the HF.
Due to the small inconsistency between the GSM standard [2] ) and the current Headset
specification ( [3] ), the HF shall also accept the “=” symbol, in place of “:”, as a valid separator for
this unsolicited result code.
Values:
<gain>: 0 -15, integer values, where Hands-Free Profile / Profile Specification
0 = Minimum gain
15 = Maximum gain
+VGS (Gain of Speaker)
Syntax: +VGS:<gain>
Description:
Unsolicited result code issued by the AG to set the speaker gain of the HF. <gain> is a decimal
numeric constant, relating to a particular (implementation dependent) volume level controlled by
the HF.
Due to the small inconsistency between the GSM 07.07 standard ( [2] ) and the current Headset
specification [3] ), the HF shall also accept the “=” symbol, in place of “:”, as valid separator for this
unsolicited result code.
Values:
<gain>: 0 -15, integer values, where
0 = Minimum gain
15 = Maximum gain
+BSIR (Bluetooth Setting of In-band Ring tone)
Syntax: +BSIR: <bsir>
Description:
Unsolicited result code issued by the AG to indicate to the HF that the in-band ring tone setting
has been locally changed. The HF may react accordingly by changing its own alert method.
Values:
<bsir>: 0 = the AG provides no in-band ring tone
1 = the AG provides an in-band ring tone
AT+BTRH (Bluetooth Response and Hold Feature)
Syntax:
AT+BTRH=<n> (Set command)
AT+BTRH?
(Read Current Status)
Description:
Command issued by the HF for the “Response and Hold” feature in the AG.
This specification defines the use of the set and read command. The AT+BTRH? command shall
be used by the HF to query the current “Response and Hold” state of the AG.
Values:
<n>: 0, 1, 2 entered as integer values, where
0 = Put Incoming call on hold Hands-Free Profile / Profile Specification
1 = Accept a held incoming call
2 = Reject a held incoming call
+BTRH (Bluetooth Response and Hold Feature)
Syntax: +BTRH: <n>
(Response for AT+BTRH)
Description:
Result code used to notify the HF whenever the incoming call is either put on hold or accepted or
rejected. The AG shall also respond back with this response for the AT+BTRH? command from
the HF.
Values:
<n>: 0,1,2 entered as integer value, where
0 = Incoming call is put on hold in the AG
1 = Held incoming call is accepted in the AG
2 = Held incoming call is rejected in the AG
AT+BCC (Bluetooth Codec Connection)
Syntax: AT+BCC
Description:
This command is used by the HF to request the AG to start the codec connection procedure.
AT+BCS (Bluetooth Codec Selection)
Syntax: AT+BCS= <u>
(u is a Codec ID)
Description:
This command confirms the codec to the remote device (AG), and implicitly also which
synchronization protocol, will be used on the synchronous connection.
If no value is included, the command is invalid.
Values:
<u>: All possible Codec IDs, see definition of AT+BAC.
+BCS (Bluetooth Codec Selection)
Syntax: +BCS: <u> (u is a codec ID)
Description:
This command informs the codec to the remote device (HF), and implicitly also which
synchronization protocol, will be used on the synchronous connection.
Values:
<u>: All possible Codec IDs, see definition of AT+BAC.
AT+BAC (Bluetooth Available Codecs)
Syntax: AT+BAC= [<u1>[,<u2>[,...[,<un>]]]] (u1,u2, ..., un are a codec IDs) Hands-Free Profile /
Description:
This command informs the remote device (AG) about what codecs (see Table 3.3 ) the HF
supports.
The Codec ID for the mandatory narrow band codec (CVSD) shall always be included.
If wide band speech is supported, then the mandatory codec (mSBC) shall be included unless it
is temporarily unavailable.
Any other optional wide band speech codecs may also be included in this list as long as the
mandatory codec is included first.
Values:
<u>: All possible Codec IDs. Codec IDs shall be transferred as string representations of decimal
numbers. The format of the Codec IDs is 8 bit aliases that are defined in Section 10 (Appendix B:
Codec IDs). For a single codec with ID=12 and the mandatory default codecs (1 and 2), the
command:
AT+BAC=1,2,12
is sent.
AT+BIND (Bluetooth HF Indicators Feature)
Syntax:
AT+BIND= <a>,<b>,<c>,...,<n>
(List HF supported indicators)
AT+BIND=? (Read AG supported indicators)
AT+BIND? (Read AG enabled/disabled status of indicators)
Description:
This command enables the HF to notify the AG which HF to AG indicators are supported. The
indicators may be enabled or disabled.
The AT+BIND commands shall not be used unless both AG and HF BRSF bits for the ‘HF Indicators’
feature are set to one.
Values :
<a> ... <n>: 0-65535, entered as decimal unsigned integer values without leading zeros,
referencing an HF indicator assigned number. Values are defined on the Bluetooth SIG Assigned
Numbers [10] web page. The maximum number of indicator assigned numbers in the request
shall be 20.
+BIND (Bluetooth HF Indicators Feature)
Syntax:
+BIND: (<a>,<b>,<c>,...,<n>)
(Response to AT+BIND=?)
+BIND: <a>,<state> (Unsolicited or Response to AT+BIND?)
Description: Hands-Free Profile / Profile Specification
Bluetooth SIG Proprietary
Page 103 of 139
This response enables the AG to notify the HF which HF indicators are supported and their state,
enabled or disabled.
The +BIND responses shall not be used unless both AG and HF BRSF bits for the ‘HF Indicators’
feature are set to one.
When responding to the AT+BIND? command, the AG shall send one or more +BIND responses
followed by OK to terminate the list.
Values:
<a> ... <n>: 0-65535, entered as decimal unsigned integer values without leading zeros,
referencing an HF indicator assigned number. Values are defined on the Bluetooth SIG Assigned
Numbers [10] web page. The maximum amount of indicator assigned numbers in the request
shall be 20.
<state>: 0-1, entered as integer values, where
0 = Indicator is disabled, no value changes shall be sent for this indicator
1 = Indicator is enabled, value changes may be sent for this indicator
AT+BIEV (Bluetooth HF Indicators Feature)
Syntax:
AT+BIEV= <assigned number>,<value>
(Update value of indicator)
Description:
This command enables the HF to send updated values of the enabled HF indicators to the AG.
The AT+BIEV command shall not be used unless both AG and HF BRSF bits for the ‘HF
Indicators’ feature are set to one.
Values:
<assigned number>: 0-65535, entered as a decimal unsigned integer without leading zeros,
referencing an HF indicator assigned number. Values are defined on the Bluetooth SIG Assigned
Numbers [10] web page.
<value> 0 to 4,294,967,295, entered as a decimal unsigned integer without leading zeros. The
meaning of the value depends of the <assigned number> and is defined on the Bluetooth SIG
Assigned Numbers [10] web page.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值