Arendi.BleLibrary  6.2.1.1599
Core-Library (.NET Standard 1.0)
Arendi.BleLibrary.Remote.IPeripheral Interface Reference

Interface all platform specific implementations of the peripheral fulfill. More...

Inheritance diagram for Arendi.BleLibrary.Remote.IPeripheral:

Public Member Functions

void Connect (int timeout=Constants.ConnectTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Tries to establish a connection to the peripheral. More...
 
void Disconnect (int timeout=Constants.DisconnectTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Releases the connection. More...
 
List< IServiceDiscoverServices (int timeout=Constants.DiscoverServicesTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Discover all services of the peripheral. More...
 
int ReadRssi (int timeout=Constants.ReadRssiTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Retrieves the current RSSI value for the peripheral while it is connected. More...
 
void Authenticate (bool bond, bool mitm, bool lesc, IoCapabilities ioCapabilities, int timeout=Constants.AuthenticateTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Authenticate the current connection to the peripheral. More...
 
void Encrypt (IBond bond, int timeout=Constants.EncryptTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Encrypt the current connection to the peripheral by using an existing bonding. More...
 
void UpdateParameter (ParameterSet parameter, int timeout=Constants.UpdateParameterTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Update the connection parameter of the current connection to the peripheral. More...
 
void UpdateDataLength (DataLengthSet requestedDataLength, int timeout=Constants.UpdateDataLengthTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Update the data length of the current connection to the peripheral. More...
 
void UpdatePhy (PhySet requestedPhy, int timeout=Constants.UpdatePhyTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Update the phy of the current connection to the peripheral. More...
 
int ExchangeAttMtu (int clientRxMtu, int timeout=Constants.ExchangeAttMtuTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Exchange the ATT MTU on the current connection to the peripheral. More...
 
Task ConnectAsync (int timeout=Constants.ConnectTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Tries to establish a connection to the peripheral. More...
 
Task DisconnectAsync (int timeout=Constants.DisconnectTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Releases the connection. More...
 
Task< List< IService > > DiscoverServicesAsync (int timeout=Constants.DiscoverServicesTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Discover all services of the peripheral. More...
 
Task< int > ReadRssiAsync (int timeout=Constants.ReadRssiTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Retrieves the current RSSI value for the peripheral while it is connected. More...
 
Task AuthenticateAsync (bool bond, bool mitm, bool lesc, IoCapabilities ioCapabilities, int timeout=Constants.AuthenticateTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Authenticate the current connection to the peripheral. The parameters for the bonding are taken from the settings in the ICentral.SecurityManager. More...
 
Task EncryptAsync (IBond bond, int timeout=Constants.EncryptTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Encrypt the current connection to the peripheral by using an existing bonding. More...
 
Task UpdateParameterAsync (ParameterSet parameter, int timeout=Constants.UpdateParameterTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Update the connection parameter of the current connection to the peripheral. More...
 
Task UpdateDataLengthAsync (DataLengthSet requestedDataLength, int timeout=Constants.UpdateDataLengthTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Update the data length parameter of the current connection to the peripheral. More...
 
Task UpdatePhyAsync (PhySet requestedPhy, int timeout=Constants.UpdatePhyTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Update the phy of the current connection to the peripheral. More...
 
Task< int > ExchangeAttMtuAsync (int clientRxMtu, int timeout=Constants.ExchangeAttMtuTimeout, CancellationToken cancellationToken=default(CancellationToken))
 Exchange the ATT MTU on the current connection to the peripheral. More...
 
IService FindService (string uuid)
 Find a service in the service list. More...
 
IService FindService (Uuid uuid)
 Find a service in the service list. More...
 
ICharacteristic FindCharacteristic (string uuid)
 Find a characteristic in the service list. More...
 
ICharacteristic FindCharacteristic (Uuid uuid)
 Find a characteristic in the service list. More...
 
ICharacteristic CreateCharacteristicByHandle (Uuid uuid, CharacteristicProperties properties, UInt16 handleValue, UInt16 handleClientCharacteristicConfiguration=0)
 Create a characteristic based on it's handle values and behavior. More...
 
void Update (IPeripheral peripheral)
 Update the static peripheral information as is connectable and it's name by later advertised peripheral. More...
 
void ParameterChangeRequestReply (ParameterChangeRequest parameterChangeRequest, bool accept)
 Method to respond to a ParameterChangeRequest event. More...
 
void AuthenticationPasskeyEntryReply (string passkey)
 Method to respond to a IPeripheral.AuthenticationPasskeyEntry event. More...
 
void AuthenticationDisplayMatchReply (bool match)
 Method to respond to a AuthenticationPasskeyDisplay event if the MatchRequest was requested. More...
 

Properties

ICentral Central [get]
 Gets the central instance the peripheral has been created by. More...
 
Uuid Uuid [get]
 Get the UUID that identifies the peripheral uniquely. More...
 
string Name [get, set]
 The name of the peripheral More...
 
BluetoothAddress Address [get]
 Get the bluetooth address of the peripheral. More...
 
bool IsConnected [get]
 Check if the peripheral is currently connected. More...
 
State State [get]
 Get the state of the peripheral. More...
 
int MaxWriteLength [get]
 Get the maximum write length for all writable characteristics. This value is in most cases dependent to the AttMtu value and is allways 3 less than the AttMtu because of a GATT write header length. More...
 
IBond Bond [get]
 Get the bonding associated with this peripheral.
If there is no bonding with this device or if the platform doesn't support bonding handling null is returned.
More...
 
ParameterSet Parameter [get]
 Get the connection parameter of the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn. More...
 
SecuritySet Security [get]
 Get the connection security of the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn. More...
 
DataLengthSet DataLength [get]
 Get the data length parameter of the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn. More...
 
PhySet Phy [get]
 Get the phys used for the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn. More...
 
int AttMtu [get]
 Get the current ATT MTU for the connection with this peripheral. The ATT MTU defines how many bytes can be written to the GATT server in one operation. After a connection has been established the ATT MTU is defined as 23. This gives a max write length of 20 bytes (3 byte GATT header). It is possible since the bluetooth 4.2 standard to exchange the MTU and negotiate a higher MTU size. If the ATT MTU changes a AttMtuChanged event is triggered. More...
 
IEnumerable< IServiceServiceList [get]
 Get the service list of the peripheral. More...
 
ILog Log [get]
 Logger instance. More...
 

Events

EventHandler< StateChangedEventArgsStateChanged
 Event triggered, when the state of the peripheral changes. More...
 
EventHandler< ConnectedEventArgsConnected
 Event triggered, when the peripheral gets connected. More...
 
EventHandler< DisconnectedEventArgsDisconnected
 Event triggered, when the peripheral gets disconnected. More...
 
EventHandler< EncryptedEventArgsEncrypted
 Event triggered if the connection is encrypted. More...
 
EventHandler< AuthenticationPasskeyDisplayEventArgsAuthenticationPasskeyDisplay
 Event triggered if a passkey has to be displayed. More...
 
EventHandler< AuthenticationPasskeyEntryEventArgsAuthenticationPasskeyEntry
 Event triggered if a passkey has to be inserted. The passkey should be provided by calling AuthenticationPasskeyEntryReply. More...
 
EventHandler< AuthenticationPasskeyCompleteEventArgsAuthenticationPasskeyComplete
 Event triggered if a passkey display (see AuthenticationPasskeyDisplay) or entry (AuthenticationPasskeyEntry) may be terminated.. More...
 
EventHandler< BondChangedEventArgsBondChanged
 Event triggered, when the bond property has changed. More...
 
EventHandler< ParameterChangedEventArgsParameterChanged
 Event triggered, when the connection parameter have changed. More...
 
EventHandler< ParameterChangeRequestEventArgsParameterChangeRequest
 Event triggered, when the a connection parameter has been received. To respond to the request the method ParameterChangeRequestReply may be called. More...
 
EventHandler< SecurityChangedEventArgsSecurityChanged
 Event triggered, when the security has changed. More...
 
EventHandler< DataLengthChangedEventArgsDataLengthChanged
 Event triggered, when the data length has changed. More...
 
EventHandler< PhyChangedEventArgsPhyChanged
 Event triggered, when the phy has changed. More...
 
EventHandler< AttMtuChangedEventArgsAttMtuChanged
 Event triggered, when the ATT MTU has changed. More...
 

Detailed Description

Interface all platform specific implementations of the peripheral fulfill.

The peripheral object supports "Task Asynchronous Programming". The methods with the ending "Async" handle its operation in a task which can be awaited on the upper level. The TAP methods won't trigger events unless other described. Error cases in TAP events are always triggering an exception based on the type BleException.

Member Function Documentation

◆ Authenticate()

void Arendi.BleLibrary.Remote.IPeripheral.Authenticate ( bool  bond,
bool  mitm,
bool  lesc,
IoCapabilities  ioCapabilities,
int  timeout = Constants.AuthenticateTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Authenticate the current connection to the peripheral.

Parameters
bondTrue to establish a bonding if possible, false for only pairing.
mitmTrue to enable man in the middle protection, false for disable.
lescTrue to enable LE secure connections, false for disable.
ioCapabilitiesAvailable IO Capabilities.
timeoutOptional timeout [ms] (Default: Constants.AuthenticateTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ AuthenticateAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.AuthenticateAsync ( bool  bond,
bool  mitm,
bool  lesc,
IoCapabilities  ioCapabilities,
int  timeout = Constants.AuthenticateTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Authenticate the current connection to the peripheral. The parameters for the bonding are taken from the settings in the ICentral.SecurityManager.

Parameters
bondTrue to establish a bonding if possible, false for only pairing.
mitmTrue to enable man in the middle protection, false for disable.
lescTrue to enable LE secure connections, false for disable.
ioCapabilitiesAvailable IO Capabilities.
timeoutOptional timeout [ms] (Default: Constants.EncryptTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ AuthenticationDisplayMatchReply()

void Arendi.BleLibrary.Remote.IPeripheral.AuthenticationDisplayMatchReply ( bool  match)

Method to respond to a AuthenticationPasskeyDisplay event if the MatchRequest was requested.

Parameters
matchTrue if the displayed key matches the displayed key shown on the peer device, false if not.

◆ AuthenticationPasskeyEntryReply()

void Arendi.BleLibrary.Remote.IPeripheral.AuthenticationPasskeyEntryReply ( string  passkey)

Method to respond to a IPeripheral.AuthenticationPasskeyEntry event.

Parameters
passkeyPasskey to be used for authentication.

◆ Connect()

void Arendi.BleLibrary.Remote.IPeripheral.Connect ( int  timeout = Constants.ConnectTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Tries to establish a connection to the peripheral.

Parameters
timeoutOptional timeout [ms] (Default: Constants.ConnectTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ ConnectAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.ConnectAsync ( int  timeout = Constants.ConnectTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Tries to establish a connection to the peripheral.

Parameters
timeoutOptional timeout [ms] (Default: Constants.ConnectTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ CreateCharacteristicByHandle()

ICharacteristic Arendi.BleLibrary.Remote.IPeripheral.CreateCharacteristicByHandle ( Uuid  uuid,
CharacteristicProperties  properties,
UInt16  handleValue,
UInt16  handleClientCharacteristicConfiguration = 0 
)

Create a characteristic based on it's handle values and behavior.

This allows access to characteristics without the need of a service discovery but you need to know the used attribute handles.

This feature is not supported by all platforms.

Parameters
uuidThe UUID of the characteristic.
propertiesProperties of the characteristic.
handleValueHandle of the value attribute.
handleClientCharacteristicConfigurationHandle of the client characteristic configuration attribute. May be set to 0 if not used.
Returns
Returns a characteristic object that represents these handle values and behavior.

◆ Disconnect()

void Arendi.BleLibrary.Remote.IPeripheral.Disconnect ( int  timeout = Constants.DisconnectTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Releases the connection.

Parameters
timeoutOptional timeout [ms] (Default: Constants.DisconnectTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ DisconnectAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.DisconnectAsync ( int  timeout = Constants.DisconnectTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Releases the connection.

Parameters
timeoutOptional timeout [ms] (Default: Constants.DisconnectTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ DiscoverServices()

List<IService> Arendi.BleLibrary.Remote.IPeripheral.DiscoverServices ( int  timeout = Constants.DiscoverServicesTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Discover all services of the peripheral.

Parameters
timeoutOptional timeout [ms] (Default: Constants.DiscoverServicesTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ DiscoverServicesAsync()

Task<List<IService> > Arendi.BleLibrary.Remote.IPeripheral.DiscoverServicesAsync ( int  timeout = Constants.DiscoverServicesTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Discover all services of the peripheral.

Parameters
timeoutOptional timeout [ms] (Default: Constants.DiscoverServicesTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ Encrypt()

void Arendi.BleLibrary.Remote.IPeripheral.Encrypt ( IBond  bond,
int  timeout = Constants.EncryptTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Encrypt the current connection to the peripheral by using an existing bonding.

Parameters
bondBonding used to encrypt the connection.
timeoutOptional timeout [ms] (Default: Constants.EncryptTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ EncryptAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.EncryptAsync ( IBond  bond,
int  timeout = Constants.EncryptTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Encrypt the current connection to the peripheral by using an existing bonding.

Parameters
bondBonding used to encrypt the connection.
timeoutOptional timeout [ms] (Default: Constants.EncryptTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ ExchangeAttMtu()

int Arendi.BleLibrary.Remote.IPeripheral.ExchangeAttMtu ( int  clientRxMtu,
int  timeout = Constants.ExchangeAttMtuTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Exchange the ATT MTU on the current connection to the peripheral.

Parameters
clientRxMtuClient RX MTU size.
timeoutOptional timeout [ms] (Default: Constants.ExchangeAttMtuTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.
Returns
Evaluated minimum MTU size between client and server RX MTU. This MTU is now valid on this connection.

◆ ExchangeAttMtuAsync()

Task<int> Arendi.BleLibrary.Remote.IPeripheral.ExchangeAttMtuAsync ( int  clientRxMtu,
int  timeout = Constants.ExchangeAttMtuTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Exchange the ATT MTU on the current connection to the peripheral.

Parameters
clientRxMtuClient RX MTU size.
timeoutOptional timeout [ms] (Default: Constants.ExchangeAttMtuTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.
Returns
Evaluated minimum MTU size between client and server RX MTU. This MTU is now valid on this connection.

◆ FindCharacteristic() [1/2]

ICharacteristic Arendi.BleLibrary.Remote.IPeripheral.FindCharacteristic ( string  uuid)

Find a characteristic in the service list.

The service list is available after completing the service discovery (DiscoverServicesAsync).

Parameters
uuidThe UUID of the characteristic to search for.
Returns
The characteristic object found, or null if no service has been found.

It is not recommended to search the complete peripheral for characteristic UUID's. Some characteristic UUID's may exist in more than one service and you won't know which characteristic you get. Use FindService(BleLibrary.Uuid) or FindService(string) first to search for the service and search the characteristic in the service.

The accessible service list may be limited if you use a limited BleLibrary edition. Contact Arendi AG (www.arendi.ch) for further information.

◆ FindCharacteristic() [2/2]

ICharacteristic Arendi.BleLibrary.Remote.IPeripheral.FindCharacteristic ( Uuid  uuid)

Find a characteristic in the service list.

The service list is available after completing the service discovery (DiscoverServicesAsync).

Parameters
uuidThe UUID of the characteristic to search for.
Returns
The characteristic object found, or null if no service has been found.

It is not recommended to search the complete peripheral for characteristic UUID's. Some characteristic UUID's may exist in more than one service and you won't know which characteristic you get. Use FindService(BleLibrary.Uuid) or FindService(string) first to search for the service and search the characteristic in the service.

The accessible service list may be limited if you use a limited BleLibrary edition. Contact Arendi AG (www.arendi.ch) for further information.

◆ FindService() [1/2]

IService Arendi.BleLibrary.Remote.IPeripheral.FindService ( string  uuid)

Find a service in the service list.

The service list is available after completing the service discovery (DiscoverServicesAsync).

Parameters
uuidThe UUID of the service to search for.
Returns
The service object found, or null if no service has been found.

The accessible service list may be limited if you use a limited BleLibrary edition. Contact Arendi AG (www.arendi.ch) for further information.

◆ FindService() [2/2]

IService Arendi.BleLibrary.Remote.IPeripheral.FindService ( Uuid  uuid)

Find a service in the service list.

The service list is available after completing the service discovery (DiscoverServicesAsync).

Parameters
uuidThe UUID of the service to search for.
Returns
The service object found, or null if no service has been found.

The accessible service list may be limited if you use a limited BleLibrary edition. Contact Arendi AG (www.arendi.ch) for further information.

◆ ParameterChangeRequestReply()

void Arendi.BleLibrary.Remote.IPeripheral.ParameterChangeRequestReply ( ParameterChangeRequest  parameterChangeRequest,
bool  accept 
)

Method to respond to a ParameterChangeRequest event.

Parameters
parameterChangeRequestParameter change request given by the ParameterChangeRequest event.
acceptDo we accept the parameter change request or not?

◆ ReadRssi()

int Arendi.BleLibrary.Remote.IPeripheral.ReadRssi ( int  timeout = Constants.ReadRssiTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Retrieves the current RSSI value for the peripheral while it is connected.

Parameters
timeoutOptional timeout [ms] (Default: Constants.ReadRssiTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
Returns
Returns the RSSI value.
Parameters
cancellationTokenToken to cancel an ongoing async operation.

◆ ReadRssiAsync()

Task<int> Arendi.BleLibrary.Remote.IPeripheral.ReadRssiAsync ( int  timeout = Constants.ReadRssiTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Retrieves the current RSSI value for the peripheral while it is connected.

Parameters
timeoutOptional timeout [ms] (Default: Constants.ReadRssiTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
Returns
Returns the RSSI value.
Parameters
cancellationTokenToken to cancel an ongoing async operation.

◆ Update()

void Arendi.BleLibrary.Remote.IPeripheral.Update ( IPeripheral  peripheral)

Update the static peripheral information as is connectable and it's name by later advertised peripheral.

If the UUID mismatches nothing is done.

Parameters
peripheralLater advertised peripheral that should update the current peripheral.

◆ UpdateDataLength()

void Arendi.BleLibrary.Remote.IPeripheral.UpdateDataLength ( DataLengthSet  requestedDataLength,
int  timeout = Constants.UpdateDataLengthTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Update the data length of the current connection to the peripheral.

Parameters
requestedDataLengthData length parameters to be set.
timeoutOptional timeout [ms] (Default: Constants.UpdateDataLengthTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ UpdateDataLengthAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.UpdateDataLengthAsync ( DataLengthSet  requestedDataLength,
int  timeout = Constants.UpdateDataLengthTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Update the data length parameter of the current connection to the peripheral.

Parameters
requestedDataLengthData length parameters to be set.
timeoutOptional timeout [ms] (Default: Constants.UpdateDataLengthTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ UpdateParameter()

void Arendi.BleLibrary.Remote.IPeripheral.UpdateParameter ( ParameterSet  parameter,
int  timeout = Constants.UpdateParameterTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Update the connection parameter of the current connection to the peripheral.

Parameters
parameterConnection parameters to be set.
timeoutOptional timeout [ms] (Default: Constants.UpdateParameterTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ UpdateParameterAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.UpdateParameterAsync ( ParameterSet  parameter,
int  timeout = Constants.UpdateParameterTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Update the connection parameter of the current connection to the peripheral.

Parameters
parameterConnection parameters to be set.
timeoutOptional timeout [ms] (Default: Constants.UpdateParameterTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ UpdatePhy()

void Arendi.BleLibrary.Remote.IPeripheral.UpdatePhy ( PhySet  requestedPhy,
int  timeout = Constants.UpdatePhyTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Update the phy of the current connection to the peripheral.

Parameters
requestedPhyPhys to be set.
timeoutOptional timeout [ms] (Default: Constants.UpdatePhyTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

◆ UpdatePhyAsync()

Task Arendi.BleLibrary.Remote.IPeripheral.UpdatePhyAsync ( PhySet  requestedPhy,
int  timeout = Constants.UpdatePhyTimeout,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Update the phy of the current connection to the peripheral.

Parameters
requestedPhyPhys to be set.
timeoutOptional timeout [ms] (Default: Constants.UpdatePhyTimeout). The timeout may be set to infinite by using
Timeout.Infinite
.
cancellationTokenToken to cancel an ongoing async operation.

Property Documentation

◆ Address

BluetoothAddress Arendi.BleLibrary.Remote.IPeripheral.Address
get

Get the bluetooth address of the peripheral.

This information is not available on all platforms. Platforms not supporting this information will have set this property to null.

◆ AttMtu

int Arendi.BleLibrary.Remote.IPeripheral.AttMtu
get

Get the current ATT MTU for the connection with this peripheral. The ATT MTU defines how many bytes can be written to the GATT server in one operation. After a connection has been established the ATT MTU is defined as 23. This gives a max write length of 20 bytes (3 byte GATT header). It is possible since the bluetooth 4.2 standard to exchange the MTU and negotiate a higher MTU size. If the ATT MTU changes a AttMtuChanged event is triggered.

◆ Bond

IBond Arendi.BleLibrary.Remote.IPeripheral.Bond
get

Get the bonding associated with this peripheral.
If there is no bonding with this device or if the platform doesn't support bonding handling null is returned.

◆ Central

ICentral Arendi.BleLibrary.Remote.IPeripheral.Central
get

Gets the central instance the peripheral has been created by.

◆ DataLength

DataLengthSet Arendi.BleLibrary.Remote.IPeripheral.DataLength
get

Get the data length parameter of the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn.

◆ IsConnected

bool Arendi.BleLibrary.Remote.IPeripheral.IsConnected
get

Check if the peripheral is currently connected.

◆ Log

ILog Arendi.BleLibrary.Remote.IPeripheral.Log
get

Logger instance.

◆ MaxWriteLength

int Arendi.BleLibrary.Remote.IPeripheral.MaxWriteLength
get

Get the maximum write length for all writable characteristics. This value is in most cases dependent to the AttMtu value and is allways 3 less than the AttMtu because of a GATT write header length.

◆ Name

string Arendi.BleLibrary.Remote.IPeripheral.Name
getset

The name of the peripheral

◆ Parameter

ParameterSet Arendi.BleLibrary.Remote.IPeripheral.Parameter
get

Get the connection parameter of the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn.

◆ Phy

PhySet Arendi.BleLibrary.Remote.IPeripheral.Phy
get

Get the phys used for the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn.

◆ Security

SecuritySet Arendi.BleLibrary.Remote.IPeripheral.Security
get

Get the connection security of the connection to this device. If the peripheral is not connected null is returned. If the adapter doesn't support access to connection parameters a NotSupportedException is thorwn.

◆ ServiceList

IEnumerable<IService> Arendi.BleLibrary.Remote.IPeripheral.ServiceList
get

Get the service list of the peripheral.

This list may be limited if you use a limited BleLibrary edition. Contact Arendi AG (www.arendi.ch) for further information.

◆ State

State Arendi.BleLibrary.Remote.IPeripheral.State
get

Get the state of the peripheral.

◆ Uuid

Uuid Arendi.BleLibrary.Remote.IPeripheral.Uuid
get

Get the UUID that identifies the peripheral uniquely.

Event Documentation

◆ AttMtuChanged

EventHandler<AttMtuChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.AttMtuChanged

Event triggered, when the ATT MTU has changed.

◆ AuthenticationPasskeyComplete

EventHandler<AuthenticationPasskeyCompleteEventArgs> Arendi.BleLibrary.Remote.IPeripheral.AuthenticationPasskeyComplete

Event triggered if a passkey display (see AuthenticationPasskeyDisplay) or entry (AuthenticationPasskeyEntry) may be terminated..

◆ AuthenticationPasskeyDisplay

EventHandler<AuthenticationPasskeyDisplayEventArgs> Arendi.BleLibrary.Remote.IPeripheral.AuthenticationPasskeyDisplay

Event triggered if a passkey has to be displayed.

◆ AuthenticationPasskeyEntry

EventHandler<AuthenticationPasskeyEntryEventArgs> Arendi.BleLibrary.Remote.IPeripheral.AuthenticationPasskeyEntry

Event triggered if a passkey has to be inserted. The passkey should be provided by calling AuthenticationPasskeyEntryReply.

◆ BondChanged

EventHandler<BondChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.BondChanged

Event triggered, when the bond property has changed.

◆ Connected

EventHandler<ConnectedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.Connected

Event triggered, when the peripheral gets connected.

◆ DataLengthChanged

EventHandler<DataLengthChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.DataLengthChanged

Event triggered, when the data length has changed.

◆ Disconnected

EventHandler<DisconnectedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.Disconnected

Event triggered, when the peripheral gets disconnected.

◆ Encrypted

EventHandler<EncryptedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.Encrypted

Event triggered if the connection is encrypted.

◆ ParameterChanged

EventHandler<ParameterChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.ParameterChanged

Event triggered, when the connection parameter have changed.

◆ ParameterChangeRequest

EventHandler<ParameterChangeRequestEventArgs> Arendi.BleLibrary.Remote.IPeripheral.ParameterChangeRequest

Event triggered, when the a connection parameter has been received. To respond to the request the method ParameterChangeRequestReply may be called.

If no handler is attached to this event any parameter change request is accepted.

◆ PhyChanged

EventHandler<PhyChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.PhyChanged

Event triggered, when the phy has changed.

◆ SecurityChanged

EventHandler<SecurityChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.SecurityChanged

Event triggered, when the security has changed.

◆ StateChanged

EventHandler<StateChangedEventArgs> Arendi.BleLibrary.Remote.IPeripheral.StateChanged

Event triggered, when the state of the peripheral changes.