simpleBLECentral 可以通过调用 simpleBLECentralProcessGATTMsg 函数来读出SimpleBLEPeripheral 通过蓝牙发过来的字节数目,
SimpleBLEPeripheral 通过调用什么函数来知道接收到的蓝牙有效数据个数呢?
static void simpleBLECentralProcessGATTMsg( gattMsgEvent_t *pMsg )
{
if ( pMsg->method == ATT_HANDLE_VALUE_NOTI ||
pMsg->method == ATT_HANDLE_VALUE_IND )
{
attHandleValueNoti_t noti;
noti.handle = pMsg->msg.handleValueNoti.handle;
noti.len = pMsg->msg.handleValueNoti.len;
osal_memcpy(¬i.value, &pMsg->msg.handleValueNoti.value,noti.len);
sbpSerialAppWrite(noti.value,noti.len);
}
}