WebHidLedgerUsb class

WebHID backend. Same 64-byte packets as the WebUSB backend: every transferOut sends one output report, every transferIn returns one input report.

HID devices have no serial number, so UsbDevice.identifier is built from the product id and the position in the last getDevices result.

Inheritance

Constructors

WebHidLedgerUsb(WebHID _hid)

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<bool>
override
getDevices() → Future<List<UsbDevice>>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(UsbDevice usbDevice) → Future<bool>
override
requestPermission(UsbDevice usbDevice) → Future<bool>
override
toString() → String
A string representation of this object.
inherited
transferIn(int packetSize, int timeout) → Future<Uint8List?>
Throws instead of returning null: LedgerUsb.exchange retries a null read forever, so a closed or unplugged device must fail the exchange.
override
transferOut(Uint8List data, int timeout) → Future<int>
Throws instead of returning -1: LedgerUsb.exchange ignores the byte count and would wait for the reply to a report that was never sent.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited