Plugin for flutter blue serial implement

serial_flutterblue

Getting Started

  • Add it to your pubspec.yaml like this:
dependencies:
  serial_flutterblue:
      git: git@github.com:y60yu1ii/serial_flutter_blue.git
  • Extend the uartconfig clas if you are not using the Nordic UART service UUID, or you wish to set up MTU
  • Create a files, say myconfig.dart, and add the following,
import 'package:serial_flutterblue/serial_flutterblue.dart';
import 'package:flutter_blue/flutter_blue.dart';

class MyConfig extends UartConfig {
  //nordic 128 short
  static Guid TIShort(String input) {
    return Guid("0000$input-0000-1000-8000-00805f9b34fb");
  }

  Myconfig()
      : super(
      TIShort("1801"), //service
      TIShort("ffe1"), //TX
      TIShort("ffe2"), //RX
      20);
}

  • And set it to config before you use it.
    provider.config = MyConfig();

Changes

  • add a counter to deal with the issue that getting disconnected before connected on some of the android phones.

Download Details:

Author: y60yu1ii

Source Code: https://github.com/y60yu1ii/serial_flutter_blue

#flutter #dart #mobile-apps

Plugin for flutter blue serial implement
19.50 GEEK