Nano Thermal Printer printing gibberish

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pwnshop
 
Posts: 1
Joined: Mon Oct 17, 2022 2:44 am

Nano Thermal Printer printing gibberish

Post by pwnshop »

I've researched this problem in this forum and nothing worked. I've also noticed that others with this problem have posted and have been advised to start a new thread. So here I am with my thread of the problem.

I recently purchased the Nano Thermal Printer. The test page prints out
"9600 baud". Noted. I've made this change where applicable. Where I'm running into problems is the How-To ( https://learn.adafruit.com/pi-thermal-printer ) seems to be out of date.

I start with a fresh copy of Raspbian from the RPi Imager. I upgrade and update til its as current as it gets.
Then, I install the packages and libraries needed as per the Pi Thermal Printer How-To instructions:

Code: Select all

sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python-serial python-pil python-unidecode
A number of these packages and libraries aren't found.

- wiringpi: not available
- python-serial: not available
- UTL package python-pil
- UTL package python-unicode

Git and cups does install.

Another observation: I've noticed these libraries do install in Buster (I think, can't confirm at the moment) after some experimentation.

I went another route and followed this YouTube video https://www.youtube.com/watch?v=LwKOvT7rCiU and was able to print from the command line using

Code: Select all

echo -e "This is a test\\n\\n\\n" > /dev/serial0
with no problems. However, images and text files still print gibberish when printed from a print dialog.

I think the Adafruit tutorial on the Pi Thermal Printer needs a fresh set of eyes and update with current Pi models and Raspbian releases. In the mean time, what's a fix?

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

Re: Nano Thermal Printer printing gibberish

Post by pburgess »

Have tested and confirmed that…
starting with: 2022-09-22-raspios-buster-armhf-lite.img.xz
and running:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python-serial python-pil python-unidecode
works.

Errors of this sort usually happen when a server hosting the corresponding package is unreachable. The usual recourse is to try again later, perhaps an hour or two, see if the network issue has cleared up.

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

Return to “General Project help”