Skip to content

y0av/flutter_reactive_ble_uart_example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter reactive BLE UART demo app

This demo app shows an usecase for using flutter_reactive_ble library for building a UART emulation over BLE.

This demo app uses one service: the Nordic UART Service with vendor-specific UUID:

Uuid _UART_UUID = Uuid.parse("6E400001-B5A3-F393-E0A9-E50E24DCCA9E");

The aforementioned service uses two characteristics: one for transmitting and one for receiving (as seen from the peer).

Uuid _UART_RX   = Uuid.parse("6E400002-B5A3-F393-E0A9-E50E24DCCA9E");
Uuid _UART_TX   = Uuid.parse("6E400003-B5A3-F393-E0A9-E50E24DCCA9E");

Usage

This app can be used if the BLE peripheral implements the aforementioned services. The user interface is shown below:

User interface

Use the play button for scanning and the stop button for stop a running scan. When an UART BLE service is found, it is displayed at the top. Press the found device at the right, then a connection is being established as can be seen in the Status messages pane. Then a message string can be sent to the BLE peripheral, Received data is shown in the Received data pane. An existing connection can be closed using the bottom rightmost button.

BLE undeliverable exception

The BLE undeliverable exception is handled as shown in this file.

Flutter BLE plugin

The plugin enabling BLE in Flutter can be found at https://pub.dev/packages/flutter_reactive_ble

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 81.2%
  • Ruby 9.5%
  • Kotlin 6.2%
  • Swift 2.8%
  • Objective-C 0.3%