Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Epson ePos Javascript SDK: TM-P80 not working over HTTPS

I've build an intergration between our online software to Epson EPOS printers. (epos-2.22.0.js) I have successfully connected serveral printers such as tm-t88vi. I've solved much of the SSL problems with generating custom SSL certificates with OpenSSL and install them in the printer through EpsonNet Config. Then add the CA of the certificate in your browser, and https communication is up and running.Still there were some errors and no printing but another hour of googling lead me to this solution:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

to ensure all the insecure requests from the epson js libary are upgraded to secure requests, and our webapplication doesn't throw errors about insecure communication, and is printing!

But how different it is with the TM-P80. First problem i've ran in to, was that my custom certificate wasn't accepted by EsponNet Config. After hours of trying I figured out that it only accepts v1 ssl certificates (created with openssl-1.1). That gives me the gray lock (SSL ok) when opening the EpsonConfig page in Chrome. But still my application won't print with the error:

POST https://192.168.2.180/cgi-bin/epos/service.cgi?devid=local_printer&timeout=10000 net::ERR_EMPTY_RESPONSE

If I comment out the "upgrade-insecure-requests" tag, and accept insecure content on the page (Chrome setting) then the request goes to: (http instead of https)

 POST http://192.168.2.180/cgi-bin/epos/service.cgi?devid=local_printer&timeout=10000 

and the printer is printing, but the whole application is flagged as insecure. Another test: http://192.168.2.180/cgi-bin/epos/service.cgi returns a HTTP code 200 https://192.168.2.180/cgi-bin/epos/service.cgi returns a HTTP code 404

So to sum up:

  • code / certification works with other Epson ePOS printers fully SSL
  • certificate works on printer config page (https://192.168.2.180)
  • insecure requests to printer lets the printer print
  • secure requests are responded with an EMPTY_RESPONSE

Has anyone dealt with this exact problem, or has another idea to try ?

Thanks in advance for your reactions!

like image 592
Jeroen Ruissen Avatar asked Nov 03 '25 22:11

Jeroen Ruissen


1 Answers

You should use port 8084 for https.

http  8008  
https 8043
like image 89
Emerson Barros Avatar answered Nov 06 '25 21:11

Emerson Barros



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!