mike42 / escpos-php

PHP library for printing to ESC/POS-compatible thermal and impact printers
Other
2.54k stars 862 forks source link

[QUESTION] ESC/POS Firmware 1.06 vs 03.01 #1313

Open samuelT2 opened 6 months ago

samuelT2 commented 6 months ago

Hi

I use your project since a couple of years for a project of myself where we print some stuff via a Raspi Zero to an EPSON TM-P20. Epson just released a new version of this printer, EPSON TM-P20II. The prints stopped working on the new printer - my guess is, it's the new firmware (see picture attached).

There's a tech reference for ESC/POS commands (https://download4.epson.biz/sec_pubs/pos/reference_en/escpos/index.html), but I have a hard time finding the reason, why exactly my prints do not work again.

May I ask you, if you have an idea, in which direction I should search? I can provide further project info, logs or whatever is needed anytime.

Thank you in advance! Sam

WhatsApp Bild 2024-03-07 um 21 03 43_2fd7baba

samuelT2 commented 6 months ago

I can print to my new printer with eg. echo "hello" > /dev/rfcomm0. But when using the same printer path for a new fileconnector, I get this as an output: Screenshot 2024-03-12 140100

samuelT2 commented 6 months ago

Even when I use your example 1:1, I've got the same message:

<?php
/* Call this file 'hello-world.php' */
require 'vendor/autoload.php';
use Mike42\Escpos\PrintConnectors\FilePrintConnector;
use Mike42\Escpos\Printer;
$connector = new FilePrintConnector("/dev/rfcomm0");
$printer = new Printer($connector);
$printer -> text("Hello World!\n");
$printer -> cut();
$printer -> close();

Calling php test.php results in: Screenshot 2024-03-12 163247