> For the complete documentation index, see [llms.txt](https://docs.drivequant.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drivequant.com/vehicle/ios/bluetooth-device-management.md).

# Bluetooth device management

{% hint style="info" %}
Methods presented in this part are available in the `DriveKitVehicle` class
{% endhint %}

## Pair a Bluetooth device to a vehicle

The following method allows you to create a logical pairing between a Bluetooth device and a vehicle. The results of data analysis containing a Bluetooth device will be assigned to the vehicle to which the peripheral has been paired with.

```swift
func addBluetooth(
	vehicleId: String, 
	bluetooth: DKBluetooth, 
	completionHandler: @escaping (DKVehicleBluetoothStatus) -> Void
)
```

This method have the following parameters:

| Name      | Type                                                      | Description                                                                    |
| --------- | --------------------------------------------------------- | ------------------------------------------------------------------------------ |
| bluetooth | [DKBluetooth](/vehicle/ios/references-ios.md#dkbluetooth) | Bluetooth device information.                                                  |
| vehicleId | String                                                    | The identifier of the vehicle that you wish to pair with the Bluetooth device. |

\
[DKVehicleBluetoothStatus](/vehicle/ios/references-ios.md#dkvehiclebluetoothstatus) model is described in the References part.

## **Remove the Bluetooth device from a vehicle**

The following function can be used to delete the pairing between a Bluetooth device and a vehicle:

```swift
func removeBluetooth(
    vehicleId: String,
    completionHandler: @escaping (DKVehicleBluetoothRemoveStatus) -> Void
)
```

This method have the following parameter:

| Name      | Type   | Description                                                                      |
| --------- | ------ | -------------------------------------------------------------------------------- |
| vehicleId | String | The identifier of the vehicle that you wish to unpair with the Bluetooth device. |

[DKVehicleRemoveBluetoothStatus](/vehicle/ios/references-ios.md#dkvehiclebluetoothremovestatus) model is described in the References part.
