---
name: "bluetoothCapabilityIsSupport"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "2.2.1" }
platform:
  - "iOS"
  - "Android"
async: true
---

## bluetoothCapabilityIsSupport

> [VERSION] DeviceKit >= 2.2.1

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Whether the Bluetooth device supports a capability. capability: different values correspond to the specific capability to query 0: whether DPs are controllable during OTA 1: whether the gateway and App use low-power online logic for this device 2: whether Beacon capability is supported 3: whether Bluetooth LINK-layer encryption is enabled 4: whether extension modules are supported 5: whether scheduling is supported 6: whether Bluetooth BT/BLE dual-mode is supported 7: whether LINK-layer encryption is mandatory

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `deviceId` | `string` | Yes | - | `2.2.1` | Device ID |
| `capability` | `number` | Yes | - | `2.2.1` | Capability bit position 5: Scheduling |
| `complete` | `() => void` | No | - | - | Callback invoked when the API call completes (runs on both success and failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | - | Success callback for the API call |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Failure callback for the API call |

#### success callback parameters

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `isSupport` | `boolean` | `3.3.0` | Result callback for whether Bluetooth-related capabilities are supported isSupport Whether supported |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error info |
