Skip to main content

rfid_scanner 0.0.4 copy "rfid_scanner: ^0.0.4" to clipboard
rfid_scanner: ^0.0.4 copied to clipboard

Flutter plugin for FH-930i USB RFID scanners and H100 / CFBLE BLE UHF readers.

rfid_scanner #

Flutter plugin for RFID hardware used in field installation apps.

Reader Connection Platform API
FH-930i USB OTG Android only RfidScannerPlugin
H100 / CFBLE Bluetooth LE Android, iOS RfidScannerBle

Installation #

dependencies:
  rfid_scanner: ^0.1.0

Run flutter pub get.

FH-930i (USB, Android only) #

Existing USB integrations keep using RfidScannerPlugin. Gate UI on Android:

import 'package:rfid_scanner/rfid_scanner.dart';

if (RfidScannerPlugin.isSupported) {
  final sub = RfidScannerPlugin.scanResults.listen(print);
  await RfidScannerPlugin.startScanning();
  // ...
  await RfidScannerPlugin.stopScanning();
  await sub.cancel();
}

On iOS/web, RfidScannerPlugin methods throw RfidScannerException with code UNSUPPORTED_PLATFORM.

H100 / CFBLE (BLE) #

import 'package:rfid_scanner/rfid_scanner.dart';

try {
  await RfidScannerBle.initialize();

  final devices = await RfidScannerBle.scanDevices(readersOnly: true);
  await RfidScannerBle.connect(devices.first.address);

  await RfidScannerBle.ensureTagListener();
  RfidScannerBle.scanResults.listen(print);
  await RfidScannerBle.startScanning();
} on RfidScannerException catch (e) {
  print('${e.code}: ${e.message}');
}

Call RfidScannerBle.dispose() when the reader screen is torn down.

Host app permissions #

Android (BLE): BLUETOOTH_SCAN, BLUETOOTH_CONNECT at runtime on API 31+.

iOS: NSBluetoothAlwaysUsageDescription in Info.plist.

Android (USB): USB host / OTG as required by the FH-930 module.

Device address (BLE) #

  • Android: Bluetooth MAC
  • iOS: CoreBluetooth peripheral UUID

Host app integration #

See doc/host_app_integration.md for a full first-time setup guide.

Backward compatibility #

  • USB: RfidScannerPlugin, channel flutter_rfid_scanner, and scanResults behavior are unchanged for Android FH-930 apps on 0.0.x.
  • BLE aliases: deprecated typedefs in rfid_scanner_ble.dart — H100Rfid, H100BleDevice, H100RfidException.

Third-party binaries #

Android BLE support uses CFBLELibrary.aar (vendor SDK). Confirm redistribution rights before publishing to pub.dev.

License #

MIT — see LICENSE. Vendor AAR terms are separate.

0
likes
140
points
16
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for FH-930i USB RFID scanners and H100 / CFBLE BLE UHF readers.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on rfid_scanner

Packages that implement rfid_scanner