what about
Code:echo "test" >> /dev/usb/lp0
Hi!
I have an USB Printer connected and i can print via the windows PC!
But is there any possibility to print in the shell? For example simple text files. Normaly i print via lpr but, there is no lpr on the router!
what about
Code:echo "test" >> /dev/usb/lp0
Solar inverter monitoring with Asus wl500gx http://solar.reinieren.net (dutch)
Well i tried echo "HELLO" > /dev/usb/lp0
And if the printer is in standby mode, he wake up from it, but no printing at all..
I will try >> maybe, this is the problem...
And compiling lpr for the printer results in errors...
Are you sure that you printer is capable of direct text printing? May be you need to use ghostscript driver to format your text in the way the printer would like to see it?
This is way i installed ghostscript!
But when i try to run pdf2ps or ps -sDEVICE=/dev/usb/lp0 file.ps this error is coming:
AFPL Ghostscript 8.50: ./src/interp.c(295): Fatal error -20 in gs_interp_init!
Dunno what this means..
OK, it seems that your printer supports ps. May be first try to take or create in windows some simple ps (probably level 1) file and do something like this:
cp file.ps /dev/usb/lp0 or cat file.ps /dev/usb/lp0
Because, at the moment the question is: is it problem of ghostscript or printer output.
No, it is a problem of ghostscript!
I am not possible to CONVERT PDF to PS! This has nothing to do with the printer..
And i still got the same error!
I installed FreeType and imagemagick (because i found a thread with ghostscript and error), but the error is still there..
Is pdf2ps (you have to install ghostscript) working at your router?
No. The same error.Is pdf2ps (you have to install ghostscript) working at your router?
I have a HP deskjet 840c, copy text to /dev/usb/lp0 works for me here.
Solar inverter monitoring with Asus wl500gx http://solar.reinieren.net (dutch)
And how is the cmd?
cp textfile /dev/usb/lp0 ?
Well, OK, I also did test.
I have HP DJ 6122
Both
echo 'HELLO WORLD!!!' > /dev/usb/lp0
and
cat test.txt >> /dev/usb/lp0
are working, but!!!
When you send such command it wakes up from stand by (as you wrote), and do nothing. Actually it is waiting for end-of-page character (as far as I remember it should be ASCII code 0x0c). In my case after 10 seconds it parks the head and after another 10 seconds Manual-form-feed button on the printer is starting to flash. When I push it I get result.
Alternatively you may send next line and so on. When you fill all teh printer memory, or reach the end of the page you will get an output (I believe).
I'm not very good in shell to say how to do it in a nice way. However, I created a file which contains only a single EOP symbol (0x0c), then did cat eop.txt > /dev/usb/lp0 and get out what I sent to printer before!
Last edited by al37919; 19-10-2007 at 08:19.
Mhm..
I have the brother hl 2030 laser printer..
Wehn i send this
echo -e "HELLO\n" > /dev/usb/lp0 it wont work!
\r or \n\r also didnt work for me!
I am very angry about the ghostscript.. Why is there a package which dont work?!
Edit: You just wrote 0x0c in the file or who did you write it into the file?
cat > eop.txtEdit: You just wrote 0x0c in the file or who did you write it into the file?
then press Alt 012 (on the keypad) (this works from Windows)
then press Ctrl-D twice
After that you have file which contains the char you need.
Finally, brother hl 2030 is a GDI printer which does not support neither PS nor PCL nor any common page description language. Almost certainly it has no support for direct text printing.
Last edited by al37919; 19-10-2007 at 08:43.
O noes
What is about this printer? http://www.samsung.com/us/consumer/d...cd=CLP-300/XAA
IMHO the same situation.
In principle for brother they provide source code of the CUPS driver, but it means that you have to compile it on/for the router...