Package com.codename1.bluetooth.helper
package com.codename1.bluetooth.helper
Shared implementation support for the ports that talk to the native
cn1-ble-helper subprocess (JavaSE real-hardware, Win32 and Linux).
Not part of the public Bluetooth API -- application code uses
com.codename1.bluetooth and its sub packages instead.
HelperBleBackend implements the BLE central protocol over a
line-delimited JSON transport, HelperBluetooth/HelperBluetoothLE
bridge it onto the core facades, and Wire is the codec. HelperTransport
abstracts the subprocess pipe so each port supplies its own launcher --
ProcessBuilder on JavaSE, a native posix_spawn/CreateProcess bridge
on the C-translated Win32/Linux ports (NativeSubprocessTransport).
-
ClassDescriptionThe pluggable BLE engine seam.Observes adapter state transitions of this backend.Receives the sightings of the single platform scan.The real-radio
BleBackend: drives the host machine's Bluetooth adapter through the bundledcn1-ble-helpersubprocess (a Rust btleplug bridge -- CoreBluetooth on macOS, BlueZ on Linux, WinRT on Windows).Completion of one in-flight helper command.Real-radioBlePeripheralbridging the core GATT client contract ontocn1-ble-helpercommands.ABluetoothentry point backed by thecn1-ble-helpersubprocess -- the shared implementation for the native Win32 and Linux desktop ports.The abstraction over thecn1-ble-helperchild process's standard I/O.CreatesHelperTransportinstances soHelperBleBackendcan (re)start the helper on activation and after a restart.AHelperTransportover a native child process, for the ports that have nojava.lang.ProcessBuilder(the native Win32 and Linux desktop ports).BuildsNativeSubprocessTransports for a native port.The line-delimited JSON codec of thecn1-ble-helperprotocol: command serialization (with escaping) and event-line parsing viaJSONParser, with Base64-encoded characteristic/descriptor payloads.Builder for one command line.