public class BluetoothHost extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
addService(byte[] service,
short[] handles) |
boolean |
connect(byte[] deviceAddress) |
void |
disable() |
boolean |
disconnect(short connHandle) |
boolean |
discoverServices(short connHandle,
byte[] uuid) |
boolean |
enable() |
static BluetoothHost |
getInstance() |
void |
pushEvent(byte[] event) |
boolean |
sendExecuteWriteResponse(short connHandle,
short attributeHandle,
byte status) |
boolean |
sendNotification(short connHandle,
short attributeHandle,
byte[] value,
int valueSize,
boolean confirm) |
boolean |
sendPairRequest(short connHandle) |
boolean |
sendPairResponse(short connHandle,
boolean accept) |
boolean |
sendPasskeyResponse(short connHandle,
boolean accept,
int passkey) |
boolean |
sendPrepareWriteResponse(short connHandle,
short attributeHandle,
byte status,
byte[] value,
int valueSize,
int offset) |
boolean |
sendReadRequest(short connHandle,
short attributeHandle) |
boolean |
sendReadResponse(short connHandle,
short attributeHandle,
byte status,
byte[] value,
int valueSize) |
boolean |
sendWriteRequest(short connHandle,
short attributeHandle,
byte[] value,
int valueSize,
boolean noResponse) |
boolean |
sendWriteResponse(short connHandle,
short attributeHandle,
byte status) |
void |
setup(RemoteCommandClient rcommandClient,
long commandTimeout,
int eventQueueSize) |
boolean |
startAdvertising(byte[] advertisementData,
int advertisementDataSize) |
boolean |
startScanning(byte filterAction,
byte filterType,
byte[] filterData,
int filterDataSize) |
boolean |
stopAdvertising() |
boolean |
stopScanning() |
int |
waitEvent(byte[] buffer,
int bufferLength) |
public boolean addService(byte[] service, short[] handles)
public boolean connect(byte[] deviceAddress)
public void disable()
public boolean disconnect(short connHandle)
public boolean discoverServices(short connHandle, @Nullable byte[] uuid)
public boolean enable()
public static BluetoothHost getInstance()
public void pushEvent(byte[] event)
public boolean sendExecuteWriteResponse(short connHandle, short attributeHandle, byte status)
public boolean sendNotification(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)
public boolean sendPairRequest(short connHandle)
public boolean sendPairResponse(short connHandle, boolean accept)
public boolean sendPasskeyResponse(short connHandle, boolean accept, int passkey)
public boolean sendPrepareWriteResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize, int offset)
public boolean sendReadRequest(short connHandle, short attributeHandle)
public boolean sendReadResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)
public boolean sendWriteRequest(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)
public boolean sendWriteResponse(short connHandle, short attributeHandle, byte status)
public void setup(RemoteCommandClient rcommandClient, long commandTimeout, int eventQueueSize)
public boolean startAdvertising(byte[] advertisementData, int advertisementDataSize)
public boolean startScanning(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)
public boolean stopAdvertising()
public boolean stopScanning()
public int waitEvent(byte[] buffer, int bufferLength)