我们正在尝试将iOS设备连接到Windows 10中的BLE应用程序,以发送大量数据。
我们已经能够成功写入数据。为了增加吞吐量,我们希望在两个设备之间实现L2CAP通道。在iOS方面,我们有一个界面,但在Microsoft文档中找不到有关此主题的任何文档。我们当前正在研究Windows 10的1803更新,根据Microsoft的此出版物,应该支持L2CAP:https://support.microsoft.com/de-de/help/10568/windows-10-supported-bluetooth-profiles
使用以下代码,我们可以发布特征以允许编写而没有响应:
public GenericGattCharacteristic(GattLocalCharacteristic characteristic, GenericGattService service)
{
Characteristic = characteristic;
ParentService = service;
if (Characteristic.CharacteristicProperties.HasFlag(GattCharacteristicProperties.Read))
{
Characteristic.ReadRequested += Characteristic_ReadRequested;
}
if (Characteristic.CharacteristicProperties.HasFlag(GattCharacteristicProperties.Write) ||
Characteristic.CharacteristicProperties.HasFlag(GattCharacteristicProperties.WriteWithoutResponse))
{
Characteristic.WriteRequested += Characteristic_WriteRequested;
}
Characteristic.SubscribedClientsChanged += Characteristic_SubscribedClientsChanged;
}
有人有关于在UWP应用程序中如何使用L2CAP的更多信息吗?