Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
29 package org.direct_bt;
31 import java.util.List;
196 final
short conn_interval_min, final
short conn_interval_max,
197 final
short conn_latency, final
short supervision_timeout);
687 throws IllegalStateException;
long getLastUpdateTimestamp()
Returns the timestamp in monotonic milliseconds when this device instance underlying data has been up...
BTGattService find(String UUID)
Find a BluetoothGattService.
Provides access to Bluetooth adapters.
SMPPairingState getPairingState()
Returns the current SMPPairingState.
Bluetooth Security Level.
List< BTGattService > getServices()
Returns a list of BluetoothGattServices available on this device.
SMPIOCapability getConnIOCapability()
Return the SMPIOCapability value, determined when the connection is established.
boolean setConnSecurityAuto(final SMPIOCapability iocap_auto)
Set automatic security negotiation of BTSecurityLevel and SMPIOCapability pairing mode.
Bluetooth secure pairing mode.
SMPLongTermKeyInfo getLongTermKeyInfo(final boolean responder)
Returns a copy of the long term key (LTK) info, valid after connection and SMP pairing has been compl...
int removeAllCharListener()
Remove all BTGattCharListener from the list.
boolean getConnected()
Returns the connected state of the device.
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 isValid()
Returns whether the device is valid, i.e.
short getRSSI()
Returns the Received Signal Strength Indicator of the device.
Map< Short, byte[]> getManufacturerData()
Returns a map containing manufacturer specific advertisement data.
boolean removeStatusListener(final AdapterStatusListener l)
Remove the given AdapterStatusListener from the list.
short getConnectionHandle()
Return the HCI connection handle to the LE or BREDR peer, zero if not connected.
boolean pingGATT()
Issues a GATT ping to the device, validating whether it is still reachable.
SMP Long Term Key Info, used for platform agnostic persistence.
SMP Key Type for Distribution, indicates keys distributed in the Transport Specific Key Distribution ...
boolean setConnSecurityLevel(final BTSecurityLevel sec_level)
Set the BTSecurityLevel used to connect to this device on the upcoming connection.
Provides access to Bluetooth GATT characteristic.
boolean removeCharListener(final BTGattCharListener l)
Remove the given BTGattCharListener from the listener list.
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.
BTGattService find(String UUID, long timeoutMS)
Find a BluetoothGattService.
BTSecurityLevel getConnSecurityLevel()
Return the BTSecurityLevel, determined when the connection is established.
SMPKeyMask getAvailableSMPKeys(final boolean responder)
Returns the available SMPKeyMask.KeyType SMPKeyMask for the responder (LL slave) or initiator (LL mas...
HCIStatusCode setPairingNumericComparison(final boolean equal)
Method sets the numeric comparison result, see PairingMode#NUMERIC_COMPARE_ini.
boolean addStatusListener(final AdapterStatusListener listener)
Add the given AdapterStatusListener to the list if not already present, listening only for events mat...
long getCreationTimestamp()
Returns the timestamp in monotonic milliseconds when this device instance has been created,...
SMP Pairing Process state definition.
Unique Bluetooth EUI48 address and BDAddressType tuple.
boolean addCharListener(final BTGattCharListener listener)
Add the given BTGattCharListener to the listener list if not already present.
long getLastDiscoveryTimestamp()
Returns the timestamp in monotonic milliseconds when this device instance has discovered or connected...
BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes.
short getTxPower()
Returns the transmission power level (0 means unknown).
int removeAllAssociatedCharListener(final BTGattChar associatedCharacteristic)
Remove all BTGattCharListener from the list, which are associated to the given BTGattChar.
PairingMode getPairingMode()
Returns the current PairingMode used by the device.
Provides access to Bluetooth GATT characteristic.
Provides access to Bluetooth adapters.
boolean setConnIOCapability(final SMPIOCapability io_cap)
Sets the given SMPIOCapability used to connect to this device on the upcoming connection.
BDAddressAndType getAddressAndType()
Returns the unique device EUI48 address and BDAddressType type.
HCIStatusCode unpair()
Unpairs this device from the adapter while staying connected.
HCIStatusCode setPairingPasskey(final int passkey)
Method sets the given passkey entry, see PairingMode#PASSKEY_ENTRY_ini.
boolean isConnSecurityAutoEnabled()
Returns true if automatic security negotiation has been enabled via setConnSecurityAuto(SMPIOCapabili...
HCIStatusCode setPairingPasskeyNegative()
Method replies with a negative passkey response, i.e.
HCIStatusCode setLongTermKeyInfo(final SMPLongTermKeyInfo ltk)
Sets the long term ket (LTK) info of this device to reuse pre-paired encryption.
boolean setConnSecurityBest(final BTSecurityLevel sec_level, final SMPIOCapability io_cap)
Convenience method to determine the best practice BTSecurityLevel and SMPIOCapability based on the gi...
BTGattChar event listener for notification and indication events.
String getName()
Returns the remote friendly name of this device.
SMP Signature Resolving Key Info, used for platform agnostic persistence.
BTAdapter status listener for BTDevice discovery events: Added, updated and removed; as well as for c...
boolean remove()
Remove this device from the system (like an unpair).
SMPSignatureResolvingKeyInfo getSignatureResolvingKeyInfo(final boolean responder)
Returns a copy of the Signature Resolving Key (LTK) info, valid after connection and SMP pairing has ...
HCIStatusCode disconnect()
BTAdapter getAdapter()
Returns the adapter on which this device was discovered or connected.