mcumgr-ble
Bluetooth LE transport implementation for Mcu Manager.
This module uses the Android-BLE-Library to handle BLE communication.
Key Components
McuMgrBleTransport: ImplementsMcuMgrTransportfor Bluetooth LE. It manages the connection to a peripheral and handles SMP characteristic discovery and communication.DefaultMcuMgrUuidConfig: Provides default SMP Service and Characteristic UUIDs.
Example
// Create the transport
McuMgrBleTransport transport = new McuMgrBleTransport(context, bluetoothDevice);
// Optional: Set connection observers
transport.addObserver(new McuMgrTransport.ConnectionObserver() {
@Override
public void onConnected() {
// Connected to the device
}
@Override
public void onDisconnected() {
// Disconnected
}
});
// Use the transport with a manager
DefaultManager manager = new DefaultManager(transport);
// ...Content copied to clipboard