I am making an application using Electron and I need to open a cash drawer that is connected to the printer through rj11 without having to print anything.
I know you can send a command to the printer to open the drawer but I do not give the key.
In the attached image, I send the EPSON information about the command that needs to be sent to the drawer but I do not know how to do it.
Thanks in advance!
POSSIBLE SOLUTION:
Well, I know it's a little "botched" and that the elegant thing would have been to find the solution to my question but safe from something better maybe this helps someone:
I have created two printers:
#1.: Impresora normal, configurada para que imprima el ticket y además abra la cajonera.
#2.: Impresora cajonera, configurada para que no imprima el ticket pero sí abra la cajonera.
To configure it in this way (in the TM-T20II) follow the following steps:
# En la pestaña de "Papel/Calidad"->Origen del papel => None
# Alimentación y corte->Preestablecido=>Docum. [Sin alument.,sin corte]. Además en Detallado asegurarse que no hay activo nada.
# Periféricos->Periféricos=>Caja. Configurar el cajón para que abra, a través de Caja #1 (2 pines), abrir, tanto al inicio del documento como al final del documento.
Also, if you are using Electron, as it is my case, you can launch an event that is listening Electron as follows:
const ipcRenderer = require("electron").ipcRenderer;
ipcRenderer.send("abrirCajonera", nombreImpresoraCajonera);
Where PrinterNameCashboard is the name of the printer in the OS and openChapter the method defined in Electron. More info on link
In my case I have a configuration table in BBDD that contains the names of the printers.
Anyway, I hope it helps someone.
Greetings.