1. 程式人生 > >藍芽 寬頻通話 (wide band speech)WBS 剖析(一) -- profile層

藍芽 寬頻通話 (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舉例)