Mini Thermal Printer + Raspberry Pi works for text, but gibb

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
zackzachariah
 
Posts: 2
Joined: Sun May 24, 2020 4:55 pm

Mini Thermal Printer + Raspberry Pi works for text, but gibb

Post by zackzachariah »

Hello and thanks for any help you can give me on this...

I ordered the Mini Receipt Printer Starter Pack (Product ID 600) from Adafruit and have tried using it connected to a Raspberry Pi Model 3 B and a Model Zero W both to no avail. In both cases, I followed the tutorial here: https://learn.adafruit.com/networked-th ... re-printer

I can get the printer connected (double checking the baud rate), and I can get it to print text strings both via the terminal > pipe and via the pipe to lp command. However, when I try to print anything graphical (including the sample command to print the Pi logo, or when I hit "print test page" from Print Settings), I get a couple lines of data and then MANY lines of gibberish characters.

At first I thought this was a soldering issue with the Zero W headers, so I tried the 3 whose GPIO headers I know work, but both machines show the exact same issue. I've included photos below of my wiring and of the results of print attempts (text and then images) and my self-test showing the printer at least works internally.

Thanks for any help you can give me sorting this out!
Headers on the Pi
Headers on the Pi
pi-headers.jpg (272.14 KiB) Viewed 553 times
Plugs on bottom of Printer
Plugs on bottom of Printer
printer-bottom.jpg (113.85 KiB) Viewed 553 times
Results of print attempts
Results of print attempts
Print Results.jpg (161.92 KiB) Viewed 553 times

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by adafruit_support_carter »

Seems like the printer is generally working. So maybe something has changed or not quite right software-wise. When you went through the setup, did it work as shown in the guide? Or did you run into difference or issues?

User avatar
zackzachariah
 
Posts: 2
Joined: Sun May 24, 2020 4:55 pm

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by zackzachariah »

Hey Carter, thanks for the reply!

I restarted the process on a clean install of Raspbian (to verify that it all worked as promised). Here are my notes:

1. Clean install, running `uname -a` yields `Linux zero 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux`.

2. The install process works fine and as-promised until I reach the lines that require calling `lpr`. I have to use `lp` instead on a clean raspbian install.

3. Printing text via the CUPS driver and lp works perfectly. Printing images still fails as shown in my first post.

4. If I clone the Python library and call it using python3, it works (with a couple little tweaks) just fine to print images.

So I agree the issue appears to be with the flow from png to `lp` to CUPS to printer, and not with the pi or the printer themselves. Any ideas?

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by pburgess »

I might be confusing this with another project, but a faint memory has me thinking this might only work with Raspbian Jessie as described in the guide…that something out-of-our-hands with the print driver broke in later releases. I’ll try digging into it later today.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by pburgess »

Update: can confirm, works with Raspbian Jessie (which only runs on older Pi models), does not work with the current Buster release.

I’m told a refund arrangement was already made? If not, let us know.

Sorry I couldn’t puzzle this one out. You got further along than I managed. I’ll update the guide to reflect these problems.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by pburgess »

Update to the update: it does work in Raspbian Stretch and prior Buster release as well (just not the latest “raspios” Buster), if one uses “lp” instead of “lpr”. This might provide a middle ground in that it runs on later hardware than Jessie, just isn’t the newest-and-shiniest OS release.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by pburgess »

Update-to-update-to-update: everything’s fixed, was simply a compiler issue. Repo and guide and everything’s been updated to reflect this. Thanks for your patience.

User avatar
mrncrds
 
Posts: 2
Joined: Fri Aug 28, 2020 6:35 am

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by mrncrds »

Hi, I'm having the same issue...

My mini thermal printer is connected to a Raspberry Pi 4 and its printing gibberish when the text has more than one line or when its an image. I've tried changing the baud rate and power supply (5V 2A, 5V 4A, 9V 2A) but nothing seems to work... any ideas what could be wrong?

Thank you!
Attachments
IMG_6457.png
IMG_6457.png (762.73 KiB) Viewed 444 times
IMG_6456.png
IMG_6456.png (939.52 KiB) Viewed 444 times

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by adafruit_support_carter »

@mrncrds Please don't cross post.
viewtopic.php?f=19&t=168872

User avatar
hereethan
 
Posts: 23
Joined: Wed Dec 19, 2018 1:11 pm

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by hereethan »

Hello all,

Hope everyone is surviving 2020!

I am having the same exact issues, and have been hitting a wall. The thermal printer can print text properly (both via CUPS and the serial output in the CLI), but, when CUPS attempts to send an image its way - it gets completely garbled (attaching image). It is currently running Buster, and is utilizing the ZJ-58 drivers as outlined in the Networking Thermal Printer guide (https://learn.adafruit.com/networked-th ... i?view=all).

I have done a clean install multiple times, and used a multimeter to confirm that the printer is getting the proper power. But, still, whenever I attempt to use LP to send an image over (no matter the format), it spits out this garbled output. I event spent some more money and purchased a second printer - thinking it was a hardware issue, but, that made no difference.

If anyone could provide any tips, it would be most appreciated. Do I need to run a different OS? Is there a workaround someone has found? Could really appreciate some help, I'm putting together a gift for a family member during this lovely quarantine times...

Around a year ago, I had this working perfectly on another printer and Pi Zero, so, unsure what is happening this time around.
Attachments
IMG_3023.jpg
IMG_3023.jpg (968.91 KiB) Viewed 423 times

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mini Thermal Printer + Raspberry Pi works for text, but

Post by adafruit_support_carter »

@hereethan Please start a new thread for your issue.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”