I'm (now for some weeks) trying to get a thermal printer (ttl) to work without success. I've done every step exactly like said in this tutorial but the printer does nothing. Since I don't know how to debug this kind of problem and I also couldn't find any solutions on the web, I hope you can help.

The Hardware:

  • RPI2 B
  • Thermal Printer - Adafruit #597
  • Power supply for the RPI 5V 2.5A
  • Power supply for the printer 5V 10A

The Software:

  • Raspbian Jessie
  • Zijiang ZJ-58 Printer Driver
  • Different Packages (see tutorial)


ls -la /dev/ttyAMA0 results in crw-rw---- 1 root dialout 204, 64 Jul 27 10:47 /dev/ttyAMA0

sudo echo "TEST" > /dev/AMA0 has absolutely no effect.

Here are the wires:

overview connection to rpi connection to printer


Now It's connected correctly but still isn't reacting to sudo echo "TEST" > /dev/AMA0. I think there is nothing broken, because if i boot with serial port enabled, the printer starts to print endless gibberish stuff.

Any idea?

I've just erased the raspbian and started from scratch.

  1. Start up and disable Serial => done
  2. Restart => done
  3. Connect the printer => done
  4. Substitute the correct baud rate via stty -F /dev/ttyAMA0 19200 => done
  5. Print test echo -e "This is a test.\\n\\n\\n" > /dev/ttyAMA0 => nothing happens
  • If you hold the feed button down, does it print a test page?
    – Ron Beyer
    Aug 2, 2016 at 19:23
  • yes. i'm getting a test page. Aug 2, 2016 at 19:25
  • what device is your printer in /dev/usb? lp0? Who owns that device file (you can tell by running ls -la /dev/usb/ Aug 2, 2016 at 19:41
  • What happens if you sudo su to become root and use echo "test" > /dev/usb/lp0? Aug 2, 2016 at 19:46
  • 1
    Goldilocks may have noticed that you put the serial connector on the wrong pins. Shift the connector down one pin, so you have 2 free pins (the 5V) then re-enable the console to see if it spits out garbage or text. If not.. then RMA it as dead on arrival, wait for a new one. It happens to everybody.
    – Piotr Kula
    Aug 22, 2016 at 20:44

1 Answer 1


The connector on the pi is in the wrong position. It's starting at the second pin down on the outer row, which is a 5V power pin, so the other two pins connected to the TTL jack on the printer are GND and TXD.

Presuming the black wire is for ground and that cable was built to cross the lines properly (it is impossible to tell which pin is which on the printer, but the jack seems to fit in only one way, so if it came supplied from Adafruit it should be correct), then you want to move it one pin down, so there are two pins above it (considering the short end of the board with the USB & ethernet jacks as "below").

If you look at the full size image from the Adafruit guide this is easier to see (also there are lots of diagrams of the breakout online explaining what each pin is; going by that one you wanted pins 6, 8, and 10, not 4, 6, and 8).

Since the pi is still running I don't think accidentally attaching 5V to the ground of the printer will have damaged anything (although see ppumkin's comment below for a more refined opinion about that); I think it would have effectively disabled the serial connection. The major risk here would be shorting the 5V to ground, but if that happened the pi would be junk now.

However, since this means they were connected TX to TX, if the printer did output a wacky signal voltage then the UART may be damaged. If you connect it properly and it works, then no harm was done. Again presuming the cable crosses over properly, the middle wire yellow wire would have been from the Pi's GND to the printer's RX, and that is harmless (it also means the printer's RX line would never have gone high, so chances are it did not even consider there to be any connection on the TTL port).

  • 1
    Ahh drats. If the OP put 5V it may have blown a fuse on the printer :( I mean the only way is to re-enable the system console and connect the pins properly, the expected outcome should be printed garbage. If nothing then you need to see if there is a fuse near the 5V on the printer and try to fix it.
    – Piotr Kula
    Aug 22, 2016 at 20:40
  • 1
    maybe I have plugged it in the wrong way only the last time. I'll check it tomorrow (it's late here). Hopefully it's going to work. Many thanks anyway. Aug 22, 2016 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.