Migration Notes
Update to version 15.0.0
Support scan for extendend advertisings
This major release brings support for extended advertisings for Android, HCI devices and Nordic Connectivity devices. By default a scan will automatically scan for extended advertisings, but there is an option in the BleConfiguration classes to disable the support for extended advertisings.
In iOS extended advertisings are supported already as the OS handles all internally. There is no option for iOS to disable the scan for extendend advertisings.
For all systems extended advertising requires support in the system of the used device.
Update to version 14.0.0
Full .NET8 support
With the release 14.0.0 the Nuget packages contain builds for "net8.0" (and sometimes "net8.0-windows"). These new builds come in addition to the existing ones.
Removed .NET6-IOS and .NET6-ANDROID support
As Microsoft dropped official support for .NET6 MAUI in May 2023 the builds for net6.0-ios and net6.0-android have been removed with this major update. This was also necessairy as building these variants is no longer possible with the latest tools from Microsoft.
Replaced .NET Framework 4.5 with .NET Framework 4.7.2
As support for .NET 4.5 was dropped by Microsoft long time ago we decided to do the same. We changed the .NET framework support from 4.5 to 4.7.2.
Replaced .NET Standard 1.0 with .NET Standard 2.0
Some of our uesd third party libraries won't support .NET Standard anymore in recommended versions. As we don't see a benefit in support for .NET Standard 1.0 anymore we increased this to the recommended .NET Standard 2.0.
Update to version 13.3.0
Full .NET7 support
With the release 13.3.0 the Nuget packages contain builds for "net7.0" (and sometimes "net7.0-windows"). These new builds come in addition to the existing ones.
Update to version 13.0.0
Major update of the Arendi.Bluetooth libraries to version 12
For the Nordic Connectivity and the HCI variant of the BleLibrary a dependency to the Arendi.Bluetooth libraries exists. With this release we have updated this library to the latest major release 12 that comes with some breaking changes (see Release Notes of Arendi.Bluetooth library). In projects with direct use of the Arendi.Bluetooth library the code may be needs some adaption.
Scan Discovery Mode with Nordic or HCI BleLibrary
With this release the discovery mode for a scan may be set in the BleConfiguration class. The previous implementations used an Observation mode, that discovers everything independently of the flags in the advertising. This is not how BLuetooth LE is supposed to work. The normal discovery modes should be "General Discovery Mode" and "Limited Discovery Mode".
Update to version 12.0.0
Full .NET6 support
With the release 12.0.0 the Nuget packages contain builds for "net6.0" (and sometimes "net6.0-windows"). These new builds come in addition to the existing ones. Till now it was also possible to use the libraries on .NET6 projects with the "netstandard 2.0" builds, but the "net6.0" packages make sense as they are more optimized and often faster by using .NET6 enhancements.
Peripheral object creation on ICentral API changed
Till the current version the PeripheralDiscovered event came with an object that implements IPeripheral in the event arguments. This caused some issues as Peripheral objects had to be created for any advertising and the ownership of this object (who will dispose?) was unclear. To reduce object creation and make ownership of the peripheral object more clear the API has changed.
New the arguments of the PeripheralDiscovered contain a uuid and a bluetooth address instead of the peripheral object:
- The Uuid can be used to check if another peripheral refers to the same peripheral the consumer of the event may alreday own.
- The Address contains the bluetooth address that came with the advertising, but this is not supported on all platforms.
To get the peripheral object from a PeripheralDiscovered event the method CreatePeripheral of the central with the event arguments as parameter can be called. This will create a peripheral object. The caller of the CreatePeripheral method is afterwards the owner of the object and should call Dispose if the peripheral is no longer needed.
A typical implementation for the PeripheralDiscovered event can be seen in the following snippet:
// create list with peripherals
List<IPeripheral> peripheralList = new List<IPeripheral>();
void CentralOnPeripheralDiscovered(object sender, PeripheralDiscoveredEventArgs e)
{
lock (peripheralList)
{
// peripheral already exists ?
if (peripheralList.Any(p => ((p.Uuid.Equals(e.Uuid)))))
{
return;
}
// ignore peripheral if not connectable
if (!e.IsConnectable) return;
// create central
var peripheral = central.CreatePeripheral(e);
// add device
peripheralList.Add(peripheral);
// show found device
Console.WriteLine($"Name:{peripheral.Name} Address:{peripheral.Address} RSSI:{e.Rssi}dBm");
}
}
CheckDiscovered method from PeripheralManager has changed arguments
As a consequnce to the change of the PeripheralDiscovered event the arguments of the CheckDiscovered method had to be adapted. Instead of the IPeripheral the method now provides the Uuid and the BuetoothAddress of a received advertising.
Previously:
bool CheckDiscovered(IPeripheral peripheral, AdvertiseInfoList advertiseInfoList, int rssi);
New:
bool CheckDiscovered(Uuid uuid, BluetoothAddress address, AdvertiseInfoList advertiseInfoList, int rssi);
Name property of IPeripheral/IManagedPeripheral may be null
With this release the Name property of a peripheral represents the situation more correctly. If no name is available for a peripheral the Name property will give back null.
Update to version 11.0.0
"Extention" namespace removed from core library
The namespace "Extention" was copied to a new library with the release of version 8.0.0 of the library. Since then the old location is obsolete. With the release of version 11.0.0 the old files were removed. If a project hasn't been adapted for the new classes it's now the time to do. The classes in the Arendi.BleLibrary.Extension library support the same features as the old ones, but are improved.
Obsolete properties from IEnhancedPeripheral removed
The properties RssiIntervalDefault and RssiInterval have been removed. Use there replacement ConnectionRssiIntervalDefault and ConnectionRssiInterval instead.
Update to version 10.0.0
HID library changed
With this release we replaced the previously used HID library HidSharp with the Hid.Net library. The reason for this change is that the HidSharp project is abandoned quite a long time. Even proposed bugfixes have not been integrated. The tests with the newly used Hid.Net library have all passed and also the performance looked equal to the HidSharp library.
Update to version 9.0.0
"Extention" namespace reintegrated for compatibility reason
To simplify upgrade process the previous namespace "Arendi.BleLibrary.Extention" was reintegrated to allow compatibility with old components. All classes in this namespace are marked as deprecated and it is strongly recommended to change to the classes in the Arendi.BleLibrary.Extension library/package.
.NET Standard 2.0 Support
With this release we start to provide the adapter assemblies also as .NET Standard 2.0 build. If you are using the NuGet packages you shouldn't need to be aware of what version you need. It will automatically take the right one for you.
Update to version 8.0.0
"Extention" namespace moved to dedicated assembly and renamed to "Extension"
The "Extention" layer was always designed as an additional layer on top of the core API. The core API implements all the standard operations for Bluetooth Low Energy. While working with this core API we discovered that there are some higher level behaviors we need in a lot of projects. So we decided to add these functions to the BleLibrary, but still they always where an optional addon.
With this release we decided to move this optional addition layer into an own assembly to get a more clear splitting between the Core API and the Extension API. Additionally we have fixed the naming of the Namespace from "Arendi.BleLibrary.Extention" to "Arendi.BleLibrary.Extension".
When updating to this or a higher version it might be needed to:
- Add the new Arendi.BleLibrary.Extension assembly to the references.
- Adjust the using directives to the changed Namespace name.
Changed way to change connection priority on Android
Android doesn't provide an API in there BLE stack to change the connection parameters. As a replacement they have implemented a function to change the connection priority between "Balanced", "High" and "Low Power". As this is a Android specific API for BLE stacks we don't have dedicated support for this operation in the IPeripheral interface. Till now it was possible to cast the IPeripheral object of the core API to an Arendi.BleLibrary.Android.Peripheral object and use the "UpdateConnectionPriority" method on this casted object. With version 8.0.0 of the BleLibrary the peripheral class is not public anymore. To use the "UpdateConnectionPriority"it is now required to cast the IPeripheral object to an IPeripheralAndroid object.
Update to version 7.0.0
Changed References
With the update to version 7.0.0 the referenced library Arendi.DotNETLibrary was updated to version 5.x. As the Arendi.DotNETLibrary 4.x is not compatible with the Arendi.DotNETLibrary 5.x some references need to be updated in libraries and applications using the Arendi.BleLibrary.
Current Reference | New Reference |
---|---|
Arendi.DotNETLibrary 4.x | Arendi.DotNETLibrary 5.x |
Arendi.DotNETLibrary.Windows 4.x | Arendi.DotNETLibrary.Log.log4net 5.x *Arendi.DotNETLibrary.Serial.Comport 5.x *Arendi.DotNETLibrary.Serial.HidSharp 5.x *Arendi.DotNETLibrary.Console 5.x *only if required |
Arendi.DotNETLibrary.Android 4.x | Arendi.DotNETLibrary.Log.Android 5.x |
Arendi.DotNETLibrary.iOS 4.x | Arendi.DotNETLibrary.Log.iOS 5.x |
Arendi.Bluetooth.Hci 1.x | Arendi.Bluetooth.Hci 2.x |
Arendi.Bluetooth.Connectivity.* 7.x | Arendi.Bluetooth.Connectivity.* 8.x |