2

One of the features of Bluetooth v4.1 is the ability to exchange BLE data at the L2CAP layer. The L2CAP layer is lower than the GATT layer which will result in higher throughput of data exchange. I was wondering is there any Stack/OS that has exposed this feature (especially BlueZ/Android/iOS)?

4

2 回答 2

2

使用 Bluez,您可以使用通道标识符 4(对于 LE)打开一个 L2CAP 套接字。内核将接受传入的连接(如果您将安全级别设置为中或高,也会进行配对),并将其传递给正在侦听该通道的任何 AF_BLUETOOTH 套接字 (4)。

现在您有一个 BLE L2CAP 套接字,您可以在其中自己进行所有 GATT/ATT 通信。

于 2016-07-27T14:51:39.627 回答
2

iOS 确实支持带有 iOS 10.2+ 的 L2CAP CO - 请参阅https://developer.apple.com/documentation/corebluetooth/cbl2capchannel

据我所知,Android 不支持此功能。我还在等这个功能......

更新:删除了错误的链接

于 2017-07-24T14:21:34.543 回答