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

## disconnectBluetoothDevice

> [VERSION] DeviceKit >= 3.1.0

> [PLATFORM] iOS, Android

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

### Description

Bluetooth disconnection aggregate API; supports disconnecting ble, ble in dual-mode, mesh single-live-wire, and mesh connections. Calling this on beacon devices has no effect

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `devId` | `string` | Yes | - | `3.1.0` | Device ID |
| `connectType` | `number` | No | `0` | `3.1.2` | Bluetooth connection mode, default 0 0: Gateway and app both supported (default). The connection succeeds if either the local (app) or gateway path is available 1: App only — only checks whether the device is locally online and whether a local connection succeeds 2: Gateway only — only checks whether the gateway is online and whether a gateway connection succeeds |
| `complete` | `() => void` | No | - | - | Completion callback (executed whether the call succeeds or fails) |
| `success` | `() => void` | No | - | - | Callback executed when the API call succeeds |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Callback executed when the API call fails |

#### fail callback parameters

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

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

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