Como enviar comandos SGD para a impressora USB?

2

Estou tentando usar os comandos do SGD na impressora USB Zebra 420.

printf "! U1 getvar \"device.languages\"\r\n" | lpr -P myprinter -o raw 

Espero que isso imprima o valor de idioma atual, mas receba uma string vazia. Como enviar corretamente o comando e receber resposta?

UPDATE: algumas informações relacionadas ao dmesg

[    2.912815] usb 1-1.3: new full-speed USB device number 4 using dwc_otg
[    3.048399] usb 1-1.3: New USB device found, idVendor=0a5f, idProduct=0065
[    3.057429] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.066719] usb 1-1.3: Product: ZTC ZM400-200dpi ZPL
[    3.073649] usb 1-1.3: Manufacturer: Zebra Technologies
[    3.080757] usb 1-1.3: SerialNumber: XXX999999
[    3.931237] udevd[156]: starting version 175
[    6.294509] bcm2835-rng 20104000.rng: hwrng registered
[    8.580407] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[    8.934595] random: lpinfo urandom read with 87 bits of entropy available
[    9.215446] usblp 1-1.3:1.0: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x0A5F pid 0x0065
[    9.235924] usbcore: registered new interface driver usblp

[   31.371525] usblp0: removed
[   31.441360] usblp 1-1.3:1.0: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x0A5F pid 0x0065
[   31.835757] warning: process 'colord-sane' used the deprecated sysctl system call with 8.1.2.

UPDATE 2: imprimir no dispositivo usb

root@raspberrypi:/home/pi# printf “! U1 getvar \“device.languages\“\r\n” > /dev/usb/lp0
    
por Pablo 04.08.2017 / 00:45

0 respostas

Tags