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

This is a discussion on Setting up a Printer that's connected to Serial Port 1 - Linux ; 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 ...

+ Reply to Thread
Results 1 to 7 of 7

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

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

    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



  2. Re: Setting up a Printer that's connected to Serial Port 1

    Enrique Arredondo wrote:

    > 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


    http://127.0.0.1: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



  3. Re: Setting up a Printer that's connected to Serial Port 1

    Enrique Arredondo wrote:

    > 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 ?


    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.


  4. Re: Setting up a Printer that's connected to Serial Port 1


    "Robert Newson" wrote in message
    news:456F40A9.1000702@bullet3.fsnet.oc.ku...
    > Enrique Arredondo wrote:
    >
    >> 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 ?

    >
    > 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.
    >


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

    I used the http://127.0.0.1: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



  5. Re: Setting up a Printer that's connected to Serial Port 1

    Enrique Arredondo wrote:

    ....
    > I used the http://127.0.0.1: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


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

    > 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).


    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.

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


    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?


  6. Re: Setting up a Printer that's connected to Serial Port 1


    "Robert Newson" wrote in message
    news:456F5852.9040301@bullet3.fsnet.oc.ku...
    > Enrique Arredondo wrote:
    >
    >
    > You may need to change the perms on /dec/ttyS0, or the uid under which the
    > printer daemon (CUPS?) is running
    >


    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


    >
    > 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?
    >


    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



  7. Re: Setting up a Printer that's connected to Serial Port 1


    "Robert Newson" wrote in message
    news:456F5852.9040301@bullet3.fsnet.oc.ku...
    > Enrique Arredondo wrote:
    >
    > ...
    >> I used the http://127.0.0.1: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

    >
    > You may need to change the perms on /dec/ttyS0, or the uid under which the
    > printer daemon (CUPS?) is running
    >
    >> 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).

    >
    > 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.
    >
    >> Is it maybe my DATA PROTOCOL the problem ? I'm using NONE instead of
    >> XON/XOFF

    >
    > 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?
    >


    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.




+ Reply to Thread