Setting up a Printer that's connected to Serial Port 1

Setting up a Printer that's connected to Serial Port 1

Post by Enrique Ar » Sat, 02 Dec 2006 02:18:49


I have fedore core 6 installed and I want to assign a printer to Serial port
1 , What's the way of configuring it, Is it the same as the Parallel printer
port ? How do I know how does linux calls the serial port 1 ?

Thanks
 
 
 

Setting up a Printer that's connected to Serial Port 1

Post by Lenar » Sat, 02 Dec 2006 05:22:22


http://www.yqcomputer.com/ :631

Because when you set up the printer you choose where the printer is. The OS
may already know where the printer is, if not then if the printer is on
serial port1 then use ttyS1

 
 
 

Setting up a Printer that's connected to Serial Port 1

Post by Robert New » Sat, 02 Dec 2006 05:30:38


The parallel ports are called /dev/lp${n} (/dev/lp0 [LPT1:], /dev/lp1, etc).
Serial ports are called /dev/ttyS${n} (/dev/ttyS0 [COM1:], etc).

In setting up a serial printer you'll also need to set the baud rate, bits,
parity, etc. How to do this I can't say as I haven't had to set up a serial
printer.
 
 
 

Setting up a Printer that's connected to Serial Port 1

Post by Enrique Ar » Sat, 02 Dec 2006 05:51:18


Thanks to both guys for answering, Here's the update

I used the http://www.yqcomputer.com/ :631 access and configure the printer on
/dev/ttyS0 (com1) and if I send something to print on that new printer I get
this :

[root@localhost ~]# lpstat barcode
barcode-2 root 2048 Thu 30 Nov 2006 12:38:12 PM
PST
[root@localhost ~]# lpstat -t
scheduler is running
system default destination: barcode
device for barcode: serial:/dev/ttyS0?baud=9600+bits=8+parity=none+flow=none
barcode accepting requests since Thu 30 Nov 2006 12:38:12 PM PST
printer barcode disabled since Thu 30 Nov 2006 12:38:12 PM PST -
Unable to open serial port device file "/dev/ttyS0": Permission
denied


but If I run this command, cat file > /dev/ttyS0, the printer lights blink
but nothing prints (because the file has ESCape codes in it and cat doesn't
works with them I guess).

Is it maybe my DATA PROTOCOL the problem ? I'm using NONE instead of
XON/XOFF

Thanks
 
 
 

Setting up a Printer that's connected to Serial Port 1

Post by Robert New » Sat, 02 Dec 2006 07:11:34


...

You may need to change the perms on /dec/ttyS0, or the uid under which the
printer daemon (CUPS?) is running


CAT handles escape codes....or more accurately, it just copies the contents
of whatever file(s) you give it to stdout - it doesn't care that there are
escape codes, etc.

Try cating directly to the printer, eg:

# cat > /dev/ttyS0
hello world ^M^J
^D
#

and see what comes out (^M means CTRL-M, ie press the CTRL key and the M
key, similar for ^J & ^D).

If nothing, then your printer is probably expecting some sort of "printer
language", eg PostScript or PCL. Alternatively, your baud rate, bits,
parity may be wrong.


If the printer requires some language (PS, PCL, etc) then you'll need a
filter to add the necessities.

Which printer are you trying to use?
 
 
 

Setting up a Printer that's connected to Serial Port 1

Post by Enrique Ar » Sat, 02 Dec 2006 08:51:53


I did a chmod 777 on /dev/ttyS0 just for the testing purposes and now I get
this message :

[root@localhost ~]# lpstat -t
scheduler is running
no system default destination
device for okidata2:
serial:/dev/ttyS0?baud=9600+bits=8+parity=none+flow=dtrdsr
okidata2 accepting requests since Thu 30 Nov 2006 03:35:46 PM PST
printer okidata2 disabled since Thu 30 Nov 2006 03:35:46 PM PST -
/usr/lib/cups/backend/serial failed
okidata2-10 root 8192 Thu 30 Nov 2006 03:35:40 PM
PST



I have an Okidata ML-320 printer which prints great on LP1 , so I connected
it to
serial 1 now (printer comes with Serial Card too) and speed matches on both
sides and I'm still getting this error

/usr/lib/cups/backend/serial failed

Thanks for your help
 
 
 

Setting up a Printer that's connected to Serial Port 1

Post by Enrique Ar » Sun, 10 Dec 2006 03:16:25


I Tested the Serial Printer on a LINUX AS server that I have around here,
and setting up the printer the same way as I did on FEdoraCore using
/dev/ttyS0, It worked out great!!!. So I though maybe FedoraCore it has
something not set right , so I downloaded Linux ES v.4 distribution ,
installed it on the same old PC that Had Fedora Core, and it printed out
with no problems whatsoever.

GO Figure!

Why in the world is Fedora Core reporting a permission denied on /dev/ttyS0
and RH ES V.4 and RH AS/3 won't.