3

We are trying to connect an iOS device to our BLE application in Windows 10 to send larger amounts of data.

We were already able to successfully write data. To increase the throughput we want to implement L2CAP channel between both devices. While on iOS side we have an interface, I couldn't find any documentation regarding this topic in the Microsoft documentation. We are currently working on the 1803 update of Windows 10 and according to this publication of microsoft there should be L2CAP supported: https://support.microsoft.com/de-de/help/10568/windows-10-supported-bluetooth-profiles

With the following code we can publish a characteristic to allow writing without response:

    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;
    }

Does anyone have some further information on how to use L2CAP in an UWP application?

Alexander Belokon
  • 1,452
  • 2
  • 17
  • 37
  • 1
    L2CAP is from the beginning a Bluetooth Classic profile / protocol. Some basics of it were taken into BLE 4.0, i.e. packet header including type of packet (ATT or SMP), length. Connection parameter update for slave was also added to L2CAP. The credit based flow thing introduced later is probably not what Microsoft refers to when they say they support L2CAP. – Emil Jun 10 '19 at 12:11
  • Microosft Bluetooth drivers do not provide any easy access (at least on user mode level) to L2CAP. If you need to access L2CAP (or any other low-level) you have to write custom Bluetooth driver extention (filter driver). Please, refer to WDK for more details. Also, the WDK demos include L2CAP demo driver (Echo). – Mike Petrichenko Jun 10 '19 at 12:27

0 Answers0