flutter_bluetooth_serial
0.4.0, released 5 years ago by 3daysapp.com.br
Classical Bluetooth serial communication for Flutter on Android.
What it does
Provides a Flutter interface for Classical Bluetooth via the Serial Port Profile (RFCOMM). It allows monitoring adapter status, discovering devices, pairing, managing multiple simultaneous connections, and sending or receiving byte streams.
AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to communicate with classic Bluetooth devices like Arduino HC-05 modules or Raspberry Pi over RFCOMM on Android.
- You need to manage device discovery, pairing/bonding, and multiple concurrent serial connections.
Skip it when
- Your project targets iOS or platforms other than Android.
- You need Bluetooth Low Energy (BLE) functionality.
Strengths
- Supports multiple simultaneous connections.
- Handles adapter status, bonding, and discovery natively.
- Includes stream-based input/output for data exchange.
Weaknesses
- Only supports Android currently.
- Limited to Classical Bluetooth RFCOMM / Serial Port profile.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires Android configuration and permissions, plus ensuring a running SDP pointing to the SP/RFCOMM channel on the target device.
try {
BluetoothConnection connection = await BluetoothConnection.toAddress(address);
print('Connected to the device');
connection.input.listen((Uint8List data) {
print('Data incoming: ${ascii.decode(data)}');
connection.output.add(data);
});
} catch (exception) {
print('Cannot connect, exception occured');
}Alternatives
Packages that do the same job and could replace flutter_bluetooth_serial.
- flutter_classic_bluetooth
Bluetooth Classic RFCOMM/SPP serial communication plugin for Flutter.
83Compare - universal_ble
Cross-platform Bluetooth Low Energy (BLE) plugin for Flutter
92Compare - flutter_blue_plus
Flutter plugin for connecting to Bluetooth Low Energy devices.
90Compare - flutter_web_bluetooth
A Dart library to use the Web Bluetooth API in your projects.
87Compare