cc2540的128位uuid和oad功能的实现

本文详细介绍了在Bluetooth Low Energy (BLE)中正确使用128位UUID进行特征验证的方法,并指出了一段代码中的错误部分。同时,还讨论了如何通过upgrade FW实现oad功能,提供了oad开发的官方指导文档链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

128位uuid的添加参考wiki  

http://processors.wiki.ti.com/index.php/128_Bit_UUID_SimpleBLE

但是这个里面有点小问题 ,解决办法见

http://e2e.ti.com/support/low_power_rf/f/538/p/309092/1138538.aspx#1138538



In SimpleGATTProfile.C:

in simpleProfile_WriteAttrCB:

// 128-bit UUID
const uint8 uuid[ATT_UUID_SIZE] = 

TI_UUID(BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]))
};

if ( osal_memcmp(uuid, simpleProfilechar1UUID, ATT_UUID_SIZE) || osal_memcmp(uuid, simpleProfilechar3UUID, ATT_UUID_SIZE))
{
//Validate the value

This code is using the wrong bytes of the 128 bit UUID which is sent, to do the validation. The bytes which are specific to the characteristic are only bytes 0 and 1 if a 16-bit UUID is being used. For 128 bit UUID it should be bytes 12 and 13:

TI_UUID(BUILD_UINT16( pAttr->type.uuid[12], pAttr->type.uuid[13]))



oad功能参考官方提供的oad开发pdf文档,更新软件可使用multitool, 但是profiles不能发现oad,要用UPgrade FW 实现。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值