capacitor-plugin-usb-printer
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

usb-serial-plugin

This plugin can be used for reading data from other device over the usb channel

Install

npm install usb-serial-plugin
npx cap sync

API

usbAttachedDetached(...)

usbAttachedDetached(callback: MyPluginCallback) => any
Param Type
callback (data: UsbSerialResponse) => void

Returns: any


connectedDevices()

connectedDevices() => any

Returns: any


openSerial(...)

openSerial(options: UsbSerialOptions) => any
Param Type
options UsbSerialOptions

Returns: any


closeSerial()

closeSerial() => any

Returns: any


readSerial()

readSerial() => any

Returns: any


writeSerial(...)

writeSerial(data: UsbSerialWriteOptions) => any
Param Type
data UsbSerialWriteOptions

Returns: any


registerReadCall(...)

registerReadCall(callback: MyPluginCallback) => any
Param Type
callback (data: UsbSerialResponse) => void

Returns: any


Interfaces

UsbSerialResponse

Prop Type
success boolean
error UsbSerialError
data any

UsbSerialError

Prop Type
message string
cause string

UsbSerialOptions

Prop Type
deviceId number
portNum number
baudRate number
dataBits number
stopBits number
parity number
dtr boolean
rts boolean
sleepOnPause boolean

UsbSerialWriteOptions

Prop Type
data string

Readme

Keywords

Package Sidebar

Install

npm i capacitor-plugin-usb-printer

Weekly Downloads

1

Version

0.0.11

License

MIT

Unpacked Size

55.6 kB

Total Files

29

Last publish

Collaborators

  • popeye_tan