Link Quality Application Notes

With release 1.11 of the Windows SDK, we introduced a new telemetry data point indicating the quality of the connection between (supported) dongles and their connected wireless device.

This information can, for example, be used in monitoring systems to determine if the Bluetooth connection between a dongle and an audio device caused a bad call experienced reported by users or customers.

Supported devices

  • Jabra Link 380 running firmware version 1.12.4 or later.

Link Quality

The link quality is only reported when the device is offhook. An event is raised when a listener is added (while being offhook) and every time the state changes.

Value States Description
Off Offhook Raised when the dongle lose connection to the wireless device.
Low Offhook Raised when the link quality changes to low quality.
High Offhook Raised when the link quality changes to high quality.

C# Example

To receive the first link quality event when the listener is added, it is best practice to only add the listener when the device goes offhook.
To make sure you get the value again when a second call starts, remember to remove the listener when the device goes onhook.

There is no function to check if link quality is supported, but an exception is raised when adding the listener on an unsupported device, so make sure to catch it.

Code

private Dictionary<int, EventHandler<LinkQualityEventArgs>> _linkQualityFuncs = new Dictionary<int, EventHandler<LinkQualityEventArgs>>();

private void OnDeviceSignal(object sender, TranslatedButtonInputEventArgs e)
{
    var device = // get device from device ID (e.DeviceId)
    if (e.ButtonId == ButtonId.OffHook)
    {
        var hookState = e.Value.HasValue ? e.Value.Value : false;
        try
        {
            // hookState == true means offhook
            if (hookState)
            {
                // It is not guaranteed that the sender of the event is the device ID, so we use the device of the offhook message instead
                EventHandler<LinkQualityEventArgs> linkQualityFunc = (linkQualitySender, linkQualityArgs) =>
                    Console.WriteLine($"Link Quality for {device.Name} (ID: {device.DeviceId}) = {linkQualityArgs.LinkQuality}");
                _linkQualityFuncs.Add(device.DeviceId, linkQualityFunc);
                device.LinkQuality += _linkQualityFuncs[device.DeviceId]; 
                Console.WriteLine($"Link quality listener added for {device.Name} (ID: {device.DeviceId})");
            }
            // hookState == false means onhook
            else
            {
                if (_linkQualityFuncs.ContainsKey(device.DeviceId)) {
                    device.LinkQuality -= _linkQualityFuncs[device.DeviceId];
                    _linkQualityFuncs.Remove(device.DeviceId);
                    Console.WriteLine($"Link quality listener removed for {device.Name} (ID: {device.DeviceId})");
                }
            }
        }
        catch
        {
            Console.WriteLine($"Link quality not supported for {device.Name} (ID: {device.DeviceId})");
        }
    }
}