蓝牙 宽带通话 (wide band speech)WBS 剖析 -- profile层
Posted Wireless_Link
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了蓝牙 宽带通话 (wide band speech)WBS 剖析 -- profile层相关的知识,希望对你有一定的参考价值。
一.概述
WBS(wide band speech)通俗来讲就是蓝牙宽带通话,通话数据frequency 16K,采用msbc编解码(chip中实现)和NBS(narrow band speech)相对,NBS通俗来讲是窄带通话,通话数据frequency 8K,采用CSVD编解码(chip中实现)
NBS是默认
二.实现
要实现WBS,总体来说比较复杂要分两个阶段进行:
1.profile层(HFP AT COMMAND)
2.control bluetooth chip(如 CSR 通过 BCCMD)
三.profile层实现:
步骤:1.First, in the initialization procedure, the HF shall send the AT+BRSF=<HF supported features>
command to the AG to both notify the AG of the supported features in the HF, as well as to
retrieve the supported features in the AG using the +BRSF result code.
2.Secondly, in the initialization procedure, if the HF supports the Codec Negotiation feature, it
shall check if the AT+BRSF command response from the AG has indicated that it supports the
Codec Negotiation feature. If both the HF and AG do support the Codec Negotiation feature
then the HF shall send the AT+BAC=<HF available codecs> command to the AG to notify the
AG of the available codecs in the HF.
HF Feature:
AG Feature:
3.通话时,AG会发送过来+BCS=ID
我们回复AT+BCS=ID
四.流程图:
实例:
这样接受了SCO连接,相当于profile层面启动了WBS
通过空中包分析发现编码方式确实变成了msbc
通常这时候要把MIC,PCM_IN,PCM_OUT,SPEAKER切换成16K
但是现在问题来了,切换16K后为什么还全都是杂音呢?
揭晓答案:
HFP profile层面只是通知手机要进行WBS通话了,但是local chip并不知道,也不会解析HFP层面的AT command
所以我们应该有一些机制告知chip一些消息,如CSR 需要 BCCMD告知,每个chip厂商都有自己的策略
由于告知芯片这个过程比较复杂,所以在下篇文章介绍(拿CSR举例)
以上是关于蓝牙 宽带通话 (wide band speech)WBS 剖析 -- profile层的主要内容,如果未能解决你的问题,请参考以下文章
Python使用Speech_Recognition实现普通话识别
Microsoft Band 2 + UWP + 后台任务 => 尝试获取蓝牙设备服务时出错
2000_narrowband to wideband conversion of speech using GMM based transformation