Package 

Interface IThingBleAbility

    • Method Detail

      • requestConnectionPriority

         abstract void requestConnectionPriority(int priority, String mac)

        Set the connection priority of a device with a mac address

        Parameters:
        priority - priority
        mac - ble device's macAddress
      • disconnect

         abstract void disconnect(String mac)

        disconnect a device with mac address

        Parameters:
        mac - ble device's macAddress
      • read

         abstract void read(String mac, UUID service, UUID character, BleReadAbilityBaseResponse response)

        Read the characteristic value under a service of Bluetooth

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        response - The callback result of reading a characteristic value under the Bluetooth serviceBleReadAbilityBaseResponse
      • write

         abstract void write(String mac, UUID service, UUID character, Array<byte> value, BleBaseResponse response)

        Write a characteristic value under a service of Bluetooth

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        value - The value of the bluetooth characteristic written
        response - The callback result of writing a characteristic value under the Bluetooth serviceBleBaseResponse
      • write

         abstract int write(String mac, UUID service, UUID character, Array<Array<byte>> value, long packTimeout)

        Write a characteristic value under a service of Bluetooth with a timeout

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        value - The value of the bluetooth characteristic written
        packTimeout - timeout of write
      • writeNoRsp

         abstract int writeNoRsp(String mac, UUID service, UUID character, Array<Array<byte>> value, int packTimeout)

        Write a characteristic value under a service of Bluetooth with a timeout,and no response

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        value - The value of the bluetooth characteristic written
        packTimeout - timeout of write
      • readDescriptor

         abstract void readDescriptor(String mac, UUID service, UUID character, UUID descriptor, BleReadAbilityBaseResponse response)

        Read a characteristic value

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        descriptor - The value of the bluetooth characteristic
        response - The callback result of read a characteristic value under the Bluetooth service,BleReadAbilityBaseResponse
      • writeDescriptor

         abstract void writeDescriptor(String mac, UUID service, UUID character, UUID descriptor, Array<byte> value, BleBaseResponse response)

        Write a descriptor value under a service of Bluetooth with a timeout

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        descriptor - A descriptor value under the Bluetooth character
        value - The value of the bluetooth characteristic written
        response - The callback result of writing a characteristic value under the Bluetooth serviceBleBaseResponse
      • writeNoRsp

         abstract void writeNoRsp(String mac, UUID service, UUID character, Array<byte> value, BleBaseResponse response)

        Write a character value under a service of Bluetooth

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        value - The value of the bluetooth characteristic written
        response - The callback result of writing a characteristic value under the Bluetooth serviceBleBaseResponse
      • notify

         abstract void notify(String mac, UUID service, UUID character, BleNotifyAbilityResponse response)

        notify a character value under a service of Bluetooth

        Parameters:
        mac - ble device's macAddress
        service - Unique sign of bluetooth service
        character - A characteristic value under the Bluetooth service
        response - The callback result of writing a characteristic value under the Bluetooth serviceBleBaseResponse
      • readRssi

         abstract void readRssi(String mac, BleGetRssiBaseResponse response)

        read a rssi by mac

        Parameters:
        mac - ble device's macAddress
        response - callback