Add serial capability for Bluetooth Classic and USB OTG#22
Closed
Add serial capability for Bluetooth Classic and USB OTG#22
Conversation
Implements serial communication over Bluetooth Classic (RFCOMM/SPP) and USB serial (CDC-ACM, FTDI, CH340, CP210x) so AI agents can control Arduino, Micro:bit, and other serial hardware via the Node protocol. Commands: serial.scan, serial.connect, serial.write, serial.read, serial.disconnect, serial.list — unified under a single 'serial' capability with a transport parameter. - New SerialCapability handler with 64KB read buffers per connection - Bluetooth permissions (BLUETOOTH_CONNECT, BLUETOOTH_SCAN) for Android 12+ - USB host feature declaration (optional) - Registered in NodeProvider, UI tiles added to Node screen Co-Authored-By: Mithun Gowda B <mithungowda.b7411@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #21
serialcapability with Bluetooth Classic (RFCOMM/SPP) and USB serial (CDC-ACM, FTDI, CH340, CP210x) supportCommands
serial.scanserial.connectserial.writeserial.readserial.disconnectserial.listChanges
serial_capability.dart— 530-line capability handler with 64KB read bufferspubspec.yaml— addedflutter_serial_communicationandflutter_bluetooth_classic_serialAndroidManifest.xml— Bluetooth + USB host permissionsnode_provider.dart— registered serial capabilitynode_screen.dart— added Bluetooth Serial and USB Serial UI tilesTest plan
serial.scan transport:"usb"with Arduino connected via USB OTG → device appearsserial.connect→ returns connectionIdserial.write+serial.read→ round-trip data verifiedserial.scan transport:"bluetooth"with paired Micro:bit → device appearsserial.disconnect connectionId:"all"+serial.list→ emptyPERMISSION_DENIEDerror returned🤖 Generated with Claude Code