Slow dosemu printing
Hello, i am using dosemu 1.3.4.0 and freedos to use an internal clipper application in my point of sale systems, all works ok but barcode printing, well it is not barcode problems, it works very well sending raw format to the printer, the problem it is that when i send many prints it is very slow, it takes a long time between prints (about 10 seconds) so if you have to print thousands of barcodes it is too slow, i was using cups linux servers with samba and sending the jobs with windows client machines so i know it is not a cups or pos app. problem, i have no problem printing sells tickets because they are only one print job for every sell, i have tried different ways of improve printing speed without luck, the hogthreshold or the printer_timeout either helps, i have tried to using this like print command $_lpt1 = "cat - > /dev/lp0" to try to know if it is a cups problem, i would like to try to do direct hardware access to see if dosemu prints faster than using externals commands but i have problems with direct hardware access, i have used this in my dosemu.conf:
$_ports = " device /dev/lp0 fast range 0x378 0x37a" $_irqpassing = "7"
parport0 have this configuration in my test machine, and launched dosemu with "dosemu -s" like root, but i dont know how to disable the use of printers commands, it keeps trying printing redirection, if i comment the $_lpt# lines it simply assumes defaults one so i can not disable, any idea to speed up multiple printing jobs in dosemu? Thanks in advance.
Best Regards,
Miguel Angel.
Quoted 5 lines · Linos
Hello, i am using dosemu 1.3.4.0 and freedos to use an internal clipper application in my point of sale systems, all works ok but barcode printing, well it is not barcode problems, it works very well sending raw format to the printer, the problem it is that when i send many prints it is very slow, it takes a long time between prints (about 10
Quoted 8 lines
seconds) so if you have to print thousands of barcodes it is too slow, i was using cups linux servers with samba and sending the jobs with windows client machines so i know it is not a cups or pos app. problem, i have no problem printing sells tickets because they are only one print job for every sell, i have tried different ways of improve printing speed without luck, the hogthreshold or the
printer_timeouteither helps, i have tried to using this like print command $_lpt1 = "cat - >/dev/lp0" to try to know if it is a cups problem, i would like to try to
Try your $_lpt1 command with $_printer_timeout = (5) (or less).
Regards,
Signature · 2 lines
Rafał Cygnarowski [email protected]
Quoted 6 lines · Linos
Hello, i am using dosemu 1.3.4.0 and freedos to use an internal clipper application in my point of sale systems, all works ok but barcode printing, well it is not barcode problems, it works very well sending raw format to the printer, the problem it is that when i send many prints it is very slow, it takes a long time between prints (about 10 seconds) so if you have to print thousands of barcodes it is too slow
[...]
Quoted 2 lines
helps, i have tried to using this like print command $_lpt1 = "cat - >
/dev/lp0" to try to know if it is a cups problem,
In principle, what the DOSEMU printer driver does is to use line buffering (flushes every CR/LF) and if it has been inactive for a while (timeout seconds) it will close the pipe. I'm wondering what the output is, perhaps there are no CR/LF's?
Quoted 7 lines
$_ports = " device
/dev/lp0fast range0x3780x37a" $_irqpassing = "7"parport0 have this configuration in my test machine, and launched dosemu with "dosemu -s" like root, but i dont know how to disable the use of printers commands, it keeps trying printing redirection, if i comment the $_lpt# lines it simply assumes defaults one so i can not disable,
In principle the $_ports line overrides the $_lpt configuration. Normally anything that goes to port 0x378 - 0x37a is intercepted and processed by $_lpt1, but if you use $_ports it's not intercepted and goes straight to the hardware.
But please send a log of
dosemu -s -D+ip -o log
perhaps something goes wrong.
Bart
Hello,
the attached patch causes
$_lpt2=""
to completely disable LPT2, independent of any $_port setting.
It also flushes every second. Let me know if it helps.
Bart
base/dev/misc/lpt.c +4 -2
@@ -221,11 +221,11 @@ lpt[i].remaining =-1 ;/* mark not accessed yet */ if (lpt[i].dev) lpt[i].fops = dev_pfops; -else +else if (lpt[i].prtcmd) lpt[i].fops = pipe_pfops;if (i >= config.num_lpt) lpt[i].base_port =0 ; -if (lpt[i].base_port) { +if (lpt[i].base_port !=0 && lpt[i].fops.open) { io_device.start_addr = lpt[i].base_port; io_device.end_addr = lpt[i].base_port +2 ;port_register_handler (io_device,0 );
@@ -258,6 +258,8 @@ lpt[i].remaining--;if (!lpt[i].remaining)printer_close (i); +else if (lpt[i].file !=NULL ) +fflush (lpt[i].file); } } }
Quoted 9 lines · Bart Oldeman
Hello,
the attached patch causes
$_lpt2=""
to completely disable LPT2, independent of any $_port setting.It also flushes every second. Let me know if it helps.
Bart
Well it seems that it was only my testing zebra printer that was failing in a strange way, i have tested with others printers an it works very well with $_printer_timeout = (1) thanks all by the help and sorry for the silly problem.
Regards,
Miguel Angel.
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html