Thread 中讨论的其他器件:CC2650
您好!
我在 Code Composer Studio CCS 7.4中使用的是“简单 BLE 外设”示例。
我能够从 BLE 扫描仪(Android 应用)到 cc2650 Launchpad 获取1字节的数据。
如何在 cc2650中从 BLE 扫描仪接收1个字节以上的数据?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我在 Code Composer Studio CCS 7.4中使用的是“简单 BLE 外设”示例。
我能够从 BLE 扫描仪(Android 应用)到 cc2650 Launchpad 获取1字节的数据。
如何在 cc2650中从 BLE 扫描仪接收1个字节以上的数据?
尝试引用 http://software-dl.ti.com/simplelink/esd/simplelink_cc26x2_sdk/1.60.00.43/exports/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/simple_peripheral/README.html#char5 来读取长度为5字节的 char 5。
我使用的是特征1。 因为它具有写入属性。
我修改了的长度
#define SIMPLEPROFILE_CHAR1_LEN 20//--
并且也已更改
#ifndef feature_OAD_ONCHIP
//设置 SimpleProfile 特征值
{
// uint8_t charValue1 = 1;//这是原始和
uint8_t charValue1[SIMPLEPROFILE_CHAR1_LEN]={1、2、3、4、5};////// 这是 imp
uint8_t charValue2 = 2;
uint8_t charValue3 = 3;
uint8_t charValue4 = 4;
uint8_t charValue5[SIMPLEPROFILE_CHAR5_LEN]={6、7、8、9、0};
// SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR1、sizeof (uint8_t)、
// charValue1);
SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR1、SIMPLEPROFILE_CHAR1_LEN、
charValue1);
SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR2、sizeof (uint8_t)、
charValue2);
SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR3、sizeof (uint8_t)、
charValue3);
SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR4、sizeof (uint8_t)、
charValue4);
SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR5、SIMPLEPROFILE_CHAR5_LEN、
charValue5);
}
请尝试参阅 sunmaysky.blogspot.com/.../add-write-capability-to-characteristics.html
是的、我将看到 sunmaysky.blogspot.com/.../add-write-capability-to-characteristics.html。
只是为了向您提供更多信息、
我已附加屏幕截图、
其中、在表达式调试窗口中、对于 数组的零索引(位置)处的数组"simpleProfileChar1"、
我们可以看到"Q"。此 Q 由我从 BLE 扫描仪发送。
但是、当 我尝试发送超过1个字节时、 我不会在数组中获取该数据。
我将参考 第5.2.2.1节:在 www.ti.com/.../swru393e.pdf 中配置更大的 MTU 值。
谢谢你
我在这上面发布了我的问题
您能帮我解决这个问题吗
已尝试在 新帖子中为您提供帮助。