---
title: roBtCentralManager
slug: develop/robtcentralmanager
docTags: 
createdAt: 2025-03-11T07:07:18.731Z
---

This object allows you to check if Bluetooth is fitted; set, monitor, or retrieve the current Bluetooth Low Energy (BLE) advertisements; and scan for Bluetooth devices.

### Scan(parameters As roAssociativeArray) As Boolean&#x20;

When set to `true`, scanning includes BLE advertisements.&#x20;

Parameters can include `advertising_reports`.

## ifBtAdvertisingReportEvent

### GetAdapter() As String

Returns the adapter that the advertising device belongs to

### GetDevice() As String

Returns the identifier for remote advertising device

### GetRssi() As Integer

Returns the signal strength indicator for advertisement

### GetData() As roByteArray

Returns advertisement data

### GetAdvertisement() As roAssociativeArray

Available as of BOS 9.0.198 and 9.1.21, this returns an associative array containing all of the above. The field names are:

- `adapter_path` <font color="#704ae0">string</font>: The object path of the adapter the device belongs to
- `device_address` <font color="#704ae0">string</font>: The Bluetooth device address of the remote device
- `rssi` <font color="#704ae0">int</font>: The Received Signal Strength Indicator of the remote device (inquiry or advertising)
- `data` <font color="#704ae0">roByteArray</font>: An roByteArray of manufacturing data

### Reset() As Boolean

This reset method will attempt to recover the Bluetooth stack if it becomes unresponsive

## ifBtDeviceFoundEvent

### GetDevice() as roAssociativeArray

Available as of BOS 9.0.198 and 9.1.21, this returns an associative array containing the following:

- `adapter_path` <font color="#704ae0">string</font>: The object path of the adapter the device belongs to
- `address` <font color="#704ae0">string</font>: The Bluetooth device address of the remote device
- `name` <font color="#704ae0">string</font>: The Bluetooth remote name.&#x20;
- `alias` <font color="#704ae0">string</font>: The name alias for the remote device.&#x20;
- `rssi` <font color="#704ae0">int</font>: The Received Signal Strength Indicator of the remote device (inquiry or advertising)
- `tx_power` <font color="#704ae0">int</font>: The advertised transmitted power level (inquiry or advertising)
- `uuids` <font color="#704ae0">roArray</font>: An roArray of UUID strings that represent the available remote services
- `advertising_flags` <font color="#704ae0">roArray</font>: An roArray of advertisement flags
- `manufacturer_data` <font color="#704ae0">roArray</font>: An roArray of roAssociativeArray where each element has:
  - `id` <font color="#704ae0">int</font>: The id of the manufacturer
  - `data` <font color="#704ae0">roByteArray</font>: An roByteArray of mfg data
- `service_data` <font color="#704ae0">roAssociativeArray</font>: An roAssociativeArray with the following pairs:
  - `uuid` <font color="#704ae0">string</font>: UUID strings that represent the available remote services
  - `service data` <font color="#704ae0">roByteArray</font>: An array of service advertisement data

## ifBtDeviceLostEvent

### GetDevice() as roAssociativeArray

Available as of BOS 9.0.198 and 9.1.21, this returns an associative array containing the following:

- `adapter_path` <font color="#704ae0">string</font>: The object path of the adapter the device belongs to.
- `address` <font color="#704ae0">string</font>: The Bluetooth device address of the remote device

## Example

```none
mp = CreateObject("roMessagePort")
btc = CreateObject("roBtCentralManager")
btc.SetPort(mp)
btc.Scan({advertising_reports: true})
```

