采用从机Peripheral例程 为何不断的循环发送数据,主机那边接收数据的速率并不快
uint8 BLE_Send_Buf_notify(uint8 *buf,uint8 len) { attHandleValueNoti_t noti; if(NULL == buf)return 1; if(len > BLE_BUFF_MAX_LEN || len > SIMPLEPROFILE_CHAR4_LEN)return 2; if(0 == peripheralConnList.connHandle)return 3; noti.len = len; noti.pValue = GATT_bm_alloc( peripheralConnList.connHandle, ATT_HANDLE_VALUE_NOTI, noti.len, NULL, 0 ); tmos_memcpy( noti.pValue, buf, noti.len ); if( simpleProfile_Notify( peripheralConnList.connHandle, ¬i ) != SUCCESS ) { GATT_bm_free( (gattMsg_t *)¬i, ATT_HANDLE_VALUE_NOTI ); return 4; } return 0; }
如此的循环发送,但是主机那边连接上了,大概也就1秒 3 到4个数据过去
请问如何提高从机发送通知给主的速率
热门产品 :
CH339: 7端口多功能USB HUB控制器芯片