blev 0.0.2 copy "blev: ^0.0.2" to clipboard
blev: ^0.0.2 copied to clipboard

A flutter plugin to communicate with Bluetooth Low Energy devices.

Bluetooth Low Energy Flutter Package #

license

This package provides the following features:

  • Central
    • Discover peripherals and their services and charactersitics
      • Read values from characteristics
      • Connect to peripherals
      • Establish L2CAP COC connections over discovered/known PSMs.
      • Multiplex L2CAP COCs into sockets.
  • Peripheral
    • Advertise read-only, string based services and charactersitics
      • Publish L2CAP COC connections.
      • Multiplex L2CAP COCs into sockets.

Getting started #

Make sure your project meets the minimum requirements:

  • Minimum iOS target: 13.0
  • Minimum Android SDK: 29
  • Kotlin version: 1.7.10

Installation #

flutter pub add blev

Upgrading #

flutter pub upgrade blev

iOS Permissions #

Update Info.plist #

If you are building for Apple platforms, you may have to update your app's Info.plist. NSBluetoothAlwaysUsageDescription is needed to utilize bluetooth.

<key>NSBluetoothAlwaysUsageDescription</key>
<string></string>

Android Permissions #

See https://developer.android.com/develop/connectivity/bluetooth/bt-permissions for how to correctly declare and request permissions for Android devices you intend on supporting.

Usage and example apps #

View example apps in the /example directory to learn how to best use this package. There are two combined examples:

GitHub #

You can view the code for Flutter BLE on GitHub.

Original Credit #

This project took learnings from https://github.com/appsfactorygmbh/flutter-l2cap and as such references its MIT LICENSE at the bottom of our Apache 2.0 LICENSE.

License #

Copyright 2021-2024 Viam Inc.

Apache 2.0 - See LICENSE file

1
likes
150
points
53
downloads

Publisher

verified publisherviam.com

Weekly Downloads

A flutter plugin to communicate with Bluetooth Low Energy devices.

Homepage
Repository (GitHub)
View/report issues

Topics

#bluetooth

Documentation

API reference

License

Apache-2.0, MIT (license)

Dependencies

async, flutter, plugin_platform_interface

More

Packages that depend on blev