Constants
object Constants
Central repository for constant values used throughout the BleX library.
This object contains configuration constants for BLE operations including logging tags, MTU (Maximum Transmission Unit) values, and timing parameters.
MTU (Maximum Transmission Unit)
The MTU defines the maximum size of a single BLE packet. The effective payload size is typically MTU - 3 bytes (due to ATT protocol overhead).
Default MTU: 23 bytes (20 bytes effective payload)
Maximum MTU: 517 bytes (514 bytes effective payload, as per Bluetooth 4.2+)
Usage Example
// Using the tag for logging
Log.d(Constants.TAG, "BLE operation completed")
// Requesting maximum MTU for faster data transfer
gatt.requestMtu(Constants.MAX_MTU)Content copied to clipboard