Score:1

How to print with a serial port printer?

th flag

I am completely clueless when it comes to printers, ports and things like that so I am just reading and trying to get a printer to work without getting a college degree haha...

Basically, I have a ORIENT BTP-2002NP (seems to be the same printer as SNBC BTP-2002NP) printer - it's a small thermal printer which I want to use to print basic stuff using PHP.

My main problem is - it's not a printer like usual printers, and I'm not that experienced with Ubuntu either - it does not get automatically detected, I can't just click "print" for it to work.

The device uses RS-232 cable, and I have it connected to USB through an adapter.

First I tried adding the printer - it was not detected. Then I tried adding it using CUPS - but ORIENT is not on the list of printers, and I don't have and wasn't able to find a PPD file. I was also unable to find any drivers for Ubuntu for this printer.

Then, my another idea was that I need to send information to print on the right tty which I think are ports?

I was able to find, that indeed the device gets connected and it ends up being ttyUSB0, and in lsusb it's displayed as Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port. According to some things I've found, I tried to cat and echo to that, to no avail. I did sudo su and tried cat /dev/ttyUSB0 as well as cat -v < /dev/ttyUSB0, and then in another terminal also did sudo su and tried different combinations of echo -e 'something' > /dev/ttyUSB0 - my echos "worked" with no errors or return message, but contrary to what guides and articles I found were saying, nothing showed up in the terminal with cat running.

At this point I'm kind of lost - I don't really grasp the concept of everything that's going on, and it seems like it's not something that I would be able to even really learn and understand in days or even weeks.

All I'm trying to do is print text from PHP to a thermal printer, but it's killing me... any form of help is really appreciated, I don't even know where to look for information at this point...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.