Table of Contents

Class IBluetoothDongleExtensions

Namespace
Jabra.NET.Sdk.DevicePairing
Assembly
Jabra.NET.Sdk.DevicePairing.dll
public static class IBluetoothDongleExtensions
Inheritance
IBluetoothDongleExtensions
Inherited Members

Fields

DefaultScanDuration

20 seconds

public static readonly TimeSpan DefaultScanDuration

Field Value

TimeSpan

DefaultTimeout

10 seconds

public static readonly TimeSpan DefaultTimeout

Field Value

TimeSpan

Methods

ConnectTo(IBluetoothDongle, IBluetoothAddress)

Connect to a device that is already paired with the dongle. Use a default timeout of 10 seconds
public static Task<IBluetoothChildDevice> ConnectTo(this IBluetoothDongle bluetoothDongle, IBluetoothAddress bluetoothAddress)

Parameters

bluetoothDongle IBluetoothDongle
bluetoothAddress IBluetoothAddress

Returns

Task<IBluetoothChildDevice>

An IBluetoothChildDevice with information about the connected device

Remarks

When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.

Exceptions

TimeoutException

When the connection could not be established within the allotted time span.

DeviceNotPairedException

When the specified address is not currently paired with the dongle

SdkUsageException

ConnectTo(IBluetoothDongle, IPairingListEntry)

Connect to a device that is already paired with the dongle.

public static Task<IBluetoothChildDevice> ConnectTo(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry)

Parameters

bluetoothDongle IBluetoothDongle
pairingListEntry IPairingListEntry

Returns

Task<IBluetoothChildDevice>

An IBluetoothChildDevice with information about the connected device

Remarks

When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.

Exceptions

TimeoutException

When the connection could not be established within the allotted time span.

DeviceNotPairedException

When the specified address is not currently paired with the dongle

SdkUsageException

ConnectTo(IBluetoothDongle, IPairingListEntry, TimeSpan)

Connect to a device that is already paired with the dongle.

public static Task<IBluetoothChildDevice> ConnectTo(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry, TimeSpan timeout)

Parameters

bluetoothDongle IBluetoothDongle
pairingListEntry IPairingListEntry
timeout TimeSpan

Returns

Task<IBluetoothChildDevice>

An IBluetoothChildDevice with information about the connected device

Remarks

When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.

Exceptions

TimeoutException

When the connection could not be established within the allotted time span.

DeviceNotPairedException

When the specified address is not currently paired with the dongle

SdkUsageException

DisconnectFrom(IBluetoothDongle, IBluetoothAddress)

Disconnect from a device with the specified Bluetooth address.

public static Task DisconnectFrom(this IBluetoothDongle bluetoothDongle, IBluetoothAddress bluetoothAddress)

Parameters

bluetoothDongle IBluetoothDongle
bluetoothAddress IBluetoothAddress

Returns

Task

Exceptions

TimeoutException

When the disconnect was not reported within the allotted time span.

DisconnectFrom(IBluetoothDongle, IPairingListEntry)

Disconnect from a device with the specified Bluetooth address.

public static Task DisconnectFrom(this IBluetoothDongle bluetoothDongle, IPairingListEntry bluetoothDevice)

Parameters

bluetoothDongle IBluetoothDongle
bluetoothDevice IPairingListEntry

Returns

Task

Exceptions

TimeoutException

When the disconnect was not reported within the allotted time span.

DisconnectFrom(IBluetoothDongle, IPairingListEntry, TimeSpan)

Disconnect from a device with the specified Bluetooth address.

public static Task DisconnectFrom(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry, TimeSpan timeout)

Parameters

bluetoothDongle IBluetoothDongle
pairingListEntry IPairingListEntry
timeout TimeSpan

Returns

Task

Exceptions

TimeoutException

When the disconnect was not reported within the allotted time span.

PairAndConnectTo(IBluetoothDongle, IBluetoothAddress)

Pair with and connect to another Bluetooth device. Use a default timeout of 10 seconds.
public static Task<IBluetoothChildDevice> PairAndConnectTo(this IBluetoothDongle bluetoothDongle, IBluetoothAddress bluetoothAddress)

Parameters

bluetoothDongle IBluetoothDongle
bluetoothAddress IBluetoothAddress

The Bluetooth address of the other device.

Returns

Task<IBluetoothChildDevice>

An IBluetoothChildDevice with information about the connected device

Exceptions

TimeoutException

When the other device doesn't pair and connect within the allotted time span.

See Also

PairAndConnectTo(IBluetoothDongle, IScanEntry)

Pair with and connect to another Bluetooth device. Use a default timeout of 10 seconds.
public static Task<IBluetoothChildDevice> PairAndConnectTo(this IBluetoothDongle bluetoothDongle, IScanEntry scanEntry)

Parameters

bluetoothDongle IBluetoothDongle
scanEntry IScanEntry

A result returned from device scanning.

Returns

Task<IBluetoothChildDevice>

An IBluetoothChildDevice with information about the connected device

Exceptions

TimeoutException

When the other device doesn't pair and connect within the allotted time span.

See Also

PairAndConnectTo(IBluetoothDongle, IScanEntry, TimeSpan)

Pair with and connect to another Bluetooth device.

public static Task<IBluetoothChildDevice> PairAndConnectTo(this IBluetoothDongle bluetoothDongle, IScanEntry scanEntry, TimeSpan timeout)

Parameters

bluetoothDongle IBluetoothDongle
scanEntry IScanEntry

A result returned from device scanning.

timeout TimeSpan

The maximum amount of time to wait for the pairing and connection process to complete.

Returns

Task<IBluetoothChildDevice>

An IBluetoothChildDevice with information about the connected device

Exceptions

TimeoutException

When the other device doesn't pair and connect within the allotted time span.

See Also

ScanForDevicesInPairingMode(IBluetoothDongle)

Start scanning for devices in pairing mode. Use a default scan duration of 20 seconds.
public static IObservable<IScanEntry> ScanForDevicesInPairingMode(this IBluetoothDongle bluetoothDongle)

Parameters

bluetoothDongle IBluetoothDongle

Returns

IObservable<IScanEntry>

An observable that emits when new devices are found.

Unpair(IBluetoothDongle, IPairingListEntry)

Remove the pairing to the device with the specified Bluetooth address.

public static Task Unpair(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry)

Parameters

bluetoothDongle IBluetoothDongle
pairingListEntry IPairingListEntry

Returns

Task

Exceptions

DeviceNotPairedException

When the specified address is not currently paired with the dongle

UnpairConnectedDeviceException

When the specified device is currently connected to the dongle, it cannot be unpaired.