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

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา