Serial Port Printers

Hi

           I am using openSUSE 12.3 with XFCE DE.Now I want to know how to add serial port printers because in printer installation wizard you could find only LPT. Even though I don't have one but I want to know just out of curiosity.

Hi
Have you looked at using cups? http://localhost:631 you need to set it as an ipp printer (some reading of the help files for baud rates etc) eg ; ipp://address/COM1

I know it is possible to run the serial backend manually to discover attached serial devices if necessary.

/usr/lib/cups/backend/serial

As Malcolm already suggested, use the CUPS web interface to configure. If the attached serial printer device is not detected and listed by CUPS for some reason, it should be still be possible to add device URI manually, select ‘Socket’ but then edit like this

serial:/dev/ttyS0

You will then be presented with serial settings menu (baud rate and flow control etc). Hope that is enough to get you started. :slight_smile:

Hi
Ahhh serial, many thanks for that snippet :slight_smile:

My pleasure. Not a common interface these days, so no hardware to play with either… closest I get is occasional serial console work (with my USB to serial adapter) :slight_smile:

On 2013-09-05 02:36, deano ferrari wrote:
>
> malcolmlewis;2582870 Wrote:
>> Hi
>> Ahhh serial, many thanks for that snippet :slight_smile:
> My pleasure. Not a common interface these days, so no hardware to play
> with either… closest I get is occasional serial console work (with my
> USB to serial adapter) :slight_smile:

Were not they used for point of sale terminals? :-?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

There was a time when most printers has serial port connectivity, until the IEE 1284 (parallel port) interface became popular. I was once a technician working in the POS industry, and yes, serial port printers were commonplace.

Actually after reading in some posts I came to know that in order to check whether the serial port device has been detected or not using the following command would help

#dmesg | grep tty

but when I type this at my console I have seen notation like /dev/ttyUSB0 is attached but what is this.Serial devices should have notations like /dev/ttyS0 or so.

The ‘/dev/ttyS*’ device nodes relate to serial port devices, while ‘/dev/ttyUSB*’ pertain to usb-serial devices. If you examine

ls -l /dev/ttyS*

you’ll find udev creates 8 serial device nodes by default. (These don’t usually relate to physical serial ports any more though.)

What do you mean by USB -serial devices.

Devices such as USB-serial converters and USB broadband modems show up as usb-serial devices. For example, I get

ls -l /dev/ttyUS*
crw-rw---- 1 root dialout 188, 0 Sep  5 18:01 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Sep  5 18:01 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Sep  5 18:01 /dev/ttyUSB2

which relate to my laptop’s built-in 3G modem device


dmesg|grep tty
    0.000000] console [tty0] enabled
   19.206671] usb 4-1: Sierra USB modem converter now attached to ttyUSB0
   19.206723] usb 4-1: Sierra USB modem converter now attached to ttyUSB1
   19.206767] usb 4-1: Sierra USB modem converter now attached to ttyUSB2

I have HP LaserJet 1018 USB printer can I use serial to USB converter to check the serial port printing

Yes, provided it is supported by Linux. I have a device that is supported by the pl2303 kernel driver

Bus 007 Device 002: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]
# lsmod|grep serial
usbserial              47316  2 pl2303,sierra

It is what I use to connect to serial port devices.

Actually, cancel that. I thought you were referring to a serial printer. A printer with a USB interface is NOT a serial printer.

On 2013-09-05 03:16, deano ferrari wrote:

>> Were not they used for point of sale terminals? :-?

> There was a time when most printers has serial port connectivity, until
> the IEE 1284 (parallel port) interface became popular. I was once a
> technician working in the POS industry, and yes, serial port printers
> were commonplace.

Yes, the 5ESS used them. But we connected them to a Cisco router and
dumped the printouts into a remote harddisk.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-09-05 08:16, nishanth9042 wrote:
>
> I have HP LaserJet 1018 USB printer can I use serial to USB converter to
> check the serial port printing

No, but if you get two usb-serial ports you can connect one to the
other, with some software trickery.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

K thanks for all your replies

No, you can’t use USB-serial converters back-to-back like that. Direct access to the printer USB interface is requiresd. CUPS relies on access to the USB interface via the usb backend (/usr/lib/cups/backend/usb), which uses the to communicate to the USB device (corresponding to the configured device URI).

Prior to CUPS using libusb, the usblp driver (USB Printer Device Class driver) was used to communicate to USB devices using a relatively simple bulk transfer of data. CUPS newer usb backend (relies on libusb) to communicate to printer class interfaces in a more complex manner. It is responsible for checking all USB buses for attached printer class devices, and using the GET_DEVICE_ID request to match the required printer based on the ID sting returned. It then handles the device locking, the initialization sequence, then sending the data in blocks (via one or more bulk transfer operations), and releasing the device interface once complete.

Serial printers were far more simple to communicate with, sending ASCII raw data, and use of ESC/P (Epson Standard Code for Printers) sequences was also common.