196 final
short conn_interval_min, final
short conn_interval_max,
197 final
short conn_latency, final
short supervision_timeout);
BTAdapter status listener for remote BTDevice discovery events: Added, updated and removed; as well a...
Unique Bluetooth EUI48 address and BDAddressType tuple.
BTGattChar event listener for notification and indication events.
Collection of 'Extended Advertising Data' (EAD), 'Advertising Data' (AD) or 'Extended Inquiry Respons...
LE Transport PHY bit values (bitmask)
SMP Identity Resolving Key, used for platform agnostic persistence.
Storage for SMP keys including required connection parameter per local adapter and remote device.
SMP Key Type for Distribution, indicates keys distributed in the Transport Specific Key Distribution ...
Local SMP Link Key, used for platform agnostic persistence, mapping to platform specific link keys fo...
SMP Long Term Key, used for platform agnostic persistence.
SMP Signature Resolving Key, used for platform agnostic persistence.
Bluetooth roles from the perspective of the link layer (connection initiator).
Bluetooth Security Level.
BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes.
Bluetooth secure pairing mode.
SMP Pairing Process state definition.
BTAdapter represents one local Bluetooth Controller.
BTDevice represents one remote Bluetooth device.
HCIStatusCode setPairingNumericComparison(final boolean equal)
Method sets the numeric comparison result, see PairingMode#NUMERIC_COMPARE_ini.
BTAdapter getAdapter()
Returns the adapter on which this device was discovered or connected.
boolean removeStatusListener(final AdapterStatusListener l)
Remove the given AdapterStatusListener from the list.
String getName()
Returns the remote device name.
BTSecurityLevel getConnSecurityLevel()
Return the BTSecurityLevel, determined when the connection is established.
BTRole getRole()
Return the fixed BTRole of this remote BTDevice.
BTGattService findGattService(String service_uuid)
Find a BTGattService by its service_uuid.
short getConnectionHandle()
Return the HCI connection handle to the LE or BREDR peer, zero if not connected.
boolean sendNotification(final short char_value_handle, final byte[] value)
Send a notification event consisting out of the given value representing the given characteristic val...
boolean isPrePaired()
Returns true if this device has completed SMP pairing or keys are set via uploadKeys()
EInfoReport getEIRInd()
Return the latest advertised EInfoReport AD_IND variant for this remote device.
HCIStatusCode uploadKeys()
Upload all set keys to the adapter for pre-pairing.
SMPLinkKey getLinkKey(final boolean responder)
Returns a copy of the Link Key (LK), valid after connection and SMP pairing has been completed.
int getResponderSMPPassKey()
Returns the responder SMP passkey, ranging from [0..999999].
boolean removeCharListener(final BTGattCharListener l)
Remove the given BTGattCharListener from the listener list.
boolean addCharListener(final BTGattCharListener listener)
Add the given BTGattCharListener to the listener list if not already present.
void setIdentityResolvingKey(final SMPIdentityResolvingKey irk)
Sets the Identity Resolving Key (IRK) of this device for pre-paired encryption.
EInfoReport getEIRScanRsp()
Return the latest advertised EInfoReport AD_SCAN_RSP for this remote device.
boolean setConnSecurityAuto(final SMPIOCapability iocap_auto)
Set automatic security negotiation of BTSecurityLevel and SMPIOCapability pairing mode.
long getLastUpdateTimestamp()
Returns the timestamp in monotonic milliseconds when this device instance underlying data has been up...
boolean setConnSecurity(final BTSecurityLevel sec_level, final SMPIOCapability io_cap)
Sets the given BTSecurityLevel and SMPIOCapability used to connect to this device on the upcoming con...
boolean sendIndication(final short char_value_handle, final byte[] value)
Send an indication event consisting out of the given value representing the given characteristic valu...
void setSignatureResolvingKey(final SMPSignatureResolvingKey csrk)
Sets the Signature Resolving Key (CSRK) of this device for pre-paired encryption.
boolean pingGATT()
Issues a GATT ping to the device, validating whether it is still reachable.
LE_PHYs getRxPhys()
Return the Rx LE_PHYs as notified via LE_PHY_UPDATE_COMPLETE or retrieved via getConnectedLE_PHY(LE_P...
HCIStatusCode unpair()
Unpair this device from the adapter while staying connected.
SMPIdentityResolvingKey getIdentityResolvingKey(final boolean responder)
Returns a copy of the Identity Resolving Key (IRK), valid after connection and SMP pairing has been c...
short getTxPower()
Return Tx Power Level in dBm with ±6 dB accuracy of device as recognized at discovery and connect.
HCIStatusCode connectDefault()
jau.direct_bt: Establish a default HCI connection to this device, using certain default parameter.
boolean remove()
Remove this device from the system (like an unpair).
List< BTGattService > getGattServices()
Returns a complete list of shared BTGattService available on this device, initially retrieved via GAT...
String getResponderSMPPassKeyString()
Returns getResponderSMPPassKey() as a canonical string, e.g.
boolean getConnected()
Returns the connected state of the device.
boolean equals(final Object obj)
If both types are of BTDevice, it compares their BDAddressAndType, see getAddressAndType().
SMPKeyMask getAvailableSMPKeys(final boolean responder)
Returns the available SMPKeyMask.KeyType SMPKeyMask for the responder (LL slave) or initiator (LL mas...
HCIStatusCode getConnectedLE_PHY(LE_PHYs[] resRx, LE_PHYs[] resTx)
Request and return LE_PHYs bit for the given connection.
boolean setSMPKeyBin(final SMPKeyBin bin)
Copy all keys from the given SMPKeyBin into this BTDevice.
SMPPairingState getPairingState()
Returns the current SMPPairingState.
SMPIOCapability getConnIOCapability()
Return the SMPIOCapability value, determined when the connection is established.
int removeAllCharListener()
Remove all BTGattCharListener from the list.
short getRSSI()
Returns Received Signal Strength Indicator (RSSI) in dBm with ±6 dB accuracy of device as recognized ...
EInfoReport getEIR()
Return the merged advertised EInfoReport for this remote device.
boolean isValid()
Returns whether the device is valid, i.e.
void setLinkKey(final SMPLinkKey lk)
Sets the Link Key (LK) of this device for pre-paired encryption.
long getLastDiscoveryTimestamp()
Returns the timestamp in monotonic milliseconds when this device instance has discovered or connected...
void setLongTermKey(final SMPLongTermKey ltk)
Sets the Long Term Key (LTK) of this device for pre-paired encryption.
HCIStatusCode connectLE(final short le_scan_interval, final short le_scan_window, final short conn_interval_min, final short conn_interval_max, final short conn_latency, final short supervision_timeout)
Establish a HCI BDADDR_LE_PUBLIC or BDADDR_LE_RANDOM connection to this device.
SMPSignatureResolvingKey getSignatureResolvingKey(final boolean responder)
Returns a copy of the Signature Resolving Key (CSRK), valid after connection and SMP pairing has been...
boolean isConnSecurityAutoEnabled()
Returns true if automatic security negotiation has been enabled via setConnSecurityAuto(SMPIOCapabili...
HCIStatusCode disconnect()
jau.direct_bt: Disconnect the LE or BREDR peer's GATT and HCI connection.
int removeAllAssociatedCharListener(final BTGattChar associatedCharacteristic)
Remove all BTGattCharListener from the list, which are associated to the given BTGattChar.
BTGattChar findGattChar(String service_uuid, String char_uuid)
Find a BTGattChar by its service_uuid and char_uuid.
boolean addStatusListener(final AdapterStatusListener listener)
Add the given AdapterStatusListener to the list if not already present, listening only for events mat...
HCIStatusCode setPairingPasskeyNegative()
Method replies with a negative passkey response, i.e.
HCIStatusCode setPairingPasskey(final int passkey)
Method sets the given passkey entry, see PairingMode#PASSKEY_ENTRY_ini.
long getCreationTimestamp()
Returns the timestamp in monotonic milliseconds when this device instance has been created,...
PairingMode getPairingMode()
Returns the current PairingMode used by the device.
BDAddressAndType getVisibleAddressAndType()
Returns the devices' visible BDAddressAndType, i.e.
BDAddressAndType getAddressAndType()
Returns the devices' unique EUI48 address and BDAddressType type tuple, might be its initially report...
HCIStatusCode setConnectedLE_PHY(final LE_PHYs Tx, final LE_PHYs Rx)
Sets preference of used LE_PHYs for the given connection.
SMPLongTermKey getLongTermKey(final boolean responder)
Returns a copy of the long term key (LTK), valid after connection and SMP pairing has been completed.
LE_PHYs getTxPhys()
Return the Tx LE_PHYs as notified via LE_PHY_UPDATE_COMPLETE or retrieved via getConnectedLE_PHY(LE_P...
Representing a Gatt Characteristic object from the GATT client perspective.
Representing a Gatt Service object from the GATT client perspective.