Class BluetoothHost


  • public class BluetoothHost
    extends Object
    • Method Detail

      • onEventAvailable

        public void onEventAvailable()
      • waitEvent

        public int waitEvent​(byte[] buffer,
                             int bufferLength)
      • enable

        public boolean enable()
      • disable

        public void disable()
      • startScanning

        public boolean startScanning​(byte filterAction,
                                     byte filterType,
                                     byte[] filterData,
                                     int filterDataSize)
      • stopScanning

        public boolean stopScanning()
      • startAdvertising

        public boolean startAdvertising​(byte[] advertisementData,
                                        int advertisementDataSize)
      • stopAdvertising

        public boolean stopAdvertising()
      • connect

        public boolean connect​(byte[] deviceAddress)
      • disconnect

        public boolean disconnect​(short connHandle)
      • sendPairRequest

        public boolean sendPairRequest​(short connHandle)
      • sendPairResponse

        public boolean sendPairResponse​(short connHandle,
                                        boolean accept)
      • sendPasskeyResponse

        public boolean sendPasskeyResponse​(short connHandle,
                                           boolean accept,
                                           int passkey)
      • discoverServices

        public boolean discoverServices​(short connHandle,
                                        @Nullable
                                        byte[] uuid)
      • addService

        public boolean addService​(byte[] service,
                                  short[] handles)
      • sendReadRequest

        public boolean sendReadRequest​(short connHandle,
                                       short attributeHandle)
      • sendWriteRequest

        public boolean sendWriteRequest​(short connHandle,
                                        short attributeHandle,
                                        byte[] value,
                                        int valueSize,
                                        boolean noResponse)
      • sendReadResponse

        public boolean sendReadResponse​(short connHandle,
                                        short attributeHandle,
                                        byte status,
                                        byte[] value,
                                        int valueSize)
      • sendWriteResponse

        public boolean sendWriteResponse​(short connHandle,
                                         short attributeHandle,
                                         byte status)
      • sendPrepareWriteResponse

        public boolean sendPrepareWriteResponse​(short connHandle,
                                                short attributeHandle,
                                                byte status,
                                                byte[] value,
                                                int valueSize,
                                                int offset)
      • sendExecuteWriteResponse

        public boolean sendExecuteWriteResponse​(short connHandle,
                                                short attributeHandle,
                                                byte status)
      • sendNotification

        public boolean sendNotification​(short connHandle,
                                        short attributeHandle,
                                        byte[] value,
                                        int valueSize,
                                        boolean confirm)