8

Following thermal printer + raspi2 tutorial for printing images (https://learn.adafruit.com/networked-thermal-printer-using-cups-and-raspberry-pi/connect-and-configure-printer), I've already connected the TTL printer through TX and RX serial connections. Also succesfully added as a printer (Zijiang ZJ-58 -> serial:/dev/ttyAMA0?baud=9600), and print test page when I click on test page print, but, the problem is when I try to send a "Hello world. test" or an image file through CUPS. The data is sent, but what I have as output is a endless bunch of Chinese chars:

printer output

Code sent for the output from image:

$ lpr -o fit-to-page raspberry-pi-logo.pdf

I'm using Raspbian. Raspberry Pi 2. CUPS libraries. Also tried with and without adding a 1Kohm resistor on Rx and Tx wires.

Is there any issue? Is there something that need to be calibrated? What am I doing wrong?

goldilocks
  • 56,430
  • 17
  • 109
  • 217
juasmilla
  • 233
  • 1
  • 3
  • 10
  • 3
    It might be useful to find out if this is jibberish or meaningful -- I tried the image [here](http://www.i2ocr.com/free-online-chinese-simplified-ocr) but it did not work; possibly if you try with a straight on, cropped, right side up, minimal length segment it might work better. I think the three 8's are very lucky, BTW. – goldilocks Jul 10 '16 at 17:53
  • 2
    Thanks @goldilocks , I've reached the supplier, he says it could be fixed with a firmware upgrade (as I've understood...) Let's see what they send me to fix... By the way, many thanks for your time, I'll keep you posted. – juasmilla Jul 11 '16 at 11:00
  • 2
    it may just be an error message that we cant read since we dont speak the language – Mohammad Ali Aug 13 '17 at 02:52
  • 2
    The combination of characters mixed in with spurious spacing, question marks, euro symbols, and other both Latin and Chinese characters tells me that's probably a red herring, @MohammadAli – XtrmJosh Mar 26 '18 at 23:19
  • 1
    http://scruss.com/blog/2015/07/12/thermal-printer-driver-for-cups-linux-and-raspberry-pi-zj-58/ might help – Dougie Dec 09 '18 at 11:52

1 Answers1

2

Question

How come my AdaFruit thermal printer prints only Chinese characters, How to fix?

Answer

thermal printer

(1) The printer seems to have set to talk Chinese. Your "Hello World" sounds rubbish to it. The printer is returning rubbish Chinese characters. They are indeed Chinese characters, but meaningless rubbish, not error message or something like that.

(2) The printer talks many languages, You can set it to English (User Guide Section 5, Ref 3 below)

(3) I guess the serial TTL communication (9600, 8N1, I guess) setup is OK, only initialization not OK. User guide has command set to do testing, eg, Line Feed, etc to do basic testing.

(4) I use and modify Chinese character (serial RS232 12V) and parallel (Centronic) inkjet/dot matrix printers (HP/Epson/Brother), and Chinese characters and graphics LCD (640 x 480). I am pretty sure that what I am saying is correct.

References

(1) AdaFruit Mini Thermal Receipt Printer (ASCII, GB2312-80) $50

(2) AdaFruit Mini Thermal Receipt Printer Tutorial

(3) AdaFRuit Mini Thermal Receipt Printer User Manual

(4) SparkFun Thermal Printer $55

(5) How to create and connect a virtual printer via RS232? - tlfong01

(6) Python GPIO Interface to Epson Inkjet Printer - tlfong01

tlfong01
  • 4,384
  • 3
  • 9
  • 23