Direct-BT v3.2.3-1-g688f983
Direct-BT - Direct Bluetooth Programming.
Classes
Package org.direct_bt

Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright (c) 2020 Gothel Software e.K. More...

Classes

class  AdapterSettings
 Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright (c) 2020 Gothel Software e.K. More...
 
class  AdapterStatusListener
 BTAdapter status listener for remote BTDevice discovery events: Added, updated and removed; as well as for certain BTAdapter events. More...
 
class  BDAddressAndType
 Unique Bluetooth EUI48 address and BDAddressType tuple. More...
 
enum  BDAddressType
 Bluetooth address type constants. More...
 
enum  BLERandomAddressType
 Bluetooth LE random address type constants. More...
 
interface  BTAdapter
 BTAdapter represents one local Bluetooth Controller. More...
 
interface  BTDevice
 BTDevice represents one remote Bluetooth device. More...
 
class  BTDeviceRegistry
 Application toolkit providing BT device registration of processed and awaited devices. More...
 
class  BTException
 
class  BTFactory
 One stop BTManager API entry point. More...
 
interface  BTGattChar
 Representing a Gatt Characteristic object from the GATT client perspective. More...
 
class  BTGattCharListener
 BTGattChar event listener for notification and indication events. More...
 
class  BTGattCmd
 Class maps a GATT command and optionally its asynchronous response to a synchronous atomic operation. More...
 
interface  BTGattDesc
 Representing a Gatt Characteristic Descriptor object from the GATT client perspective. More...
 
interface  BTGattService
 Representing a Gatt Service object from the GATT client perspective. More...
 
interface  BTManager
 A thread safe singleton handler of the BTAdapter manager, e.g. More...
 
enum  BTMode
 Bluetooth adapter operating mode. More...
 
interface  BTObject
 
enum  BTRole
 Bluetooth roles from the perspective of the link layer (connection initiator). More...
 
enum  BTSecurityLevel
 Bluetooth Security Level. More...
 
class  BTSecurityRegistry
 Application toolkit providing BT security setup and its device association on a pattern matching basis, i.e. More...
 
class  BTUtils
 
class  DBGattChar
 Representing a Gatt Characteristic object from the GATT server perspective. More...
 
class  DBGattDesc
 Representing a Gatt Characteristic Descriptor object from the GATT server perspective. More...
 
class  DBGattServer
 Representing a complete list of Gatt Service objects from the GATT server perspective, i.e. More...
 
class  DBGattService
 Representing a Gatt Service object from the ::GATTRole::Server perspective. More...
 
class  DBGattValue
 A copy of the native GATT value of DBGattChar or DBGattDesc. More...
 
class  DirectBTVersion
 This jaulib derived version info class is only usable when having jaulib available, naturally. More...
 
enum  DiscoveryPolicy
 Discovery policy defines the BTAdapter discovery mode after connecting a remote BTDevice: More...
 
class  EInfoReport
 Collection of 'Extended Advertising Data' (EAD), 'Advertising Data' (AD) or 'Extended Inquiry Response' (EIR) information. More...
 
class  EIRDataTypeSet
 Bit mask of 'Extended Inquiry Response' (EIR) data fields, indicating a set of related data. More...
 
class  GAPFlags
 Bit mask of 'Extended Inquiry Response' (EIR) data fields, indicating a set of related data. More...
 
class  GattCharPropertySet
 Bit mask of GATT Characteristic Properties. More...
 
enum  HCIStatusCode
 BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes. More...
 
enum  HCIWhitelistConnectType
 HCI Whitelist connection type. More...
 
class  LE_Features
 LE Link Layer Feature Set (bitmask) More...
 
class  LE_PHYs
 LE Transport PHY bit values (bitmask) More...
 
enum  PairingMode
 Bluetooth secure pairing mode. More...
 
class  PlatformToolkit
 Miscellaneous platform utilities, allowed to be used within same Java package.
 
enum  ScanType
 Meta ScanType as derived from BTMode with defined value mask consisting of BDAddressType bits. More...
 
class  SMPIdentityResolvingKey
 SMP Identity Resolving Key, used for platform agnostic persistence. More...
 
enum  SMPIOCapability
 SMP IO Capability value. More...
 
class  SMPKeyBin
 Storage for SMP keys including required connection parameter per local adapter and remote device. More...
 
class  SMPKeyMask
 SMP Key Type for Distribution, indicates keys distributed in the Transport Specific Key Distribution phase. More...
 
class  SMPLinkKey
 Local SMP Link Key, used for platform agnostic persistence, mapping to platform specific link keys format. More...
 
class  SMPLongTermKey
 SMP Long Term Key, used for platform agnostic persistence. More...
 
enum  SMPPairingState
 SMP Pairing Process state definition. More...
 
class  SMPSignatureResolvingKey
 SMP Signature Resolving Key, used for platform agnostic persistence. More...
 

Detailed Description

Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright (c) 2020 Gothel Software e.K.

Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright (c) 2022 Gothel Software e.K.

Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright (c) 2021 Gothel Software e.K.


Direct-BT Overview

Direct-BT provides direct Bluetooth LE and BREDR programming, offering robust high-performance support for embedded & desktop with zero overhead via C++ and Java.

Direct-BT follows the official Bluetooth Specification and its C++ implementation contains detailed references.

Direct-BT supports a fully event driven workflow from adapter management via device discovery to GATT programming, using its platform agnostic HCI, GATT, SMP and L2CAP client-side protocol implementation.


Direct-BT Layers

Direct-BT implements the following layers

BTManager utilizes the BlueZ Kernel Manager Control Channel for adapter configuration and adapter add/removal notifications (ChangedAdapterSetFunc()).

To support other platforms than Linux/BlueZ, we will have to


Direct-BT User Hierarchy

From a user central-client perspective the following hierarchy is provided, i.e. GATT client role or BTAdapter in BTRole#Master:

From a user peripheral-server perspective the following hierarchy is provided, i.e. GATT server role or BTAdapter in BTRole#Slave:


Direct-BT Object Lifecycle

Object lifecycle with all instances and marked weak back-references to their owner

User application instantiates for peripheral-server functionality:


Direct-BT Mapped Names C++ vs Java

Mapped names from C++ implementation to Java implementation and to Java interface:

C++
direct_bt
Java Implementation
jau.direct_bt
Java Interface
org.direct_bt
BTManager DBTManager BTManager
BTAdapter DBTAdapter BTAdapter
BTDevice DBTDevice BTDevice
BTGattService DBTGattService BTGattService
BTGattChar DBTGattChar BTGattChar
BTGattDesc DBTGattDesc BTGattDesc
DBGattService DBGattService
DBGattChar DBGattChar
DBGattDesc DBGattDesc
AdapterStatusListener AdapterStatusListener
BTGattCharListener BTGattCharListener
ChangedAdapterSetFunc() BTManager::ChangedAdapterSetListener

Direct-BT Event Driven Workflow

A fully event driven workflow from adapter management via device discovery to GATT programming is supported.

BTManager::ChangedAdapterSetListener allows listening to added and removed BTAdapter via BTManager.

AdapterStatusListener allows listening to BTAdapter changes and BTDevice discovery.

BTGattCharListener allows listening to GATT indications and notifications.

Main event listener can be attached to these objects which maintain a set of unique listener instances without duplicates.

Other API attachment method exists for BTGattCharListener, however, they only exists for convenience and end up to be attached to BTGattHandler.

Copyright (c) 2020 ZAFENA AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2021 ZAFENA AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2022 ZAFENA AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.