Рейтинг:1

How to print with a serial port printer?

флаг th

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

Ответить или комментировать

Большинство людей не понимают, что склонность к познанию нового открывает путь к обучению и улучшает межличностные связи. В исследованиях Элисон, например, хотя люди могли точно вспомнить, сколько вопросов было задано в их разговорах, они не чувствовали интуитивно связи между вопросами и симпатиями. В четырех исследованиях, в которых участники сами участвовали в разговорах или читали стенограммы чужих разговоров, люди, как правило, не осознавали, что задаваемый вопрос повлияет — или повлиял — на уровень дружбы между собеседниками.