Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

CBCentralManagerMBS class

Super class: CBManagerMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Bluetooth MBS Bluetooth Plugin 18.1 Yes No No Yes, macOS only No
Function: CBCentralManager objects are used to manage discovered or connected remote peripheral devices (represented by CBPeripheral objects), including scanning for, discovering, and connecting to advertising peripherals.
Before you call CBCentralManager methods, the state of the central manager object must be powered on, as indicated by the CBCentralManagerStatePoweredOn constant. This state indicates that the central device (your iPhone or iPad, for instance) supports Bluetooth low energy and that Bluetooth is on and available to use.

Please build as 64-bit as 32-bit is no longer supported well by Apple.
Subclass of the CBManagerMBS class.

Feedback, Comments & Corrections

Att Errors

Constant Value Description
CBATTErrorAttributeNotFound &h0A The attribute is not found within the specified attribute handle range.
CBATTErrorAttributeNotLong &h0B The attribute cannot be read or written using the ATT read blob request.
CBATTErrorInsufficientAuthentication 5 The attribute requires authentication before its value can be read or written.
CBATTErrorInsufficientAuthorization 8 The attribute requires authorization before its value can be read or written.
CBATTErrorInsufficientEncryption &h0F The attribute requires encryption before its value can be read or written.
CBATTErrorInsufficientEncryptionKeySize &h0C The encryption key size used for encrypting this link is insufficient.
CBATTErrorInsufficientResources &h11 Resources are insufficient to complete the ATT request.
CBATTErrorInvalidAttributeValueLength &h0D The length of the attribute’s value is invalid for the intended operation.
CBATTErrorInvalidHandle 1 The attribute handle is invalid on this peripheral.
CBATTErrorInvalidOffset 7 The specified offset value was past the end of the attribute’s value.
CBATTErrorInvalidPdu 4 The attribute Protocol Data Unit (PDU) or “message” is invalid.
CBATTErrorPrepareQueueFull 9 The prepare queue is full, because too many prepare write requests have been queued.
CBATTErrorReadNotPermitted 2 The attribute’s value cannot be read.
CBATTErrorRequestNotSupported 6 The attribute server does not support the request received by the client.
CBATTErrorSuccess 0 The ATT command or request successfully completed.
CBATTErrorUnlikelyError &h0E The ATT request has encountered an unlikely error and therefore could not be completed.
CBATTErrorUnsupportedGroupType &h10 The attribute type is not a supported grouping attribute as defined by a higher-layer specification.
CBATTErrorWriteNotPermitted 3 The attribute’s value cannot be written.


Constant Value Description
CBCentralManagerStatePoweredOff 4 Bluetooth is currently powered off.
CBCentralManagerStatePoweredOn 5 Bluetooth is currently powered on and is available to use.
CBCentralManagerStateResetting 1 The connection with the system service was momentarily lost; an update is imminent.
CBCentralManagerStateUnauthorized 3 The app is not authorized to use the Bluetooth low energy peripheral/server role.
CBCentralManagerStateUnknown 0 The current state of the peripheral manager is unknown; an update is imminent.
CBCentralManagerStateUnsupported 2 The platform doesn't support the Bluetooth low energy peripheral/server role.


Constant Value Description
CBErrorAlreadyAdvertising 9 The peripheral is already advertising.
CBErrorConnectionFailed 10 The connection failed.
CBErrorConnectionLimitReached 11 The device already has the maximum number of connections.
CBErrorConnectionTimeout 6 The connection timed out.
CBErrorInvalidHandle 2 The specified attribute handle is invalid.
CBErrorInvalidParameters 1 The specified parameters are invalid.
CBErrorNotConnected 3 The device is not currently connected.
CBErrorOperationCancelled 5 The operation is canceled.
CBErrorOutOfSpace 4 The device has run out of space to complete the intended operation.
CBErrorPeripheralDisconnected 7 The peripheral disconnected.
CBErrorUnknown 0 An unknown error occurred.
CBErrorUnkownDevice 12 Unknown device.
CBErrorUUIDNotAllowed 8 The specified UUID is not permitted.

Super class CBManagerMBS


Constant Value Description
kStatePoweredOff 4 Bluetooth is currently powered off.
kStatePoweredOn 5 Bluetooth is currently powered on and available to use.
kStateResetting 1 The connection with the system service was momentarily lost, update imminent.
kStateUnauthorized 3 The application is not authorized to use the Bluetooth Low Energy role.
kStateUnknown 0 State unknown, update imminent.
kStateUnsupported 2 The platform doesn't support the Bluetooth Low Energy Central/Client role.

This class has no sub classes.

Some examples which use this class:

The items on this page are in the following plugins: MBS Bluetooth Plugin.

CBAttributeMBS   -   CBCentralMBS

MBS FileMaker Plugins