1

I'm pretty new to everything related to hardware.

I am searching for a way to connect PWA to POS hardware, like Scanner or cash drawer. How can I access these via PWA or JavaScript?

halfer
  • 19,824
  • 17
  • 99
  • 186
levi
  • 1,077
  • 2
  • 11
  • 24
  • You need to first research the hardware you are going to use and the features it has available for developers. Once you know those you can start coding to those features. Without more details, it is very hard for anyone here to help you with answers. – Mathias Dec 29 '20 at 14:22
  • Yes. I did this for a client 2 years ago. You will need to use the WebUSB or Bluetooth APIs. Warning they are very poorly documented. I was able to print receipts, tickets and open/close the cash drawer. You will need to use ESC POS to format data for the printers. Apple does not support these APIs. You are good to go with Chrome and Edge. – Chris Love Jan 08 '21 at 23:03

1 Answers1

0

The hardware you intend to use need to use webUSB api (for e.g. "Canon DR-M160II scanner" uses one), which will of course depend on the implementation by the hardware vendor.

You can either check if there's any compatible hardware already available and then for coding your PWA accordingly, you can refer to this web.dev article.

If you strictly need to use the existing hardware and can get the corresponding hardware vendor to customize it, you can ask them to refer to this article on web.dev.

Saurabh Rajpal
  • 1,537
  • 9
  • 14