Plugin.BluetoothLE 2.0.2

ACR Bluetooth LE Reactive Plugin for Xamarin

Cross Platform Reactive Bluetooth LE Plugin for Xamarin

Supported Platforms
Android 4.3+
iOS 7+

There is a newer version of this package available.
See the version list below for details.
Install-Package Plugin.BluetoothLE -Version 2.0.2
dotnet add package Plugin.BluetoothLE --version 2.0.2
<PackageReference Include="Plugin.BluetoothLE" Version="2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Plugin.BluetoothLE --version 2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

[fix][android] more gatt133 fixes
[fix][android] additional fixes for cancel connection
[fix][android] Connect completion wasn't being called properly

[fix][android] finalization was causing NRE

[feature] macOS support
[feature][all] Connection configuration allows you to set connection priority, notification states on iOS, tvOS, macOS, and whether or not to make the connection persistent
[feature][macos/tvos/ios] Background mode via CBCentralInitOptions - On the platform project use BleAdapter.Init(BleAdapterConfiguration)
[feature][ios] Background - Adapter.WhenDeviceStateRestored() will allow to hook for background state restoration (must be used in conjunction with BleAdapter.Init)
[feature][uwp][droid] Reliable write transaction via Device.BeginReliableWriteTransaction() and GattReliableWriteTransaction
[feature][uwp][droid] WriteBlob now uses reliable write transactions
[feature] Adapter.GetPairedDevices() - pretty self explanatory
[breaking][feature] RequestMtu now returns as an observable with what the accepted MTU was
[breaking] CreateConnection is gone - created more issues than it solved - Use Connect() as it creates persistent connections out of the gate
[breaking] Disconnect has been renamed to CancelConnection as it cancels any pending connections now
[breaking] Logging is gone.  It just isn't needed in light of all of the top level events
[fix][droid] disconnect on existing connection tries
[fix][droid] more gatt 133 issues
[fix][all] Blob write observable subscriptions not firing properly
[fix][all] NotifyEncryptionRequired, Indicate, and IndicateEncryptionRequired return true for CanNotify

[fix][droid] descriptors and characteristic read/writes now adhere to AndroidConfig.WriteOnMainThread
[fix][ios] WhenStatusChanged was causing OnError when a connection failure occurred
[fix][core] BlobWrite will now use proper MTU
[breaking][feature][core] Background scan has been replaced.  The normal scan now takes a configuration.
[feature][core] Get current MTU size
[feature][droid] monitor MTU changes

[feature] ability to open bluetooth settings configuration
[feature] ability to request MTU is now part of device (still only available on droid - but allows for greater flexibility)
[feature][droid] ability to pair with a device
[feature][droid] ability to toggle bluetooth adapter status

[BREAKING] Characteristic/Descriptor Read, Write, and Notification events now return CharacteristicResult that includes the sender characteristic as well as the data
[fix][droid] Write was not broadcasting completion at the right time

[fix] completion of ReadUntil

[feature] IGattCharacteristic.ReadUntil(endBytes) extension method will read in a loop until end bytes detected
[feature][droid] AndroidConfig.MaxTransmissionUnitSize (MTU) can now be set to negotiate MTU upon connections

[fix][droid] write on main thread (can use AndroidConfig.WriteOnMainThread = false, to disable)
[feature] Blob write
[feature] Logging now has deviceconnected/devicedisconnected if you wish to monitor just one of the status'

[fix] ability to check for true WriteNoResponse flags
[fix][droid] ship proper unsubscribe bytes

[fix] logging cleanup
[feature][core] add logging abilities from device reference
[feature][droid] add improved way to deal with Android connection issues (please read docs under Android Troubleshooting)

[fix][core] logging would not hook properly to existing connected devices
[fix][droid] deal with gatt error 133 by delaying service discovery post connection
[workaround] tvOS was having issues. temporarily pulled from nuget

[feature] write without response void method added
[feature] proper equals check for all ble objects

[fix][all] new adapter scans only clear disconnected devices from cache
[feature] Adapter.GetConnectedDevices

[fix][droid] WhenStatusChanged firing on subscription and replays properly
[fix][droid] properly parsing 16 and 32bit UUIDs in advertisement packet

[breaking] WhenActionOccurs renamed to CreateLogger
[fix] ensure WhenScanStatusChanged() broadcasts its current state on registration
Logging now returns actual packet received where applicable

adding tvOS libraries to package (NOT TESTED)
[fix] createconnection properly persists connection now
[fix] more logging and discovery issues
[fix][droid] device.readrssi was not working
[droid] device.whenstatuschanged will now broadcast Connecting/Disconnecting
[droid] advertisement packet now gets all service UUIDs parsed

[fix] Error notifications on read/writes
[fix] Make sure to replay last status for connectable observables
[fix] Service discovery on iOS and Android was not registering subsequent subscriptions properly
[fix][droid] Read/Write callbacks now passing values back properly
[breaking] PersistentConnection is now CreateConnection with improvements to status reporting

Vastly improved logging
Improvements to observable allocations
Improvements in service discovery

[breaking] Change extension method names

[breaking] Characteristic method WhenNotificationOccurs() is now called WhenNotificationReceived().  It also no longer subscribes to notifications.  Use new method SubscribeToNotifications().  WhenNotificationReceived() is for logging purposes

Add heartrate plugin (extension method)
Add super logging plugin (extension method)
Characteristics and Descriptors now have WhenRead/WhenWritten events to monitor calls externally

ScanListen for working with scan results from a background or decoupled component

BackgroundScan added and ScanFilter removed
Multiple entry points can now hook up to scan, but only one will run (connectable refcount observable)

Initial Public Release

Version History

Version Downloads Last updated
6.2.3 12,457 11/18/2018
6.2.2 4,815 9/28/2018
6.2.1 857 9/11/2018
6.2.0 1,386 8/18/2018
6.1.3 3,974 7/14/2018
6.1.2 887 7/6/2018
6.1.1 437 6/28/2018
6.1.0 321 6/26/2018
6.1.0-beta3 174 6/22/2018
6.1.0-beta2 228 6/21/2018
6.1.0-beta1 182 6/9/2018
6.0.3 3,115 5/6/2018
6.0.2 926 4/29/2018
6.0.1 530 4/27/2018
6.0.0 826 4/22/2018
6.0.0-beta5 193 4/17/2018
6.0.0-beta4 283 4/14/2018
6.0.0-beta3 1,654 2/7/2018
6.0.0-beta2 513 1/13/2018
6.0.0-beta1 254 12/26/2017
5.3.5 2,406 3/23/2018
5.3.4 919 3/11/2018
5.3.3 354 3/6/2018
5.3.2 1,712 1/22/2018
5.3.1 1,004 12/8/2017
5.3.0 396 12/4/2017
5.2.2 465 11/24/2017
5.2.0 1,340 11/11/2017
5.1.0 743 10/29/2017
5.1.0-beta2 160 10/24/2017
5.1.0-beta1 156 10/23/2017
5.0.0 1,146 9/9/2017
4.0.1 702 8/15/2017
4.0.0 704 6/28/2017
4.0.0-beta1 202 6/7/2017
3.2.0-beta1 217 5/28/2017
3.1.1 1,201 5/25/2017
3.1.0 256 5/23/2017
3.0.0 290 5/19/2017
3.0.0-beta3 268 5/7/2017
3.0.0-beta2 212 4/30/2017
3.0.0-beta1 234 4/21/2017
2.0.3 809 3/29/2017
2.0.2 365 3/13/2017
2.0.1 227 3/10/2017
2.0.0 1,540 3/3/2017
1.0.0 416 10/16/2016
Show less