126 final short conn_interval_min,
final short conn_interval_max,
127 final short conn_latency,
final short timeout);
235 final
short le_scan_interval, final
short le_scan_window,
236 final
byte filter_policy,
340 final
short adv_interval_min, final
short adv_interval_max,
341 final
byte adv_type, final
byte adv_chan_map, final
byte filter_policy);
385 final
short adv_interval_min, final
short adv_interval_max,
386 final
byte adv_type, final
byte adv_chan_map, final
byte filter_policy);
642 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.
Representing a complete list of Gatt Service objects from the GATT server perspective,...
Bit mask of 'Extended Inquiry Response' (EIR) data fields, indicating a set of related data.
Collection of 'Extended Advertising Data' (EAD), 'Advertising Data' (AD) or 'Extended Inquiry Respons...
LE Link Layer Feature Set (bitmask)
LE Transport PHY bit values (bitmask)
Bluetooth adapter operating mode.
Bluetooth roles from the perspective of the link layer (connection initiator).
Bluetooth Security Level.
Discovery policy defines the BTAdapter discovery mode after connecting a remote BTDevice:
BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes.
HCI Whitelist connection type.
Meta ScanType as derived from BTMode with defined value mask consisting of BDAddressType bits.
BTAdapter represents one local Bluetooth Controller.
boolean addDeviceToWhitelist(final BDAddressAndType addressAndType, final HCIWhitelistConnectType ctype, final short conn_interval_min, final short conn_interval_max, final short conn_latency, final short timeout)
Add the given device to the adapter's autoconnect whitelist.
boolean addDeviceToWhitelist(final BDAddressAndType addressAndType, final HCIWhitelistConnectType ctype)
Add the given device to the adapter's autoconnect whitelist.
HCIStatusCode stopDiscovery()
Turns off device discovery if it is enabled.
HCIStatusCode startDiscovery()
Starts discovery using all default arguments, see startDiscovery(DiscoveryPolicy, boolean,...
BTManager getManager()
Returns the used singleton BTManager instance, used to create this adapter.
int removeDiscoveredDevices()
Remove all the discovered devices found on this adapter.
boolean isInitialized()
Returns true, if initialize(BTMode) has already been called for this adapter, otherwise false.
HCIStatusCode reset()
Reset the adapter.
boolean removeDiscoveredDevice(final BDAddressAndType addressAndType)
Discards matching discovered devices.
LE_Features getLEFeatures()
Return LE_Features for this controller.
boolean setPowered(final boolean power_on)
Sets the power state the adapter.
DBGattServer getGATTServerData()
Return the user's DBGattServer shared reference if in BTRole#Slave mode as set via and valid until su...
BTDevice find(String name, BDAddressAndType addressAndType, long timeoutMS)
Find a BluetoothDevice.
BTMode getBTMode()
Returns the current BTMode of this adapter.
boolean isDeviceWhitelisted(final BDAddressAndType addressAndType)
Returns true, if the adapter's device is already whitelisted.
boolean equals(final Object obj)
If both types are of BTAdapter, it compares their BDAddressAndType, see getAddressAndType().
HCIStatusCode startAdvertising(final DBGattServer gattServerData, final EInfoReport eir, final EIRDataTypeSet adv_mask, final EIRDataTypeSet scanrsp_mask, final short adv_interval_min, final short adv_interval_max, final byte adv_type, final byte adv_chan_map, final byte filter_policy)
Starts advertising.
HCIStatusCode setSecureConnections(final boolean enable)
Enable or disable Secure Connections (SC) of the adapter.
boolean removeDeviceFromWhitelist(final BDAddressAndType addressAndType)
Remove the given device from the adapter's autoconnect whitelist.
String getName()
Returns the name.
int removeAllStatusListener()
Remove all AdapterStatusListener from the list.
void setSMPKeyPath(final String path)
Set the adapter's persistent storage directory for SMPKeyBin files.
void setServerConnSecurity(final BTSecurityLevel sec_level, final SMPIOCapability io_cap)
Sets the given ::BTSecurityLevel and ::SMPIOCapability for connecting device when in server (peripher...
int getDevID()
Returns the BluetoothAdapter's internal temporary device id.
boolean isSuspended()
Returns whether the adapter is suspended, i.e.
boolean isValid()
Returns whether the adapter is valid, i.e.
List< BTDevice > getDiscoveredDevices()
Returns a list of discovered BluetoothDevices from this adapter.
boolean getPoweredState()
Returns the power state the adapter.
BDAddressAndType getVisibleAddressAndType()
Returns the adapter's currently visible BDAddressAndType.
boolean addStatusListener(final AdapterStatusListener listener)
Add the given AdapterStatusListener to the list if not already present.
ScanType getCurrentScanType()
Returns the current meta discovering ScanType.
HCIStatusCode setDefaultConnParam(final short conn_interval_min, final short conn_interval_max, final short conn_latency, final short supervision_timeout)
Set default connection parameter of incoming connections for this adapter when in server mode,...
HCIStatusCode setDefaultLE_PHY(final LE_PHYs Tx, final LE_PHYs Rx)
Sets default preference of LE_PHYs.
BDAddressAndType getAddressAndType()
Returns the adapter's public BDAddressAndType.
HCIStatusCode setPrivacy(boolean enable)
Toggle adapter privacy address mode, i.e.
boolean removeDevicePausingDiscovery(final BTDevice device)
Manual DiscoveryPolicy intervention point, allowing user to remove the ready device from the queue of...
BTDevice connectDevice(BDAddressAndType addressAndType)
This method connects to device without need of performing General Discovery.
HCIStatusCode setName(String name, String short_name)
Sets the name and short-name.
boolean removeStatusListener(final AdapterStatusListener l)
Remove the given AdapterStatusListener from the list.
boolean isAdvertising()
Returns the adapter's current advertising state.
DiscoveryPolicy getCurrentDiscoveryPolicy()
Return the current DiscoveryPolicy, set via startDiscovery(DiscoveryPolicy, boolean,...
boolean isPowered()
Returns whether the adapter is valid, plugged in and powered.
boolean isDiscovering()
Returns true if the meta discovering state is not ScanType#NONE.
BTRole getRole()
Return the current BTRole of this adapter.
void printDeviceLists()
Print the internally maintained BTDevice lists to stderr:
HCIStatusCode stopAdvertising()
Ends advertising.
BTDevice find(String name, BDAddressAndType addressAndType)
Find a BluetoothDevice.
boolean getSecureConnectionsEnabled()
Returns whether Secure Connections (SC) is enabled.
int getBTMajorVersion()
Returns the Bluetooth major version of this adapter.
HCIStatusCode initialize(final BTMode btMode, boolean powerOn)
Initialize the adapter with default values, including power-on.
String getShortName()
Returns the short name.
BTDevice represents one remote Bluetooth device.
A thread safe singleton handler of the BTAdapter manager, e.g.