设为首页收藏本站

Discuz! Board

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 2989|回复: 0
打印 上一主题 下一主题

蓝牙主机on_descriptor_discovery_rsp不断重启

[复制链接]

1

主题

8

帖子

68

积分

注册会员

Rank: 2

积分
68
跳转到指定楼层
楼主
renpan 发表于 2018-6-20 11:40:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
开发板:NRF52832
协议栈版本:132
使用从机串口例程和主机串口例程后想试试把从机代码换为蓝牙通知的例程,然后改了一下主机串口中对应的UUID设置发现程序在找到cccd后就莫名重启了,串口日志如下:

-----------------------------分割线----------------------------------------------
p_ble_evt->header.evt_id:1d

TYPE:7



extracted_uuid:1523

extracted_uuid TYPE:2
trueThe data length is: 18
11        7        9e        ca        dc        24        e        e5        a9        e0        93        f3        a3        b5        23        15        40        6e       
uuid present
Connecting tobc4cf1f
p_ble_evt->header.evt_id:10
Connected to target

Enter ble_db_discovery_start
[DB]: Starting discovery of service with UUID 0x1523 for Connection handle 0

[11:18:18.011]收←◆
p_ble_evt->header.evt_id:30

Enter BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP
Found service UUID 0x1523
Service count:1
Found service UUID 0x1523
conn_handle:0

[11:18:18.160]收←◆
p_ble_evt->header.evt_id:32

Enter BLE_GATTC_EVT_CHAR_DISC_RSP
char continue find, the primer ser UUID:0x1523
The number char prev found is 0
The number char being found is 1
not all char found.

[11:18:18.309]收←◆
p_ble_evt->header.evt_id:32

Enter BLE_GATTC_EVT_CHAR_DISC_RSP
char continue find, the primer ser UUID:0x1523
The number char prev found is 1
The number char being found is 1
not all char found.

[11:18:18.459]收←◆
p_ble_evt->header.evt_id:32

Enter BLE_GATTC_EVT_CHAR_DISC_RSP
char continue find, the primer ser UUID:0x1523
all char found-------.
1 char UUID is 1525
2 char UUID is 1524
**************************
raise_discov_complete:0

[11:18:18.607]收←◆
p_ble_ev
[11:18:18.861]收←◆Scan started

[11:18:18.890]收←◆
p_ble_evt->header.evt_id:1d


-----------------------------分割线----------------------------------------------
红色部分是重启了,上面的打印信息插在代码如下位置:

    if (perform_desc_discov)
    {
            uint32_t i;
                for(i = 0; i < p_srv_being_discovered->char_count; i++)
                        printf("%d char UUID is %x\r\n",i+1,p_srv_being_discovered->charateristics.characteristic.uuid.uuid);
        bool raise_discov_complete;

        p_db_discovery->curr_char_ind = 0;

        err_code = descriptors_discover(p_db_discovery,
                                        &raise_discov_complete,
                                        p_ble_gattc_evt->conn_handle);
                printf("**************************\r\n");
                printf("raise_discov_complete:%x\r\n",raise_discov_complete);

        if (err_code != NRF_SUCCESS)
        {
                printf("descriptors found exception.\r\n");

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

Archiver|手机版|小黑屋|Comsenz Inc.   

GMT+8, 2024-5-13 06:02 , Processed in 0.182241 second(s), 29 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表