Package ej.bluetooth
Class BluetoothNatives
- java.lang.Object
-
- ej.bluetooth.BluetoothNatives
-
public class BluetoothNatives extends java.lang.ObjectNot in API.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanaddService(byte[] service, short[] handles)static booleanconnect(byte[] deviceAddress)static voiddisable()static booleandisconnect(short connHandle)static booleandiscoverServices(short connHandle, byte[] uuid)static booleanenable()static booleansendExecuteWriteResponse(short connHandle, short attributeHandle, byte status)static booleansendNotification(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)static booleansendPairRequest(short connHandle)static booleansendPairResponse(short connHandle, boolean accept)static booleansendPasskeyResponse(short connHandle, boolean accept, int passkey)static booleansendPrepareWriteResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize, int offset)static booleansendReadRequest(short connHandle, short attributeHandle)static booleansendReadResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)static booleansendWriteRequest(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)static booleansendWriteResponse(short connHandle, short attributeHandle, byte status)static booleanstartAdvertising(byte[] advertisementData, int advertisementDataSize)static booleanstartScanning(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)static booleanstopAdvertising()static booleanstopScanning()static intwaitEvent(byte[] buffer, int bufferLength)
-
-
-
Method Detail
-
waitEvent
public static int waitEvent(byte[] buffer, int bufferLength)
-
enable
public static boolean enable()
-
disable
public static void disable()
-
addService
public static boolean addService(byte[] service, short[] handles)
-
startScanning
public static boolean startScanning(byte filterAction, byte filterType, byte[] filterData, int filterDataSize)
-
stopScanning
public static boolean stopScanning()
-
startAdvertising
public static boolean startAdvertising(byte[] advertisementData, int advertisementDataSize)
-
stopAdvertising
public static boolean stopAdvertising()
-
connect
public static boolean connect(byte[] deviceAddress)
-
disconnect
public static boolean disconnect(short connHandle)
-
sendPairRequest
public static boolean sendPairRequest(short connHandle)
-
sendPairResponse
public static boolean sendPairResponse(short connHandle, boolean accept)
-
sendPasskeyResponse
public static boolean sendPasskeyResponse(short connHandle, boolean accept, int passkey)
-
discoverServices
public static boolean discoverServices(short connHandle, @Nullable byte[] uuid)
-
sendReadRequest
public static boolean sendReadRequest(short connHandle, short attributeHandle)
-
sendWriteRequest
public static boolean sendWriteRequest(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean noResponse)
-
sendReadResponse
public static boolean sendReadResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize)
-
sendWriteResponse
public static boolean sendWriteResponse(short connHandle, short attributeHandle, byte status)
-
sendPrepareWriteResponse
public static boolean sendPrepareWriteResponse(short connHandle, short attributeHandle, byte status, byte[] value, int valueSize, int offset)
-
sendExecuteWriteResponse
public static boolean sendExecuteWriteResponse(short connHandle, short attributeHandle, byte status)
-
sendNotification
public static boolean sendNotification(short connHandle, short attributeHandle, byte[] value, int valueSize, boolean confirm)
-
-