在BLE POS6 Findme工程中

公告

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

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

cross mob
ligo_4592266
Level 1
Level 1
First question asked First reply posted

1574389917(1).jpg

跳过去后变成灰了,为啥还能调用

1584390330(1).jpg

0 点赞
1 解答
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

建议你参考这个code example - https://www.cypress.com/documentation/code-examples/ce222046-psoc-6-mcu-bluetooth-low-energy-ble-con... 数据收发具体是怎么实现的。

关于启动Notification的问题,一般来说需要GATT Client端对Server端对应特征值的CCCD写1进行使能。

关于数据的发送,有API - Cy_BLE_GATTS_Notification(), 接收是通过CY_BLE_EVT_GATTC_HANDLE_VALUE_NTF事件产生完成的。

在原帖中查看解决方案

0 点赞
6 回复数
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

你用的哪个版本的PSoC Creator(Help > About) ? 你这是编译(Build)工程后通过Go to Declaration 从.c 跳到.h中的吗?你可以把你的工程上传到这个帖子,大家看看什么问题。

Roy Liu
0 点赞
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

ligo_4592266 你是不是把BLE放到cm0+跑了?当前Creator的视角是cm4的视角,在cm0+中调用,函数定义会显示灰色,但不影响使用。

lock attach
Attachments are accessible only for community members.
ligo_4592266
Level 1
Level 1
First question asked First reply posted

我是把BLE放在了M0+上跑,目的是为了降低功耗。我自定义了一个服务,自定义服务下有两个特征值,一个为TX,另一个为RX,发现可以搜索到到蓝牙,但是连接不上蓝牙,希望您能帮我修改一下,谢谢!

0 点赞
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

你的工程GAP Settings -> Filter policy设置有问题,显示只有white list中设备可连接,请设置为如下图所示

pastedImage_0.png

感谢您的帮助,连接问题解决了。另外还有两个问题需要麻烦您:1、如图片所示Notification打开不了,是哪个地方没设置好?

2,通过调用(TX)具体那个接口函数可已经数据发送到手机APP,调用哪个函数接口可以接收来自手机app的数据?

谢谢!

微信图片_20191202103152.jpg

0 点赞
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

建议你参考这个code example - https://www.cypress.com/documentation/code-examples/ce222046-psoc-6-mcu-bluetooth-low-energy-ble-con... 数据收发具体是怎么实现的。

关于启动Notification的问题,一般来说需要GATT Client端对Server端对应特征值的CCCD写1进行使能。

关于数据的发送,有API - Cy_BLE_GATTS_Notification(), 接收是通过CY_BLE_EVT_GATTC_HANDLE_VALUE_NTF事件产生完成的。

0 点赞