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.
如题,如可行,需要注意什么?
li,
当然可以。
你可以参考keyfob工程中的GATT_Notification()这个函数的调用方法。
从机主动向主机发送数据,主要就是notification和indication两种方式了。
可行,可以借鉴simpleBLEperipheral,在此基础上修改;simpleBLEperipheral.c 文件中的回调函数static void peripheralStateNotificationCB( gaprole_States_t newState ),可以用来告诉你现在设备的状态(是在广播状态呢,在连接状态呢);如果在连接状态,你可以调用GATT_Notification这个函数发送通知来将数据上传给主机。
注意:大容量数据,分包发送,每包不要超过20字节
谢谢。