angular-web-bluetooth icon indicating copy to clipboard operation
angular-web-bluetooth copied to clipboard

How can I send print job to bluetooth connected printer?

Open Sireini opened this issue 3 years ago • 2 comments

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)

Sireini avatar Aug 05 '20 12:08 Sireini

any follow up on this?

richard457 avatar Oct 01 '20 10:10 richard457

@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.

manekinekko avatar Nov 09 '20 16:11 manekinekko