PSOC4 BLE 主机模式下,不能进入CYBLE_EVT_GAP_DEVICE_CONNECTED事件

公告

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

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

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

Dear,all:

我在使用PSOC4 ble 的主机模式遇到了一些问题:

硬件CY8CKIT-042-BLE -A poineer +CY8C4248LQI-BL583

软件Creator 4.2

我的软件流程:CyBle_Start ->CYBLE_EVT_STACK_ON 下 CyBle_GapcStartScan ->在CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT事件中匹配需要连接的MAC地址

->CYBLE_EVT_GAPC_SCAN_START_STOPs事件中连接待连接设备CyBle_GapcConnectDevice ->进入到CYBLE_EVT_GATT_CONNECT_IND获取服务句柄

我认为接下来会进入到 CYBLE_EVT_GAP_DEVICE_CONNECTED 事件中,但是实际测试未进入此事件,但是我的从机确已经被连接。

从机主动断开连接之后,能正常进入CYBLE_EVT_GAP_DEVICE_DISCONNECTED事件

曾经试图跳过CYBLE_EVT_GAP_DEVICE_CONNECTED 事件,直接去获取服务,但是失败

因此想请教一下,是否需要调用其他函数?或者我遗忘了哪个步骤

备注:检查过堆栈大小

0 点赞
1 解答
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked
0 点赞
2 回复数
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

看看这个是不是类似问题?CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT event is not generated

Roy Liu
0 点赞
guta_2945091
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Yes,感谢您的回答

0 点赞