public class BluetoothHost
extends java.lang.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() |
boolean |
pair(short connHandle) |
boolean |
pairReply(short connHandle,
boolean accept) |
boolean |
passkeyReply(short connHandle,
boolean accept,
int passkey) |
void |
pushEvent(byte[] event) |
boolean |
sendNotification(short connHandle,
short attributeHandle,
byte[] value,
int valueSize,
boolean confirm) |
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(ej.rcommand.synchronous.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 static BluetoothHost getInstance()
public void setup(ej.rcommand.synchronous.RemoteCommandClient rcommandClient, long commandTimeout, int eventQueueSize)
public void pushEvent(byte[] event)
public int waitEvent(byte[] buffer, int bufferLength)
public boolean enable()
public void disable()
public boolean startScanning(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)
public boolean stopScanning()
public boolean startAdvertising(byte[] advertisementData, int advertisementDataSize)
public boolean stopAdvertising()
public boolean connect(byte[] deviceAddress)
public boolean disconnect(short connHandle)
public boolean pair(short connHandle)
public boolean pairReply(short connHandle, boolean accept)
public boolean passkeyReply(short connHandle, boolean accept, int passkey)
public boolean discoverServices(short connHandle, @Nullable byte[] uuid)
public boolean addService(byte[] service, short[] handles)
public boolean sendReadRequest(short connHandle, short attributeHandle)
public boolean sendWriteRequest(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)
public boolean sendReadResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)
public boolean sendWriteResponse(short connHandle, short attributeHandle, byte status)
public boolean sendNotification(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)