微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > CC2640R2F simple_peripheral SIMPLEPROFILE_CHAR5 示例中设定只读,怎么更改为可读可写?

CC2640R2F simple_peripheral SIMPLEPROFILE_CHAR5 示例中设定只读,怎么更改为可读可写?

时间:10-02 整理:3721RD 点击:

特征值 SIMPLEPROFILE_CHAR5

  5-byte value that can be read (but not written) from a GATT client device

示例中设定只读,我通过修改simple_gatt_profile.c文件:

// Simple Profile Characteristic 5 Properties
static uint8 simpleProfileChar5Props = GATT_PROP_READ | GATT_PROP_WRITE;

// Characteristic Value 5

{
{ ATT_BT_UUID_SIZE, simpleProfilechar5UUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE,
0,
simpleProfileChar5
},

#define SIMPLEPROFILE_CHAR5_LEN           20 //5  

更改后蓝牙测试软件显示characteristic 5可读可写,但是软件中

SimpleBLEPeripheral_processAppMsg(pMsg);  收不到消息; 

怎么解决?

TI没找到修改SIMPLEPROFILE_CHAR参数的例程,可以参考下网友分享: http://blog.csdn.net/langqunlideyang/article/details/50385420

我现在要把simple_peripheral  改成Passcode Entry 的认证方式,

或者我不用simple_peripheral 

请问ti有相关的例程吗?

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top