Recently I encountered an issue to print character report to EPSON LQ2080 dot matrix printer. Wheneven the printer is off and on, in the first print, it prints funny characters at page 7. To figure out whether Apps sends wrong data to lq queue or lq sends wrong data to jet direct, I used $FND_TOP/bin/FNDPRESC to generate some control characters into file and print from unix command line to simulate the printing from Apps.
root # $FND_TOP/bin/FNDPRESC "/e@" > a.out
root # cat cat $APPLCSF/$APPLOUT/o26232850.out >> a.out
root # $FND_TOP/bin/FNDPRESC "/e@" >> a.out
Then use lq to print it to printer:
root # lp -c -d pr-ctl-mis06 a.out
Here -c means copy. pr-ctl-mis06 is the printer name and a.out is the file generated above.
In my company , we are using HP Jet Direct 300x to connect most of the printers to network and we use Jetadmin to configure printers in Unix.
To find the job status , I simply unplug the JD300x and thus the job is stuck in the lpq. Thus I can check using lpq.
root # lpq -P pr-ctl-mis06
Here I can see the job correctly stayed in the queue.
root # cd /var/spool/lp/tmp/ctloradev04/
root # ls
Here when I open the file with "Hex Editor Neo", I can see it's correctly formated and the control characters are exactly expected. The job generated by Apps looks exactly the same as the one I generated manually. So this means the Apps is doing its work correctly. And it's the Jetdirect and Epson side that's causing problem.
After upgrading the Jetdirect using HP Download Manager, which can automatically search Jetdirect box and upgrade its firmware, it still didn't help. This HP JD 300x has embeded web server and I also tried to do some configurations in EWS but still no help.
In Epson LQ2080, actualy in most Epson dot matrix printer, there's a setting 'Input buffer' which can receive printing data stream from parallel and free the sending device, eg PC, to do other jobs. So this time I don't need to unplug HP JD300x. I put the ''Input buffer' of EPSON 2080 to 'off'' and put the printer into 'Pause' mode, meaning the printer will not accept any data,
After load the paper and release the printer from Pause mode, it prints correctly. So it's the input buffer that cause the issue. Maybe it's related to JD and Epson communication that ruin the Epson input buffer.