Search Results for

    Show / Hide Table of Contents

    Migration Notes

    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 packages come in addition to the existing packages. 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 obejct 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
    • Improve this Doc
    In This Article
    Back to top Version 12.0.0.43
    Copyright © 2022 Arendi AG