简体   繁体   English

有效载荷大小从 BLE v4.2 到 4.0 的向后兼容性

[英]Backward compatibility on payload size from BLE v4.2 to 4.0

I have a Hardware device with Bluetooth LE version 4.2, and it can send the data packets with the payload of 251 bytes.我有一个蓝牙 LE 版本 4.2 的硬件设备,它可以发送负载为 251 字节的数据包。 But the i will be receiving the data through a mobile app(Android & IOS), and mobiles will have different Bluetooth LE versions like v4.0, v4.1 or v4.2.但是我将通过移动应用程序(Android 和 IOS)接收数据,并且手机将具有不同的蓝牙 LE 版本,如 v4.0、v4.1 或 v4.2。

Assume my hardware device acts as Master and the mobile acts as slave.假设我的硬件设备充当主设备,而移动设备充当从设备。 And here master does not know the slave's Bluetooth version.而这里的master不知道slave的蓝牙版本。

If the master sends the data packet with the payload of 251 bytes, how the slave (v4.0 - payload: 33 bytes) can handle it.如果master发送了payload为251字节的数据包,slave(v4.0-payload:33字节)如何处理。

Question 1: Can the BLE GATT server is capable of handling this case of backward compatibility by keeping the buffer of 251 packets and send 33 packets one after other?问题 1:BLE GATT 服务器能否通过保持 251 个数据包的缓冲区并一个接一个地发送 33 个数据包来处理这种向后兼容的情况?

Question 2: What could be the best possible approach to get high through put, by keeping the master at v4.2 and still answer the slave with all BLE versions?问题 2:通过将主机保持在 v4.2 并仍然使用所有 BLE 版本回答从机,获得高吞吐量的最佳方法是什么?

Regards, Siva.问候,西瓦。

If you read the Bluetooth Core specification, you will find that on the Link Layer the Link Layer packet size can be negotiated from both sides (slave or master doesn't matter).如果您阅读蓝牙核心规范,您会发现在链路层上,链路层数据包大小可以从双方协商(从设备或主设备都没有关系)。 If the other device doesn't support it then the default length will be used.如果其他设备不支持它,则将使用默认长度。 Otherwise the larger length will be used.否则将使用更大的长度。 So it's fully backwards compatible.所以它完全向后兼容。

Also the GATT layer doesn't need to be changed at all to support LE Data Length extension, since the fragmentation and reassembly is handled by the L2CAP layer.此外,GATT 层根本不需要更改以支持 LE 数据长度扩展,因为分段和重组由 L2CAP 层处理。

Note however that you need to exchange a large MTU for GATT in order to make use of the feature.但是请注意,您需要为 GATT 交换较大的 MTU 才能使用该功能。 Preferably 4+MTU should be a multiple of the Link Layer packet max length.最好 4+MTU 应该是链路层数据包最大长度的倍数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM