# Bluetooth

### Introduction

The **Bluetooth Nodes** provide a means for the user to perform several actions within the *Bluetooth* standard. *Bluetooth* allows for communication between wireless and fixed devices in the short range, like when a car connects to a mobile phone. More information can be found [*here*](https://en.wikipedia.org/wiki/Bluetooth).

### Bluetooth Guideline

These are the guidelines for incorporating **Bluetooth Communication** into a **Project**.

* Unless a device's *Bluetooth* address is already known or has been previously retrieved through other means, one should use the [**Scan For Bluetooth Devices Node**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/scanforbluetoothdevices) to discover any devices in the nearby vicinity. This will return all pairable devices in range as well as their Bluetooth addresses.
* Once a **Bluetooth** device has been discovered, it is possible to attempt pairing. Use [**Pair Bluetooth Device**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/pairbluetoothdevices) to initiate the pairing. Separately, use [**On Bluetooth Device Paired**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/events/onbluetoothdevicepaired) to execute any following **Logic** after pairing. This is to make sure pairing is successfully finished being established before doing anything. Only then is it possible to use the several **Nodes** that cover important functions of **Bluetooth Communication**.
  * [**Is Bluetooth Device Paired**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/ispaired) returns *true* or *false* if a device has been paired with (even if it is out of range), or an error message if there is an error.
  * [**Retrieve Call History**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/retrievecalhistory) returns the call history of a **Bluetooth** device (or devices), or an error message if there is an error.
  * [**Retrieve Phonebook**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/retrievephonebook) returns the phonebook of a **Bluetooth** device (or devices), or an error message if there is an error.
  * [**Scan For Bluetooth Devices**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/scanforbluetoothdevices) searches for **Bluetooth** devices in the general vicinity and returns **Dictionary** of them on success, or an error message if there is an error.
* To revoke access rights to a device (essentially removing it as a possibility for interacting with), use the [**Unpair Bluetooth Device Node**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/unpairbluetoothdevices) to start unpairing. Separately, use the **On Bluetooth Device Unpaired Node** to execute any following **Logic**. This is to make sure the device is removed properly before doing anything.

### Contents

* [**Events**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/events)
  * [**On Bluetooth Device Paired**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/events/onbluetoothdevicepaired)
  * [**On Bluetooth Device Unpaired**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/events/onbluetoothdeviceunpaired)
* [**Is Bluetooth Device Paired**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/ispaired)
* [**Pair Bluetooth Device**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/pairbluetoothdevices)
* [**Retrieve Call History**](https://github.com/cgi-studio-gmbh/incari-doc/blob/2023.2/toolbox/communication/bluetooth/retrievecallhistory.md)
* [**Retrieve Phonebook**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/retrievephonebook)
* [**Scan For Bluetooth Devices**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/scanforbluetoothdevices)
* [**Unpair Bluetooth Device**](https://docs.incari.com/incari-studio/2023.2/toolbox/communication/bluetooth/unpairbluetoothdevices)

## External Links

* More about *Bluetooth* on [*Wikipedia*](https://en.wikipedia.org/wiki/Bluetooth).
