Puncte:1

How to print with a serial port printer?

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

Postează un răspuns

Majoritatea oamenilor nu înțeleg că a pune multe întrebări deblochează învățarea și îmbunătățește legătura interpersonală. În studiile lui Alison, de exemplu, deși oamenii își puteau aminti cu exactitate câte întrebări au fost puse în conversațiile lor, ei nu au intuit legătura dintre întrebări și apreciere. În patru studii, în care participanții au fost implicați în conversații ei înșiși sau au citit transcrieri ale conversațiilor altora, oamenii au avut tendința să nu realizeze că întrebarea ar influența – sau ar fi influențat – nivelul de prietenie dintre conversatori.