1.概述
HFP(Hands-free Profile),可以让蓝牙设备可以控制电话,如接听、挂断、拒接、语音拨号等,拒接、语音拨号要视蓝牙耳机及电话是否支持。
HFP定义了音频网关(AG)和免提组件(HF)两个角色:
AG–该设备为音频(特别是手机)的输入/输出网关。
HF–该设备作为音频网关的远程音频输入/输出机制,并可提供若干遥控功能。
HFP的协议栈如下:

2.Feature和Procedure
HFP必须支持下表列出的一些Feature:

这些feature通过一些procedure来实现,比如1中的connection management包括Service Level Connection establishment和Service Level Connection release这两个procedure。其余可以参考HFP的Spec。
HFP支持的Codec如下表:

对应的Link如下所示:

3.HFP的一些procedure
(1)Service Level Connection Establishment
首先必须建立RFCOMM connection,然后开始Service Level Connection Initialization,流程如下:

(2)Service Level Connection Release

(3)Transfer of Registration Status

Transfer of Signal Strength Indication:

其余还有很多,如Transfer of Battery Level Indication of AG,Query Operator Selection,Report Extended Audio Gateway Error Results Code等可以参考HFP的Spec。
附:两种audio的codec
CVSD: pcm: 8kHz, 16 bits, 1 channel.
compression ratio: 16 (controller encoding)
insert ratio: 8
pcm data rate= 16kB/s =8K*16/8
CVSD data rate=8kB/s =16kB/s* 8/16
air data: CVSD
mSBC: pcm 16kHz, 16 bits, 1 channel.
compression ratio: 4 (host encoding: 240->60)
pcm data rate= 32kB/s
mSBC data rate=8kB/s = 32kB/s / 4
air data: transparent data (mSBC)