TI中文支持网
TI专业的中文技术问题搜集分享网站

华为手机连接 CC2540 数据丢包,有些 连接几秒钟便自动断开,麻烦工程师回复一下,谢谢!

TI工程师以及大家好,我们公司在做蓝牙胎心仪,用的是CC2540,传输速率是  20ms传输 25个字节一包数据,由于传输一包数据大于20,所以分为两包传输,第一包传 20个字节,第二个传输5个字节,传输方式是Notify,具体实现如下:

if( gapProfileState == GAPROLE_CONNECTED )
{ Uart_SendFlag = 0;
SimpleProfile_SetParameter( SIMPLEPROFILE_CHAR4, sizeof(uint8), &uartbuf);
Uart_SendFlag = 1;
for(i=0;i<10;i++);
SimpleProfile_SetParameter( SIMPLEPROFILE_CHAR4, sizeof(uint8), &uartbuf); }

Uart_SendFlag 为0发送第一包数据,为1发送第二包数据

if(Uart_SendFlag == 0)
{ *pLen = 20;
pValue[0] = uartbuf[0];
pValue[1] = uartbuf[1];
pValue[2] = uartbuf[2];
pValue[3] = uartbuf[3];
pValue[4] = uartbuf[4];
pValue[5] = uartbuf[5];
pValue[6] = uartbuf[6];
pValue[7] = uartbuf[7];
pValue[8] = uartbuf[8];
pValue[9] = uartbuf[9];
pValue[10] = uartbuf[10];
pValue[11] = uartbuf[11];
pValue[12] = uartbuf[12];
/**/pValue[13] = uartbuf[13];
pValue[14] = uartbuf[14];
pValue[15] = uartbuf[15];
pValue[16] = uartbuf[16];
pValue[17] = uartbuf[17];
pValue[18] = uartbuf[18];
pValue[19] = uartbuf[19]; }
else if(Uart_SendFlag == 1)
{
*pLen = 5;
pValue[0] = uartbuf[20];
pValue[1] = uartbuf[21];
pValue[2] = uartbuf[22];
pValue[3] = uartbuf[23];
pValue[4] = uartbuf[24];
}

user5178495:

补充说明一下,IOS苹果手机没问题以及其他牌子的 安卓手机未发现问题

Susan Yang:

看程序没什么问题

user5178495:

回复 Susan Yang:

@Susan Yang,你好,你们是否有碰到这个问题?或者有没有在深圳的 技术支持帮忙看一下?能否给个技术支持的联系方式  QQ 或者 手机都可以!

Susan Yang:

回复 user5178495:

请问您现在用的是什么系统?

TI WIKI页面有Known_Issues的说明,您可以看一下

http://processors.wiki.ti.com/index.php/LPRF_BLE_Porting_Projects#Known_Issues

Connections may drop after connecting with Android 7+ devices. This issues presents when SNV flash memory has high utilization. To fix, apply the workaround in the findItem() as described in this E2E forum post.

user5178495:

回复 Susan Yang:

你好,我现在用的是  BLE-CC254x-1.4.0的协议栈,这个版本有什么问题吗?

user5178495:

回复 user5178495:

     有人可以回复一下吗?产品在做量产了。TI的工程师在吗  

赞(0)
未经允许不得转载:TI中文支持网 » 华为手机连接 CC2540 数据丢包,有些 连接几秒钟便自动断开,麻烦工程师回复一下,谢谢!
分享到: 更多 (0)