5

I am working on a web application made in MERN stack and had integrated Epson Javascript SDK to print receipts as we are using Epson TM-M30 Printer. Web app might be running on mostly Safari but it can chrome or firefox sometimes.

I doubt assigning a CA certificate to a private IP will work or not. Correct me if I am wrong.

It works perfectly in localhost on PORT 8008 with respective printer IPs and deviceID as per they mention in their SDK Document connection function.

When I try to access the same printer using the same web application hosted on Domain that is running on HTTPS protocol on PORT 8043 which is specifically mentioned in SDK document connection function. Browser blocks web application request to print receipt and throws ERR_CERTIFICATE_INVALID.

I had checked in Printer configuration and it shows that printer is running on SELF SIGNED CERTIFICATE.

Is there a way to make it accessible?

I am requesting connection using the following piece of code:

  new epson.ePOSDevice().connect(ipAddress, port); PORT: 8008 for localhost and 8043 from hosted domain
Niraj Patel
  • 810
  • 8
  • 15

1 Answers1

0

Your options here are a bit limited, either you need to install a signed certificate on the printer or you need to configure your browser to allow self signed certs, which is something that browser makers have made harder over the years.

You don’t say which printer or browser you are using, so it hard to give a full answer, however if your using Chrome you can follow these instructions.

David Bradshaw
  • 11,859
  • 3
  • 41
  • 70
  • I had already mentioned Printer model also I had added target browsers in question – Niraj Patel Sep 16 '20 at 19:03
  • Have you seen this question https://stackoverflow.com/questions/50116786/epson-tm-t88v-i-ssl-certificate-issue – David Bradshaw Sep 16 '20 at 19:12
  • Yes, I do, but If I had to target a single user that might work, but asking every user to add certificates and then configure their browser might not be a good idea. I think I am missing something from the SDK because they provide a separate port 8043 for SSL/TLS connections then what is the use of that port? – Niraj Patel Sep 16 '20 at 19:19
  • I guess it is for kiosk type settings, where you control every browser. If you want any user to connect to the printer, your only option is to put a signed cert on the printer. I suggest you talk to the manufacturer about how to do that, if they don’t support you have a problem. – David Bradshaw Sep 17 '20 at 08:54
  • That said maybe you could create a proxy server between the printer and the network, that way only the proxy would need to except the dodgy cert – David Bradshaw Sep 17 '20 at 08:56