epson-bluetooth-printer
v0.0.3
Published
Epson bluetooth printer
Downloads
6
Readme
epson-bluetooth-printer
Epson bluetooth printer
Install
npm install epson-bluetooth-printer
npx cap syncAPI
findBondedPrinters()scanForPrinters()connectAndPrint(...)resetBluetoothDiscovery()isDeviceConnected(...)disconnectDevice(...)getBluetoothState()testConnection(...)- Interfaces
findBondedPrinters()
findBondedPrinters() => Promise<{ printers: BluetoothDevice[]; }>Trova tutte le stampanti Epson accoppiate
Returns: Promise<{ printers: BluetoothDevice[]; }>
scanForPrinters()
scanForPrinters() => Promise<{ printers: BluetoothDevice[]; }>Trova dispositivi Bluetooth tramite discovery
Returns: Promise<{ printers: BluetoothDevice[]; }>
connectAndPrint(...)
connectAndPrint(options: { address: string; data: string; }) => Promise<void>Connetti e stampa in un'unica operazione
| Param | Type |
| ------------- | ----------------------------------------------- |
| options | { address: string; data: string; } |
resetBluetoothDiscovery()
resetBluetoothDiscovery() => Promise<void>Reset discovery Bluetooth
isDeviceConnected(...)
isDeviceConnected(options: { address: string; }) => Promise<{ connected: boolean; }>Verifica se un dispositivo è connesso
| Param | Type |
| ------------- | --------------------------------- |
| options | { address: string; } |
Returns: Promise<{ connected: boolean; }>
disconnectDevice(...)
disconnectDevice(options: { address: string; }) => Promise<void>Disconnetti dispositivo specifico
| Param | Type |
| ------------- | --------------------------------- |
| options | { address: string; } |
getBluetoothState()
getBluetoothState() => Promise<{ enabled: boolean; canEnable: boolean; }>Verifica stato Bluetooth
Returns: Promise<{ enabled: boolean; canEnable: boolean; }>
testConnection(...)
testConnection(options: { address: string; }) => Promise<{ success: boolean; }>Test connessione (invia comando di test)
| Param | Type |
| ------------- | --------------------------------- |
| options | { address: string; } |
Returns: Promise<{ success: boolean; }>
Interfaces
BluetoothDevice
| Prop | Type |
| ----------------- | --------------------------- |
| address | string |
| name | string | null |
| bondState | number |
| deviceClass | number |
| rssi | number |
