GattResponse

sealed interface GattResponse

Response given when performing a Bluetooth Gatt Request

Inheritors

Types

Link copied to clipboard
data class ApplicationError(val statusCode: Int = 128) : GattResponse.Error

Application Error defined by a higher specification.

Link copied to clipboard

An Error where no attribute was found within the given attribute handle range.

Link copied to clipboard

An Error where the attribute cannot be read using the ATT_READ_BLOB_REQ_PDU

A CommonProfileAndServiceError used when a Client Characteristic Configuration descriptor is not configured according to the requirements of the profile or service

Link copied to clipboard

An Error that is common for profiles and services to be sent

Link copied to clipboard

An Error where the server requests the client to rediscover the database.

Link copied to clipboard

A ReadError/WriteError given if the remote device could not be reached

Link copied to clipboard

An Error where the Encryption Key Size used for encrypting this link is too short.

Link copied to clipboard

An GattResponse that failed to perform either a Read or Write request Options are defined by the Bluetooth Core Specification Version 6.2 Vol3, Part F

Link copied to clipboard

An Error where the attribute requires authentication before it can be read or written.

Link copied to clipboard

An Error where the attribute requires authorization before it can be read or written.

Link copied to clipboard

An Error where the attribute requires encryption before it can be read or written.

Link copied to clipboard

An Error there are insufficient resources to complete the request.

Link copied to clipboard

An Error where the attribute value length is invalid for the operation.

Link copied to clipboard

An Error where the attribute handle given was not valid on this server.

Link copied to clipboard

An Error where the offset specified was past the end of the attribute.

Link copied to clipboard

An Error where the attribute PDU was invalid

Link copied to clipboard

An error MTUResponse

Link copied to clipboard
data class MTUFailure(val mtu: MTU, val error: GattResponse.Error) : GattResponse.MTUError

A MTUError indicating an Error occurred while performing the MTU request

Link copied to clipboard

A MTUError indicating the MTU request was not permitted

Link copied to clipboard
sealed interface MTUResponse : GattResponse

A GattResponse given to a MTU request

Link copied to clipboard
Link copied to clipboard

A CommonProfileAndServiceError used when an attribute value is out of range as defined by a profile or service specification.

Link copied to clipboard

An Error where too many prepare writes have been queued.

Link copied to clipboard

A CommonProfileAndServiceError used when a profile or service request cannot be serviced because an operation that has been previously triggered is still in progress.

Link copied to clipboard

A ReadResponse that failed to read

Link copied to clipboard

An Error where the attribute cannot be read.

Link copied to clipboard
sealed interface ReadResponse : GattResponse

A GattResponse given to a Read request

Link copied to clipboard
Link copied to clipboard

An Error where the GATT Server does not support the request received from the client.

Link copied to clipboard
sealed interface Success : GattResponse

A successful GattResponse indicating the request completed successfully

Link copied to clipboard

An Error where the attribute request that was requested has encountered an error that was unlikely, and therefore could not be completed as requested.

Link copied to clipboard

An Error where the attribute type is not a supported grouping attribute as defined by a higher layer specification.

Link copied to clipboard

An Error where the attribute parameter value was not allowed.

Link copied to clipboard

A WriteResponse that failed to write

Link copied to clipboard

An Error where the attribute cannot be written.

Link copied to clipboard

A CommonProfileAndServiceError used when a requested write operation cannot be fulfilled for reasons other than permissions.

Link copied to clipboard
sealed interface WriteResponse : GattResponse

A GattResponse given to a Write request

Properties

Link copied to clipboard
abstract val statusCode: Int

The status code matching the code of the Bluetooth Specification