I print some shortcuts on a Zebra TLP-2844 printer and do my job fine on windows, sending EPL instructions to a shared USB printer as follows:
type Label.prn> \ my-pc \ zebra
and it seems to work with serial ports with
type Label.prn> COM1
Now I'm trying to do the same on linux, but it gets really hard! My first guess:
cat Label.prn | / dev / bus / USB / 005/002
since my printer is on bus 005, device 002 (checked with lsusb command), but it doesn’t work at all, as I get bad
bash: / dev / bus / usb / 005/002: Permission denied
Any guesses?
,
cat Label.prn | /dev/bus/usb/005/002
/dev/bus/usb/005/002, , " ". ,
/dev/bus/usb/005/002
cat Label.prn > /dev/bus/usb/005/002
, , - , , Linux. , :
lpr Label.prn
, - USB-, "lp", :
$ sudo usermod -aG lp USERNAME
USERNAME .
, .
, TLP2844 USB, arm9 linux.
:
printf "OD\r\nN\r\nD5\r\nS2\r\nZT\r\nQ128, 24\r\nq400\r\nA15,10,0,2,1,1, N,\" TESTE \ "\r\nP1\r\nFE\r\n" > /dev/lp0
... TEST
sudo chmod a+w /dev/usb/lp0
cp test.zpl /dev/usb/lp0
Sublime Text, :
{ "cmd": ["cp", "$file", "/dev/usb/lp0"], "encoding": "utf8" }
, Ctrl + B .
zpl TCP/IP: https://github.com/kashamalasha/AutoIt_ZebraTester
AutoIt Script, AutoIt . , , , , .