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.

CC254X transmission speed test

Other Parts Discussed in Thread: CC2541

i want to test the transmission speed between two CC2541 development boards.

Based on function simpleBLECentral.c that TI provided, I made some modification as follow. I want to send data from Central to Peripheral.

But I found that only the first attempt was successful. char1 read from peripheral is 65, that is 'A'. All the other attempts are failed. I have changed connection interval, from 4*1.25ms, 10*1.25ms, 100*1.25ms to 1000*1.25ms. I want to ask the reason why it failed in the later attempt. where should I change? If you can provide the test code or test result, it will be the best

我想用CC2541两块开发板之间测试蓝牙的传输速率。

在TI提供的simpleBLECentral.c函数中,做了如下修改。即在主从机建立连接之后,通过拨动五向开关往上拨,让主机去发送字节给从机。

每次看LCD屏上的信息,都说我只写成功一次,从机char1中的数据为65,即‘A’。之后的写入全部都失败。我也修改过connection interval,采用过4*1.25ms,10*1.25ms,100*1.25ms,1000*1.25ms这几个值,最多只能写入成功一次,有时候一次都不成功,我想请问是因为什么,造成了这个原因?我应该修改哪里,才可以完成我的测试?



else if ( simpleBLEState == BLE_STATE_CONNECTED && simpleBLECharHdl != 0 && simpleBLEProcedureInProgress == FALSE ) { uint8 status; uint16 sta_times=0; // Do a read or write as long as no other read or write is in progress if ( simpleBLEDoWrite ) { int i,j; attWriteReq_t req; req.handle = simpleBLECharHdl; req.len = 1; req.sig = 0; req.cmd = 0; for(j = 0; j<20; j++) { req.value[0] = 'A'+j; i=0; do{ status = GATT_WriteCharValue( simpleBLEConnHandle, &req, simpleBLETaskId ); i++; if(i>10) break; if(status == SUCCESS) sta_times++; }while(status != SUCCESS); } LCD_WRITE_STRING_VALUE( "****", req.value[0], 10, HAL_LCD_LINE_4 ); system_time = osal_GetSystemClock(); key_time = system_time - key_time; LCD_WRITE_STRING_VALUE( "**aa**", key_time, 10, HAL_LCD_LINE_5 ); LCD_WRITE_STRING_VALUE( "**aa**", system_time, 10, HAL_LCD_LINE_6 ); LCD_WRITE_STRING_VALUE( "sta_times", sta_times, 10, HAL_LCD_LINE_7 ); key_time = system_time; } else { // Do a read attReadReq_t req; req.handle = simpleBLECharHdl; status = GATT_ReadCharValue( simpleBLEConnHandle, &req, simpleBLETaskId ); } if ( status == SUCCESS ) { simpleBLEProcedureInProgress = TRUE; simpleBLEDoWrite = !simpleBLEDoWrite; } }