【BLE】CC2541之主机端获取notify数据
我做了这个实验,蓝牙模块可以往CC2541板子发数据了,也收到了。
我想CC2541往蓝牙模块发数据,用Notify方式,该如何操作呢?谢谢!
Susan Yang:
Notify的话可以使用 GATT_Notification或者GATTServApp_ProcessCharCfg(实际还是调用GATT_Notification)
ccb bcc:
回复 Susan Yang:
谢谢!
simpleProfileChar1 = *((uint8*)0x43); //simpleProfileChar1 = 0x43; // See if Notification has been enabled GATTServApp_ProcessCharCfg( simpleProfileChar1Config, &simpleProfileChar1, FALSE, simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ), INVALID_TASK_ID ); NPI_PrintString("Send OK!");
我在按键处理里调用这个函数,提示:
Error[Pe020]: identifier "simpleProfileAttrTbl" is undefined
是属性表。
这可怎么办呀?
YiKai Chen:
CC2541往蓝牙模块发数据這當中的CC2541是BLE central?
ccb bcc:
回复 YiKai Chen:
是的。