Table of Contents

DECT module

The DectModule class is the entry point for the DECT (Digital Enhanced Cordless Telecommunications) domain. DECT is a wireless communication standard that enables secure and reliable connections between devices, such as headsets and dongles. It operates in a dedicated frequency range, allowing for high-quality audio transmission and minimal interference. DECT technology is commonly used in office environments, providing users with the freedom to move around while maintaining a stable connection for calls and audio.

DECT pairing

DECT supports several pairing types, while Jabra dongles support the following types:

  • Wireless (standard): Whereby the headset and dongle are paired using button presses on both devices.
  • Cabled (secure): Whereby there is an additional exchange of a pre-shared key to ensure only an authorized device can connect.

Wireless pairing relies on device button presses and does not involve programmatic device interaction. Cabled pairing relies on device button presses and does involve programmatic device interaction. Cabled pairing is recommended when wireless pairing fails or there is a risk of pairing a wrong device.

Note

Jabra DECT devices with a base, e.g.: Jabra Engage 65, Jabra Engage 75, pair with the headset when it is docked. There is no need for programmatic interaction to pair those devices.

Cabled pairing

Cabled pairing requires both dongle and headset to be connected to the PC via USB. By default the Jabra Engage headset utilizes only the charging capabilities of the USB port. For the headset to be discoverable by the SDK, it is required that the headset is placed in a specific mode by holding the Volume Up [1] button while plugging it in.

As pairing requires DECT-compatible devices (and additional preconditions), the following primitives: The IDectDongle interface and IDectHeadsetOverUsb interface are introduced to prevent misuse of the pairing method.

When both the dongle and the headset are connected, cabled pairing is relatively simple - you must indicate which devices are to be paired. Pairing is done by IDectDongle.PairWith method.

Note

The pairing method waits for the headset to reconnect via the dongle and returns a new headset instance, as the previous instance becomes invalid once the USB connection is terminated. Since the initiation of the DECT connection might fail due to issues like radio interference, the pairing method comes with a default timeout. However, you can use overloads that support timeout or a cancellation token for greater control. While the USB connection facilitates a quick and reliable key exchange, the DECT connection is the part that may fail.

On the one hand, for simple pairing flows where it is expected that the user only has one set of DECT devices - you can use DectDeviceAwaiter class for device selection.

public static async Task SimplePairing(IApi api)
{
    DectDeviceAwaiter awaiter = new DectDeviceAwaiter(api);

    IDectDongle dongle = await awaiter.FirstDongleAsync();
    IDectHeadsetOverUsb usbHeadset = await awaiter.FirstHeadsetOverUsbAsync();

    IDevice dectHeadset = await dongle.PairWith(usbHeadset);
}

On the other hand, for more complex pairing flows, where the user would like more control over device selection, you can use the following predicates (IsDectHeadsetOverUsb and IsDectDongle) as well as core device discovery capabilities (IApi.CurrentDevices and IApi.DeviceAdded).

public static async Task ComplexPairing(IApi api)
{
    var headsetTcs = new TaskCompletionSource<IDectHeadsetOverUsb>();
    var dongleTcs = new TaskCompletionSource<IDectDongle>();
    DectModule dectModule = new DectModule(api);

    api.DeviceAdded.Subscribe(async (device) =>
    {
        // customize per requirements
        if (await DectModule.IsDectDongle(device))
        {
            IDectDongle dongle = await dectModule.ConvertToDectDongle(device);
            dongleTcs.TrySetResult(dongle);
        }

        if (await DectModule.IsDectHeadsetOverUsb(device))
        {
            IDectHeadsetOverUsb headset = await dectModule.ConvertToDectHeadsetOverUsb(device);
            headsetTcs.TrySetResult(headset);
        }
    });

    IDectDongle dongle = await dongleTcs.Task;
    IDectHeadsetOverUsb headset = await headsetTcs.Task;

    IDevice dectHeadset = await dongle.PairWith(headset);
}

[1] Which button to hold may vary based on the Jabra device.