package com.codename1.bluetooth.le

BLE central role: scanning (BluetoothLE, ScanSettings, ScanFilter, ScanResult, BleScan), connections and the GATT client (BlePeripheral, connection events) and L2CAP connection-oriented channels (L2capChannel, L2capServer).

Obtain the entry point via Bluetooth.getInstance().getLE(). Any number of scans and per-peripheral GATT operations may run concurrently – an internal queue serializes operations toward the platform stack and every call returns its own AsyncResource.

Types

class AdvertisementDataThe parsed payload of a BLE advertisement: local name, advertised service UUIDs, manufacturer data, service data and TX power.
class BlePeripheralA remote BLE peripheral: connection lifecycle, GATT client operations and L2CAP channels.
class BleScanLive handle of a running BLE scan returned by BluetoothLE.startScan(ScanSettings, ScanListener).
class BluetoothLEThe BLE central role: scanning for peripherals and re-obtaining known ones.
class ConnectionEventPayload of a ConnectionListener callback describing a BlePeripheral state transition.
interface ConnectionListenerObserves BlePeripheral connection state transitions registered via BlePeripheral.addConnectionListener(ConnectionListener).
class ConnectionOptionsOptions for BlePeripheral.connect(ConnectionOptions).
enum ConnectionPriorityConnection-interval preference requested via BlePeripheral.requestConnectionPriority(ConnectionPriority).
enum ConnectionStateLifecycle states of a BlePeripheral connection.
class L2capChannelAn open L2CAP connection-oriented channel – a raw bidirectional byte stream to a peripheral, obtained via BlePeripheral.openL2capChannel(int, boolean) on the central side or accepted from an L2capServer on the peripheral side.
class L2capServerA listening L2CAP endpoint on the local device, opened via BluetoothLE.openL2capServer(boolean) when acting as a peripheral.
class ScanFilterA single scan filter – all criteria set on one filter are AND-combined; multiple filters added to a ScanSettings are OR-combined.
interface ScanListenerReceives advertisement sightings during a scan started via BluetoothLE.startScan(ScanSettings, ScanListener).
enum ScanModePower/latency trade-off of a BLE scan, mirroring Android’s scan modes.
class ScanResultOne advertisement sighting delivered to a ScanListener during a scan.
class ScanSettingsOptions for a BLE scan started via BluetoothLE.startScan(ScanSettings, ScanListener).