Peter Alcibiades wrote:
This is another question about my raw printer. The following command works perfectly:
cat temprint.txt > /dev/usb/lp0
and I've managed to get the hex characters going over to it to operate the cutter and to open the cash drawer.
The printer is set up in CUPS as raw, queue raw. Its connected using one of those usb to parallel adaptors - usb at the PC and parallel at the printer.
Refer to my messages on the 26th of November
Your problem is that when you cat to the raw device you aren't actually using the cups spooler at all, so there is no job management. You will also run into problems if say the printer is powered but unable to accept a job because it is (for example) out of paper, as then your cat will probably just sit there blocking everything else until the printer can print.
If the printer is configured as a raw device in cups and raw support is enabled then you should be doing lp -dprintername temprint.txt
Then cups will manage the task of spooling the job until the printer is online and it should all be managed properly.
I see this is for a receipt printer because you are sending cutter and drawer kick commands, you aren't hacking receipt printing support onto phppointofsale are you ? If so I probably still have the stuff from when I did that about 4 years ago, no doubt it would need updating and it is so nasty it never got accepted as a patch to the main project :)