---
title: roBtClientManager
slug: develop/robtclientmanager
docTags: 
createdAt: 2025-03-11T07:07:18.731Z
---

This object represents a BLE GATT service, where the player acts as a peripheral and another device (phone, tablet, etc.) acts as the client/central. Unlike [roBtManager](docId\:AkMxi8IWh0ER_tQdIQ3Yg), which allows for unidirectional, non-connectable communication (i.e. beaconing), the *roBtClientManager* object is used to facilitate two-way, connectable communication. It provides an event to an attached message port when a new client connects. It also manages the client state, provides client update events, and times out the client after a period of inactivity. The JavaScript equivalent is [BSBtManager](docId\:Cf7q7xSA9dRtCq3bTXV-A).

The BLE clients themselves are represented by the [roBtClient](docId\:fDPNJsZ_TkIciApE63OL9) object. 

## ifBtClientManager

### Start(params As roAssociativeArray) As Boolean

Starts BLE communication. This method accepts the following parameters:

- `client_timeout`: The amount of time (in seconds) that a client can be inactive before being disconnected
- `service_uuid`: A UUID that identifies the service
- `clientid_uuid`: The client-identifier attribute. Once a client device connects to the player, it should write its unique client identifier value to this attribute.
- `user_variable_uuid`: The user variables attribute. This attribute is intended to be writable by both the player and the client, providing the primary means for exchanging state data. User variables can be written as a JSON string.
- `command_uuid`: The command attribute. When a client device writes to this attribute, an event containing the command string is generated by the associated *roBtClient*  instance.
- `device_info_uuid`: The attribute for device information. This attribute is read-only for clients.
- `device_data_uuid`: The attribute for device data. This attribute can be used to communicate available commands to clients. It is read-only for clients.

:::hint{type="info"}
There is a limit 512 bytes on each attribute.
:::

### Stop() As Boolean

Stops BLE communication.

### SetDeviceInfo(a As Object) As Boolean

### SetDeviceData(a As Object) As Boolean

## ifMessagePort

### SetPort(a As Object)

Posts messages of type [roBtClientManagerEvent](docId:0ya2SsCmiDFpWj_6W_XVI) to the attached message port.

## ifIdentity

### GetIdentity() As Integer

Returns a unique number that can be used to identify [roBtClientManagerEvent](docId:0ya2SsCmiDFpWj_6W_XVI) objects that originate from this object.

:::hint{type="info"}
The *ifIdentity* interface has been deprecated. We recommend using the *ifUserData* interface instead.
:::

## ifUserData

### SetUserData(user\_data As Object)

Sets the user data that will be returned when events are raised.

### GetUserData() As Object

Returns the user data that has previously been set via `SetUserData()`. It will return `Invalid` if no data has been set.

## ifFailureReason

### GetFailureReason() As String

Returns additional useful information when a method on the *ifBtClientManager* interface returns `False`.
