通信速度很慢,与APP通信,一般要3S左右APP才能收到数据,这又是什么原因。
bStatus_t Accel_SetParameter( uint8 param, uint8 len, void *value )
{
uint8 i = 0;
bStatus_t ret = SUCCESS;
switch ( param )
{
case ACCEL_DDD:
if ( len == ACCEL_DDD_UUID_LEN)
{
VOID osal_memcpy( dddCharUserDesc, value, ACCEL_DDD_UUID_LEN );
pReport.handle = accelAttrTbl[5].handle;
GAPRole_GetParameter( GAPROLE_CONNHANDLE, ¬i_cHandle);
pReport.len = 15;
for(i=0;i<pReport.len;i++)
{
pReport.value[i] = dddCharUserDesc[i];
}
GATT_Notification(noti_cHandle,&pReport,FALSE);
}
else
{
ret = bleInvalidRange;
}
break;
default:
ret = INVALIDPARAMETER;
break;
}
return ( ret );
}
cedar_xuesong:
不至于这么慢吧,,,,
用抓包工具抓包看一下,如果是2541这边发送数据delay比较大,就是固件的问题,检查源码
如果是2541发送数据,app那边没回复应答,那就检查app逻辑
或者检查无线电环境,是不是2.4G干扰太多
summer xu:
将连接时间间隔改小一点试试
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled #define DEFAULT_DESIRED_MIN_CONN_INTERVAL16// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled #define DEFAULT_DESIRED_MAX_CONN_INTERVAL32