cancel
Showing results for 
Search instead for 
Did you mean: 

Studio Bluetooth

oxz1918
New Contributor II

Hi, 

We use custom board as MCU with Bluetooth host running on it.  Cypress CYBT_343026_EVAL connect with the MCU  and run as a controller.

Our question is how to configure the SCO offload funtion?  We have worked on this issue for  a long time ,but not any progress.

Could  anybody help us to check the issue?  Thank you very much!

0 Likes
10 Replies
Owen_Zhang123
Moderator
Moderator

Please try to use the vendor command Write_SCO_PCM_Int_Param to route the SCO data to HCI:

Owen_Zhang123_0-1632723217343.png

 

0 Likes
oxz1918
New Contributor II

我看到你用中文回复过帖子,方便起见我就用中文了。

这条HCI命令我们试过了,没有任何效果,看不到任何的音频数据传输。下面是我们当时试的命令:

09/23/21 19:30:23.883 com6@115200 c> Write_SCO_PCM_Int_Param
HCI Command
com6@115200
[1C FC 05 ]: 01 00 00 00 00
opcode = 0xFC1C (64540, "Write_SCO_PCM_Int_Param")
SCO_Routing = 0x1 (1, "Transport")
PCM_Interface_Rate = 0x0 (0, "128 KBps")
Frame_Type = 0x0 (0, "Short")
Sync_Mode = 0x0 (0, "Slave")
Clock_Mode = 0x0 (0, "Slave")


09/23/21 19:30:23.904 com6 HCI Command Complete Event
com6@115200
[0E 04 ]: 01 1C FC 00
event = 0x0E (14,"Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0xFC1C (64540, "Write_SCO_PCM_Int_Param")
Status = 0x0 (0, "Success", "Success")

这个SCO offload功能对我们目前产品开发非常重要,请一定帮忙看看这个问题,非常感谢!

如果可以的话,我们能邮件或者电话交流吗?这样能快一些!

 

0 Likes
Owen_Zhang123
Moderator
Moderator

有没有设置过voice setting?

38:09.017 com18 c> Write_Voice_Setting Input_Coding: Linear
HCI Command
com18@115200
[26 0C 02]: 60 00
opcode = 0xC26 (3110, "Write_Voice_Setting")
Input_Coding = 0x0 (0, "Linear")
Input_Data_Format = 0x1 (1, "2's complement")
Sample_Size = 0x1 (1, "16-bit")
Linear_PCM_Bit_Pos = 0x0 (0)
Air_Coding_Format = 0x0 (0, "CVSD")

38:09.026 com18 <c Write_Voice_Setting
HCI Command Complete Event
com18@115200
[0E 04]: 01 26 0C 00
event = 0xE (14, "Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0xC26 (3110, "Write_Voice_Setting")
Status = 0x0 (0, "Success")

 

0 Likes
oxz1918
New Contributor II

按照你的方法,我们设置了voice setting,目前还是看不到SCO数据传到host。我们用A2DP做了对比测试,A2dP的数据可以发送到host, 但是HFP就看不到任何数据。 下面是几个场景的HCI log信息,请帮忙看看哪里有问题,感谢。

1. voice setting

< HCI Command: Read Voice Setting (0x03|0x0025) plen 0 #62 0.000000
> HCI Event: Command Complete (0x0e) plen 6 #63 0.000000
Read Voice Setting (0x03|0x0025) ncmd 1
Status: Success (0x00)
Setting: 0x0060
Input Coding: Linear
Input Data Format: 2's complement
Input Sample Size: 16-bit
# of bits padding at MSB: 0
Air Coding Format: CVSD


< HCI Command: Vendor (0x3f|0x001c) plen 5 #64 0.000000
01 00 00 00 00 .....
> HCI Event: Command Complete (0x0e) plen 4 #65 0.000000
Vendor (0x3f|0x001c) ncmd 1
Status: Success (0x00)

2.  A2DP  音乐播放
> ACL Data RX: Handle 12 flags 0x02 dlen 136 #967 0.000000
Channel: 66 len 132 [PSM 25 mode 0] {chan 2}
> ACL Data RX: Handle 12 flags 0x02 dlen 136 #968 0.000000
Channel: 66 len 132 [PSM 25 mode 0] {chan 2}
> ACL Data RX: Handle 12 flags 0x02 dlen 136 #969 0.000000
Channel: 66 len 132 [PSM 25 mode 0] {chan 2}
> ACL Data RX: Handle 12 flags 0x02 dlen 136 #970 0.000000
Channel: 66 len 132 [PSM 25 mode 0] {chan 2}
> ACL Data RX: Handle 12 flags 0x02 dlen 136 #971 0.000000
Channel: 66 len 132 [PSM 25 mode 0] {chan 2}

3.  HFP 电话响铃

< HCI Command: Accept Synchronous Connection Request (0x01|0x0029) plen 21 #1011 0.000000
Address: 14:96:E5:53:58:5A (OUI 14-96-E5)
Transmit bandwidth: 8000
Receive bandwidth: 8000
Max latency: 12
Setting: 0x0060
Input Coding: Linear
Input Data Format: 2's complement
Input Sample Size: 16-bit
# of bits padding at MSB: 0
Air Coding Format: CVSD
Retransmission effort: Optimize for link quality (0x02)
Packet type: 0x0388
EV3 may be used
3-EV3 may not be used
2-EV5 may not be used
3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4 #1012 0.000000
Accept Synchronous Connection Request (0x01|0x0029) ncmd 1
Status: Success (0x00)
> HCI Event: Synchronous Connect Complete (0x2c) plen 17 #1013 0.000000
Status: Success (0x00)
Handle: 6
Address: 14:96:E5:53:58:5A (OUI 14-96-E5)
Link type: eSCO (0x02)
Transmission interval: 0x0c
Retransmission window: 0x04
RX packet length: 60
TX packet length: 60
Air mode: CVSD (0x02)
> ACL Data RX: Handle 12 flags 0x02 dlen 16 #1014 0.000000
Channel: 64 len 12 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x0b cr 1 dlci 0x02
Control: 0xef poll/final 0
Length: 8
FCS: 0x9a
0d 0a 52 49 4e 47 0d 0a 9a ..RING...
< HCI Command: Host Number of Completed Packets (0x03|0x0035) plen 5 #1015 0.000000
Num handles: 1
Handle: 12
Count: 1
< ACL Data TX: Handle 12 flags 0x00 dlen 9 #1016 0.000000
Channel: 80 len 5 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x09 cr 0 dlci 0x02
Control: 0xff poll/final 1
Length: 0
FCS: 0x5c
Credits: 3
5c \
> HCI Event: Number of Completed Packets (0x13) plen 5 #1017 0.000000
Num handles: 1
Handle: 12
Count: 1
> ACL Data RX: Handle 12 flags 0x02 dlen 16 #1018 0.000000
Channel: 64 len 12 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x0b cr 1 dlci 0x02
Control: 0xef poll/final 0
Length: 8
FCS: 0x9a
0d 0a 52 49 4e 47 0d 0a 9a ..RING...

 

0 Likes
oxz1918
New Contributor II

目前有什么进展吗?希望能尽快得到你的回复,感谢!

0 Likes
oxz1918
New Contributor II

hi, Owen:

 CYBT_343026_EVAL  作为controller用,你试过HFP功能吗? SCO 数据能送到host这边吗?

如果可以的话,能把你的硬件环境和SCO交互的log发给我看看吗?我们这边测试遇到瓶颈,试了很多办法host都是收不到SCO的数据,特别需要你的帮助,感谢!

 

0 Likes
Owen_Zhang123
Moderator
Moderator

我们在其他的设备上测试过,在CYW20706上没测过,我这边测试一下之后再回复你。

0 Likes
oxz1918
New Contributor II

好的,如果你那边有测试成功的案例,请给我们也分享一下具体的硬件环境和测试步骤,非常感谢!

0 Likes
oxz1918
New Contributor II

hi, owen

你那边有什么进展吗? 如果有结果,请跟我们分享一下,感谢!

0 Likes
oxz1918
New Contributor II

hi, Owen

你那边有什么进展吗?可以跟我们分享一下不?我们这边项目催的比较紧,声音播放很重要,特别需要你们的帮助,非常感谢!

0 Likes