搜索插件、代码仓与 APP 分类

插件详情v0.4.1+1

quick_blue

一个适用于 Flutter 的跨平台 BluetoothLE 插件。

AndroidiOSmacOSWindowsLinux
近 30 天下载
62
喜欢数
102
Pub 分数
110

安装插件

flutter pub add quick_blue

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

QuickBlue 是一个跨平台的蓝牙低功耗(BLE)插件,适用于 Flutter,使开发者能够在 Android、iOS、macOS、Windows 和 Linux 上与 BLE 设备进行交互。它提供了一个简单且一致的 API,用于扫描、连接、读取、写入和监控 BLE 外设。设计上注重易用性,抽象了平台特定的复杂性,同时保持了可靠的性能。非常适合需要与可穿戴设备、传感器或物联网硬件进行实时数据交换的应用程序。

适合场景

  • 连接到BLE信标
  • 从可穿戴设备读取传感器数据
  • 控制物联网设备
  • 与医疗设备配对
  • 实时健康监测

主要特点

  • 跨平台支持
  • BLE 操作的简单 API
  • 自动设备发现
  • 事件驱动的连接处理
  • 支持特性通知

适合对象

  • 物联网应用开发
  • 可穿戴设备集成
  • 健康和健身应用
  • 智能家居系统
  • 原型化支持蓝牙低功耗的功能

使用建议

  • 所有平台都需要蓝牙权限
  • 仅限BLE功能
  • 平台特定的行为可能会有所不同
  • iOS 上的后台执行限制
  • 无内置加密或安全层

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

quick_blue

A cross-platform (Android/iOS/macOS/Windows/Linux) BluetoothLE plugin for Flutter

Note: It is a federated plugin structure

Usage

General useful Bluetooth information

https://www.bluetooth.com/blog/4-essential-tools-for-every-bluetooth-low-energy-developer/

  1. Client Emulator Apps

  2. Bluetooth Sniffer

iOS/macOS specific info

On iOS/macOS some common service/characteristic would be shortened. Be careful when comparing the UUID. I haven't finished the refactor of notepad_core to quick_blue yet

On the Dart side you'd better call like: https://github.com/woodemi/notepad_core/blob/b0e329f3d6e02f14f8a0e5e48a6ddb48e026b658/notepad_core/lib/woodemi/WoodemiClient.dart#L245-L256

const CODE__SERV_BATTERY = "180f";
const CODE__CHAR_BATTERY_LEVEL = "2a19";

const SERV__BATTERY = "0000$CODE__SERV_BATTERY-$GSS_SUFFIX";
const CHAR__BATTERY_LEVEL = "0000$CODE__CHAR_BATTERY_LEVEL-$GSS_SUFFIX";

Common service/characteristic list

  • Official: https://www.bluetooth.com/specifications/specs/gatt-specification-supplement-5/
  • gist: https://gist.github.com/sam016/4abe921b5a9ee27f67b3686910293026
Windows specific info

Doc of samples: https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/bluetoothle Code of samples: https://github.com/microsoft/windows-universal-samples/tree/main/Samples/BluetoothLE

Some other help

There is a version restriction with Connection without pairing on C++/WinRT and Windows 10

  • https://answers.microsoft.com/en-us/windows/forum/all/reconnecting-a-paired-bluetooth-device-without/90b42dd3-2998-4393-9d89-1624e120502f
  • https://stackoverflow.com/questions/55765090/windows-bluetooth-le-require-pairing-before-connection
  • https://social.msdn.microsoft.com/Forums/azure/en-US/66d6fb43-e41e-4751-99fe-170b8f63ad22/uwpcc-uwp-bluetooth-communication-without-pairing?forum=wpdevelop
Linux specific info
  • BlueZ official: http://www.bluez.org/
  • Ubuntu official: https://ubuntu.com/core/docs/bluez
  • Ubuntu bluez package: https://github.com/canonical/bluez.dart
  • Doc of samples: https://www.bluetooth.com/wp-content/uploads/2019/03/T1804_How-to-set-up-BlueZ_LFC_FINAL-2.pdf

所属分类

依赖

依赖清单 5 项

  • convert^3.0.0
  • quick_blue_linux^0.1.2
  • quick_blue_macos^0.3.1+2
  • quick_blue_platform_interface^0.3.2
  • quick_blue_windows^0.3.2

源码仓库

使用此插件的项目

暂无相关数据。