A flutter webusb plugin

Overview

License: MIT pub dev webusb

WebUSB plugin

Apparence.io logo

Developed with 💙  by Apparence.io

This plugin provide access to USB devices from web pages with WebUSB.

Platform Support

Android iOS MacOS Web Linux Windows
✔️

Usage

import 'package:usb_device/usb_device.dart';

final UsbDevice usbDevice = UsbDevice();

var pairedDevices = await usbDevice.pairedDevices; // get paired devices
var pairedDevice = await usbDevice.requestDevices([DeviceFilter(vendorId : 0x00, productId: 0x00)]); // par a device 
List<USBConfiguration> availableConfigurations = await usbDevice.getAvailableConfigurations(pairedDevice); // get device's configurations 
USBDeviceInfo deviceInfo = await usbDevice.getPairedDeviceInfo(pairedDevice); // get device's info
await usbDevice.open(pairedDevice); // start session
await usbDevice.close(pairedDevice); // close session

Implementation

USB

  • getDevices() : Get paired attached devices
  • requestDevice(filters): pair a device with filter or not

USBDevice

  • Get device info with configuration
  • open(): Start session
  • close(): Close session
  • selectConfiguration(configurationValue): Select a specified configuration
  • claimInterface(interfaceNumber): Claim an interface for exclusive access
  • releaseInterface(interfaceNumber): Release a claimed interface
  • controlTransferIn(setup, length): Return result of a command
  • controlTransferOut(setup, data) : Send a command to device
  • transferIn(): Return data from device
  • transferOut(): Send data to device
  • clearHalt()
  • reset(): Reset device
  • isochronousTransferIn()
  • isochronousTransferOut()

Events

  • OnConnect
  • OnDisconnect
Comments
  • Endpoint Issue

    Endpoint Issue

    Gets this error when trying to pass in the endpoint number into the function transferIn()

    Uncaught (in promise) Error: IndexSizeError: The specified endpoint number is out of range.

    at Object.createErrorWithStack (errors.dart:284)
    at Object._rethrow (async_patch.dart:200)
    at async._AsyncCallbackEntry.new.callback (zone.dart:1413)
    at Object._microtaskLoop (schedule_microtask.dart:40)
    at _startMicrotaskLoop (schedule_microtask.dart:49)
    at async_patch.dart:166
    

    issue

    opened by Sandarudx 3
  • MissingPluginException

    MissingPluginException

    I keep getting this exception: Flutter Web Bootstrap: Programmatic MissingPluginException(No implementation found for method getDevices on channel apparence.io/usbdevice)

    Anyone who knows the reason for this?

    opened by digitalinnovationas 0
  • 怎么向usb设备发送数据

    怎么向usb设备发送数据

    /// send data to usb
    Future transferOut( dynamic device, endpointNumber, ByteBuffer data) { return _platform.transferOut(device, endpointNumber, data); }

    我找到发送数据的方法,其中endpointNumber这个端口号参数,是怎么获取的呢,求解答

    opened by GalaxyCal 2
  • Use with Fingerprint DigitalPersona

    Use with Fingerprint DigitalPersona

    Hi,

    Is there any manual or tutorial to read data from the DigitalPersona fingerprint device? I am interested to read data from this device in Flutter Web. Thanks. Regards.

    opened by sic4change 0
  • USB NFC reader Accessed denied

    USB NFC reader Accessed denied

    Hello everyone I managed to connect my NFC reader via USB but I have a problem, I get access denied.

    As you can see in the picture below: Screenshot (220) Screenshot (221) Screenshot (222) Screenshot (223)

    Is it a way to make this work?

    The NFC reader is the following model: ACR122U PICC interface

    Thank you in advance.

    help wanted 
    opened by IvanoiuAlexandruPaul 4
  • Is this library usb serial protocol based?

    Is this library usb serial protocol based?

    Hi there, just wanted to know if this library supports usb serial protocol or is it for HID devices?

    I have a few arduinos I'd like to connect using this.

    opened by realrk95 1
Owner
Apparence.io
App development studio
Apparence.io
This is just the simplyfied Flutter Plugin use for one of the popular flutter plugin for social media login.

social_media_logins Flutter Plugin to login via Social Media Accounts. Available Social Media Logins: Facebook Google Apple Getting Started To use thi

Reymark Esponilla 3 Aug 24, 2022
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Baseflow 1.7k Dec 31, 2022
Unloc customizations of the Permission plugin for Flutter. This plugin provides an API to request and check permissions.

Flutter Permission handler Plugin A permissions plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check perm

Unloc 1 Nov 26, 2020
Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform spe

Gillian 33 Dec 18, 2022
A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also have privilege for fully customization from user side. like flipkart, amazon, myntra, meesho.

step_tracker plugin A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also

Roshan nahak 5 Oct 21, 2022
Boris Gautier 1 Jan 31, 2022
A Side Menu plugin for flutter and compatible with liquid ui for flutter

Liquid Shrink Side Menu A Side Menu plugin for flutter and compatible with liquid ui Side Menu Types There are 8 configuration of Liquid shrink side m

Raj Singh 18 Nov 24, 2022
FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts

中文文档 中文介绍 Release Note v3.0-preview.17 PS: Before updating the beta version, please read the CHANGELOG to see if there are any BREAKING CHANGE Flutter

Alibaba 6.3k Dec 30, 2022
Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable.

Flutter Counter (iOS & Android) Description Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable. Create i

Salmaan Ahmed 15 Sep 18, 2022
Flutter simple image crop - A simple and easy to use flutter plugin to crop image on iOS and Android

Image Zoom and Cropping plugin for Flutter A simple and easy used flutter plugin to crop image on iOS and Android. Installation Add simple_image_crop

null 97 Dec 14, 2021
Flutter-ffmpeg - FFmpeg plugin for Flutter. Not maintained anymore. Superseded by FFmpegKit.

flutter_ffmpeg FFmpeg plugin for Flutter. Supports iOS and Android. Not maintained anymore, superseded by FFmpegKit. See FlutterFFmpeg to FFmpegKit Mi

Taner Şener 635 Dec 22, 2022
Rave flutter - A Flutter plugin for Flutterwaves's rave.

Rave Flutter A robust Flutter plugin for accepting payment on Rave with Card Nigerian Bank Account ACH Payments Mobile money Francophone Africa Mpesa

Wilberforce Uwadiegwu 30 Oct 6, 2022
A flutter plugin to add login with facebook in your flutter app

Features Login on iOS, Android and Web. Express login on Android. Granted and declined permissions. User information, picture profile and more. Provid

Darwin Morocho 157 Jan 6, 2023
Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS

Introduction FlutterBluePlus is a bluetooth plugin for Flutter, a new app SDK to

null 141 Dec 22, 2022
This is a Flutter plugin that takes a JSON string and converts it onto a customizable Flutter Widget.

Colored JSON Convert JSON string into customizable widget. Getting Started ColoredJson is a stateless widget that produces a structured view of JSON s

null 4 May 20, 2022
Flutter plugin to manage home screen widget within flutter app.

Flutter App Widget App Widget / Home Screen widget plugin for flutter app Usage Please see app_widget subdirectory for the usage documentation. Plafor

Alexander Dischberg 6 Dec 16, 2022
Flutter plugin for creating static & dynamic app shortcuts on the home screen.

Flutter Shortcuts Show some ❤️ and ⭐ the repo Why use Flutter Shortcuts? Flutter Shortcuts Plugin is known for : Flutter Shortcuts Fast, performant &

Divyanshu Shekhar 39 Sep 26, 2022
Flutter plugin for selecting images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotation, cropping, adding sticker/text/filters.

advance_image_picker Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edi

Weta Vietnam 91 Dec 19, 2022