怎么使用CYBT-423028-EVAL来测试自己开发的蓝牙host软件呢

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MaLi_4701696
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

刚接触crypress,先自己开发蓝牙host软件,然后用CYBT-423028-EVAL作为controller,来测试自己开发的蓝牙host软件,如何正确的使用CYBT-423028-EVAL,以及需要哪些配套的软件才能很好的测试我自己开发的蓝牙host软件呢?

0 点赞
1 解答
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

您引用的地方是指,WICED芯片会借用标准Bluetooth HCI protocol规范(其实是其定义中核心的几个下载相关命令)来进行application的下载;而一旦下载完毕,WICED芯片会切换到Application Mode,这时候您就只能通过WICED HCI Control Protocol定义的指令来和芯片通信了。

所以,如果您只想使用您的standard SIG software,请不要(也不必)让WICED芯片在Bluetooth HCI Mode下下载application并切换到Application Mode,直接当成标准的Bluetooth Controller使用即可。

此外,WICED芯片同一时间只能处于Bluetooth HCI Mode和Application Mode当中的一种,所以您并不能同时使用两种Interface和WICED芯片沟通。

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from​ C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

在原帖中查看解决方案

0 点赞
6 回复数
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

请问您的蓝牙Host软件是遵循Bluetooth SIG定义的,使用Bluetooth HCI Interface规范的,依循标准 Bluetooth HCI Protocol指令规范和Controller通信的吗?

CYBT-423028-EVAL使用的是CYBT-423028-02模组,其搭载的是CYW20719芯片,所以使用上您可以参照CYW20719的Datasheet等内容来进行使用。

CYW20xxx系列芯片支持Bluetooth HCI Mode和Application Mode。所以,如果您的host软件是基于Bluetooth HCI interface的,您可以让CYBT-423028-EVAL在启动后进入Bluetooth HCI Mode,这样它会表现成一个标准的Bluetooth Controller,并接受您的依循标准 Bluetooth HCI Protocol编写的蓝牙host软件发出的指令。

如果CYBT-423028-EVAL启动后进入的是Application Mode,那您的MCU(Host)只能通过WICED HCI Interface,基于我司自定义的WICED HCI Control Protocol的指令来进行通信。

关于这些内容的具体信息,以及如何进入相应的Mode,请参考下面文档的中的第1节“Introduction”:

https://www.cypress.com/file/462731/download

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from​ C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

0 点赞

Hi Chunlei

Yes, My Bluetooth host software is standard SIG software.

From the Introduction section:

While in Bluetooth HCI mode, the standard Bluetooth HCI protocol is used to download an application to the CYW20xxx device and change the device mode to Application mode. Note that the application may be downloaded and then executed from RAM, or may be downloaded to serial flash and then executed on the subsequent device reboot

That’s to say my host software can download to the Cybt_423028_eval?

Meanwhile, My host software can run myself hardware platform, and communication with CYW20719 by standard HCI interface?

Thanks!

Best Regards

Maogang Li

发件人: ChunleiL_51

发送时间: 2020年6月9日 18:41

收件人: Li, Maogang

主题: Re: - 怎么使用CYBT-423028-EVAL来测试自己开发的蓝牙host软件呢

<http://www.cypress.com>

Cypress Developer Community <https://community.cypress.com/?et=watches.email.thread>

怎么使用CYBT-423028-EVAL来测试自己开发的蓝牙host软件呢

reply from ChunleiL_51<https://community.cypress.com/people/ChunleiL_51?et=watches.email.thread> in WICED Studio Bluetooth Forums - View the full discussion<https://community.cypress.com/message/238470?et=watches.email.thread#238470>

0 点赞
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

您引用的地方是指,WICED芯片会借用标准Bluetooth HCI protocol规范(其实是其定义中核心的几个下载相关命令)来进行application的下载;而一旦下载完毕,WICED芯片会切换到Application Mode,这时候您就只能通过WICED HCI Control Protocol定义的指令来和芯片通信了。

所以,如果您只想使用您的standard SIG software,请不要(也不必)让WICED芯片在Bluetooth HCI Mode下下载application并切换到Application Mode,直接当成标准的Bluetooth Controller使用即可。

此外,WICED芯片同一时间只能处于Bluetooth HCI Mode和Application Mode当中的一种,所以您并不能同时使用两种Interface和WICED芯片沟通。

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from​ C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

0 点赞

Hi

我这边测试下来发现,手机蓝牙很难和的CYBT-423028-EVAL controller建立连接。

1) 使用CyBluetool + CYBT-423028-EVAL,和手机蓝牙建立连接,无法进入连接,不清楚手机为什么会自动断开连接?还是CyBluetool 不能完成这样的流程?

com3 <e Connection Complete

HCI Event

com3@115200

: 00 0B 00 D6 0C D1 E0 87 94 01 00

event = 0x03 (3,"Connection Complete")

Status = 0x0 (0, "Success", "Success")

Connection_Handle = 0x0B (11)

BD_ADDR = "9487E0D10CD6"

Link_Type = 0x1 (1, "ACL connection")

Encryption_Status = 0x0 (0, "Link level encryption disabled")

com3 <e Max Slots Change

HCI Event

com3@115200

: 0B 00 05

event = 0x1B (27,"Max Slots Change")

Connection_Handle = 0x0B (11)

LMP_Max_Slots = 0x5 (5)

com3 <a ACL Data (rx)

com3@115200

: 06 00 01 00 0A 02 02 00 02 00

Broadcast_Flag = 0x00 (0, "Point-to-point")

Packet_Boundary_Flag = 0x02 (2, "First automatically flushable packet")

Connection_Handle = 0x0B (11)

Data_Total_Length = 0x0A (10)

data = "06 00 01 00 0A 02 02 00 02 00"

com3 <a ACL Data (rx)

com3@115200

: 08 00 01 00 02 03 04 00 01 00 44 00

Broadcast_Flag = 0x00 (0, "Point-to-point")

Packet_Boundary_Flag = 0x02 (2, "First automatically flushable packet")

Connection_Handle = 0x0B (11)

Data_Total_Length = 0x0C (12)

data = "08 00 01 00 02 03 04 00 01 00 44 00"

com3 <a ACL Data (rx)

com3@115200

: 08 00 01 00 02 04 04 00 01 00 45 00

Broadcast_Flag = 0x00 (0, "Point-to-point")

Packet_Boundary_Flag = 0x02 (2, "First automatically flushable packet")

Connection_Handle = 0x0B (11)

Data_Total_Length = 0x0C (12)

data = "08 00 01 00 02 04 04 00 01 00 45 00"

com3 <e Disconnection Complete

HCI Event

com3@115200

: 00 0B 00 13

event = 0x05 (5,"Disconnection Complete")

Status = 0x0 (0, "Success", "Success")

Connection_Handle = 0x0B (11)

Reason = 0x13 (19, "Remote User Terminated Connection")

2) 如果使用我自己的host软件+CYBT-423028-EVAL controller,和手机蓝牙进行连接的时候,经常我自己host软件发给CYBT-423028-EVAL controller的HCI command, Controller没有正确响应,

导致连接建立失败。

建立连接流程:

HCI Reset

HCI Scan enable

手机发起连接

进入PIN流程

CYBT-423028-EVAL Controller不响应 PIN_Code_Request_Reply

最后connection fail。

Best Regards

Maogang Li

0 点赞
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

您可以使用WICED SDK提供的mbt或wmbt工具先行测试一下,观察设备对Command的响应。详情请访问:

RF Testing on Cypress BT Devices - KBA228303

<<<<<<<<<<<<<>>>>>>>>>>>>>

Sincere regards from​ C. L.

<<<<<<<<<<<<<>>>>>>>>>>>>>

0 点赞

Hi

I know the reason of connection fail, because CyBluetool can send the ACL data, only can send the HCI  command,

so L2CAP message can't send by CyBluetool, and can't finish the simple pairing routine.

0 点赞