Skip to content
pubscout

flutter_serial_communication

0.2.8, released 2 years ago by farells.id

Communicate with serial hardware and Arduinos via Android USB OTG without root access.

WASM-ready
$ flutter pub add flutter_serial_communication
Source repository

What it does

Allows Flutter apps to list available USB serial devices, connect to them, write data, and listen for incoming messages or connection changes. It specifically supports Android USB OTG communication without requiring root permissions.

AI-written summary of version 0.2.8, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to connect an Android Flutter application to an Arduino or USB serial hardware via OTG.
  • You want to read and write serial data without root access on Android.

Skip it when

  • You are targeting iOS, desktop, or web platforms for serial communication.
  • You require complex high-level protocols that are not handled by raw serial byte streams.

Strengths

  • Does not require root access on Android devices.
  • Provides stream listeners for both reading messages and device connection status.

Weaknesses

  • Currently limited to Android USB (OTG) hardware support.
  • Documentation does not list explicit iOS or other platform support.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Requires adding the dependency to pubspec.yaml and importing the package. Compatible with Android API 21+ and compiled with API 34.

final _flutterSerialCommunicationPlugin = FlutterSerialCommunication();
List<DeviceInfo> availableDevices = await _flutterSerialCommunicationPlugin.getAvailableDevices();

Alternatives

Packages that do the same job and could replace flutter_serial_communication.

Works with

Packages commonly used together with flutter_serial_communication: ones it builds on, ones built on it, and its own family.