Table of Contents

Interface IBluetoothSecurity

Namespace
TechnologySolutions.Rfid.AsciiProtocol.Extensions
Assembly
TechnologySolutions.Rfid.AsciiProtocol.Core.dll

Provides methods for pairing to readers from within the application

public interface IBluetoothSecurity

Properties

CanPair

Gets a value indicating whether this platform can use PairAsync(BluetoothAddress) to pair to a remote Bluetooth address

bool CanPair { get; }

Property Value

bool

CanUnpair

Gets a value indicating whether this platform can use UnpairAsync(BluetoothAddress) to remove a pairing to a remote Bluetooth address

bool CanUnpair { get; }

Property Value

bool

Methods

PairAsync(BluetoothAddress)

Creates a pairing with the specified BluetoothAddress

Task<bool> PairAsync(BluetoothAddress address)

Parameters

address BluetoothAddress

The Bluetooth MAC address of the reader to pair to

Returns

Task<bool>

The task to create the pairing. The task returns true if the pairing already exists or was created successfully

Remarks

On most platforms this can only succeed if the Bluetooth radio is not currently running a discovery. On windows this means that the Bluetooth Settings control panel must be closed.

UnpairAsync(BluetoothAddress)

Removes a pairing with the specified BluetoothAddress

Task<bool> UnpairAsync(BluetoothAddress address)

Parameters

address BluetoothAddress

The Bluetooth MAC address of the reader to unpair from

Returns

Task<bool>

The task to remove the pairing. The task returns true if the pairing did not exist or was removed successfully

Remarks

On most platforms this can only succeed if the Bluetooth radio is not currently running a discovery. On windows this means that the Bluetooth Settings control panel must be closed

Events

PairingChanged

Raised when a reader is paired or unpaired

event EventHandler<BluetoothPairingEventArgs> PairingChanged

Event Type

EventHandler<BluetoothPairingEventArgs>