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;
32 import java.util.UUID;
106 final short conn_interval_min,
final short conn_interval_max,
107 final short conn_latency,
final short timeout);
187 final short le_scan_interval,
final short le_scan_window,
boolean setDiscoverable(boolean value)
Sets the discoverable state the adapter.
boolean isDeviceWhitelisted(final BDAddressAndType addressAndType)
Returns true, if the adapter's device is already whitelisted.
BTDevice connectDevice(BDAddressAndType addressAndType)
This method connects to device without need of performing General Discovery.
Provides access to Bluetooth adapters.
void printDeviceLists()
Print the internally maintained BTDevice lists to stderr:
boolean isPowered()
Returns whether the adapter is valid, plugged in and powered.
HCIStatusCode reset()
Reset the adapter.
String getAlias()
Returns the friendly name of this adapter.
boolean removeDeviceFromWhitelist(final BDAddressAndType addressAndType)
Remove the given device from the adapter's autoconnect whitelist.
HCI Whitelist connection type.
String getName()
Returns the system name of this adapter.
BTDevice find(String name, BDAddressAndType addressAndType)
Find a BluetoothDevice.
HCIStatusCode startDiscovery(final boolean keepAlive, final boolean le_scan_active, final short le_scan_interval, final short le_scan_window, final byte filter_policy)
Shares same implementation as startDiscovery(boolean, boolean), but allows setting custom scan values...
BTDevice find(String name, BDAddressAndType addressAndType, long timeoutMS)
Find a BluetoothDevice.
boolean isValid()
Returns whether the adapter is valid, i.e.
int removeDiscoveredDevices()
Remove all the discovered devices found on this adapter.
int removeAllStatusListener()
Remove all AdapterStatusListener from the list.
int getDevID()
Returns the BluetoothAdapter's internal temporary device id.
ScanType getCurrentScanType()
Returns the current meta discovering ScanType.
HCIStatusCode startDiscovery(final boolean keepAlive, final boolean le_scan_active)
Turns on device discovery if it is disabled.
Unique Bluetooth EUI48 address and BDAddressType tuple.
boolean setPairable(boolean value)
Sets the discoverable state the adapter.
BDAddressAndType getVisibleAddressAndType()
Returns the adapter's currently visible BDAddressAndType.
Meta ScanType as derived from BTMode with defined value mask consisting of BDAddressType bits.
BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes.
boolean addDeviceToWhitelist(final BDAddressAndType addressAndType, final HCIWhitelistConnectType ctype)
Add the given device to the adapter's autoconnect whitelist.
Provides access to Bluetooth adapters.
boolean getDiscoverable()
Returns the discoverable state the adapter.
boolean removeStatusListener(final AdapterStatusListener l)
Remove the given AdapterStatusListener from the list.
HCIStatusCode stopDiscovery()
Turns off device discovery if it is enabled.
boolean isSuspended()
Returns whether the adapter is suspended, i.e.
boolean addStatusListener(final AdapterStatusListener listener)
Add the given AdapterStatusListener to the list if not already present.
List< BTDevice > getDiscoveredDevices()
Returns a list of discovered BluetoothDevices from this adapter.
void setAlias(String value)
Sets the friendly name of this adapter.
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 getPoweredState()
Returns the power state the adapter.
BTAdapter status listener for BTDevice discovery events: Added, updated and removed; as well as for c...
boolean removeDiscoveredDevice(final BDAddressAndType addressAndType)
Discards matching discovered devices.
boolean setPowered(boolean value)
Sets the power state the adapter.
BTManager getManager()
Returns the used singleton BTManager instance, used to create this adapter.
BDAddressAndType getAddressAndType()
Returns the adapter's public BDAddressAndType.