angular-web-bluetooth
angular-web-bluetooth copied to clipboard
How can I send print job to bluetooth connected printer?
Hi there,
I am trying to achieve the same as this example: https://github.com/WebBluetoothCG/demos/tree/gh-pages/bluetooth-printer
Would like to send print jobs to the connected printer. I tested the example above and that is printing for me. Would like to print receipts in my webapp :)
Also in this function:
requestValue() { this.valuesSubscription = this.bluetoothService.value().subscribe( () => null, (error) => console.log(error) ); }
I get this error:
No Services matching UUID 0000180f-0000-1000-8000-00805f9b34fb found in Device. (battery_service) at BluetoothCore.<anonymous> (manekinekko-angular-web-bluetooth.js:310)
any follow up on this?
@Sireini Please know that since I don't have access to the printer, I can not effectively help you debug the issue. But I will do my best. Do you have any of your repositories I can look at?
Looking at the example repo (https://github.com/WebBluetoothCG/demos/tree/gh-pages/bluetooth-printer) it looks like you need to specify these values:
- Primary service:
000018f0-0000-1000-8000-00805f9b34fb
. - Print characteristic:
000018f0-0000-1000-8000-00805f9b34fb
. - This is the print instructions you need to send to the printer.