微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > Ti CC2541最大的传输数据能否实现超过20byte?

Ti CC2541最大的传输数据能否实现超过20byte?

时间:10-02 整理:3721RD 点击:

dialog可以通过修改MTU值来实现超过20byte的数据传输,请问下 TI的BLE系类芯片能不能也通过某种方法实现。

谢谢!

传输大数据量时

每次传输可以传20Byte

设置成notification的方式会快速从从机向主机更新 可以去看BLE_Bridge的例程怎么使用notification

http://processors.wiki.ti.com/index.php/SerialBLEbridge

可以通过修改底层某些数据来打破这个20byte的界限吗?

暂时还不行,你可以分包发送,或者一次发两包或三包,

可考虑使用TI新一代CC2640. 支持蓝牙4.2的特性。可以达到很高速度

https://e2e.ti.com/blogs_/b/connecting_wirelessly/archive/2016/07/12/make-your-bluetooth-low-energy-solution-fast-simple-and-secure-with-new-bluetooth-4-2-certified-software

你好,

提高速率的办法有很多,比如如你所说的增加payload。但是呢,蓝牙联盟有规定,BT4.1最大每包只支持20byte字节传输。

但是,你还可以通过增加每个interval的包数来增加你的数据传输。

TI蓝牙最新的sdk支持BT4.2,你可以增加你的payload到244!

如我们应用手册所示:

5.6 LE Data Length Extension
5.6.1 Summary
The data length extension feature allows the LE controller to send data channel packet data units (PDUs)
with payloads of up to 251 bytes of application data, while in the connected state. Furthermore, a new
PDU size can be negotiated by either side at any time during a connection. Previously, the controller’s
largest data channel payload was 27 bytes. This increases the data rate by around 2.5×, compared to
Bluetooth Core Specification version 4.0 and 4.1 devices (if both devices support extended packet length
and are configured properly).

5.6.5.2 Enable the Feature at Run Time
As per Section 5.6.3, the LE controller initially uses packet length values compatible with 4.0 and 4.1
devices in new connections. Update these to trigger the controller to automatically attempt to negotiate a
higher data length at the beginning of every new connection. To enable this feature, add the following call
to the application task’s initialization routine (such as simple_peripheral_init). Use valid values as shown in
the table in Section 5.6.2, otherwise the controller will reject this call.
#define APP_SUGGESTED_PDU_SIZE 251
#define APP_SUGGESTED_TX_TIME 2120
...
//This API is documented in hci.h
HCI_LE_WriteSuggestedDefaultDataLenCmd(APP_SUGGESTED_PDU_SIZE , APP_SUGGESTED_TX_TIME)
Once a connection is formed, the controller handles negotiating a packet size with the peer device. If both
devices are set up to use data length extension, a throughput increase is observed.
5.6.5.3 Set Packet Length in a Connection
Packet length can also be changed dynamically in a connection using the below API snippet. The
application can determine when this must occur based on any logic, such as sensor data or button
presses.
uint16_t cxnHandle;
//Request max supported size
uint16_t requestedPDUSize = 251;
uint16_t requestedTxTime = 2120;
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
//This API is documented in hci.h
if(SUCCESS != HCI_LE_SetDataLenCmd(cxnHandle, requestedPDUSize, requestedTxTime)
DISPLAY_WRITE_STRING("Data length update failed", LCD_PAGE0);

这个太有用了,如果是这个速度,可以传输音频了

谢谢回答!

谢谢回答!

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top