3rd Party Thermal Printers

Hey Folks - the uConsole doesn’t have a printer - researching 3rd part drivers…

Hello,

I think this is easy to use:

Greatings,
Rene

So I send data to the Arduino and It prints out ascii?? will look into it - other way is to set up Windows 10 machine as a print server and the windows machine printer as a network printer… spent a productive evening exploring CUPS… if I can get a PPS file or find a compatible CUPS printer I can configure a ESC/POS thermal printer via CUPS - did manage some test prints via trial and error which wasted some real paper but it did prove the DevTerm was attempting to communicate with the printer…

There are also some usb printers, even wireless ones like this

image

I think its around 25€ on Aliexpress

3 Likes

I have one like this and a larger 80mm one - issue is printer interface with linux - once I get a generic thermal printer it will work fine…

I have a “catprinter,” which I think is similar to this one. There’s a good github page with links to printing programs and implementation info. I haven’t tried printing from Linux yet, but I’ve had success printing from macOS!

Catprinter advantages:

  • cute cat theme
  • low price (about USD $20)
  • will probably work with your phone, too (if you use their app)

Disadvantages:

  • probably less reliable than a wired printer like the Adafruit one
  • can’t print arbitrarily long material (i think a data buffer fills up; splitting the print into chunks works okay)
  • no CUPS integration—gotta use a catprinter-specific program to print

I’m being told that if I can find the printer port that I just copy the print text to that location and it will print unformated text… (since linux treats everything as a file )

Folks - I feel … very slow intellectually - I’m at an event with lots of free time found the following:

Printer plugged into Linux machine located at /dev/usb/…

did lsusb first to find if the printer is dectected:

on my machine:

/dev/usb/lp1

when I ran:

ls -l /dev/usb/lp1
crw-rw---- 1 root lp 180, 1 Aug 25 16:44 /dev/usb/lp1

changed access to port:

sudo chmod 777 /dev/usb/lp1

tested the port:

echo -e “This is a test.\n\n\n” > /dev/usb/lp1

got a this is a test out of the printer…

now use the cat command:

cat {full path with file name} > /dev/usb/lp1

or you can use

cd {full path name}

cat {file name} > /dev/usb/lp1

and it works with plan text files!!!

case closed …

1 Like

Thanks for suggesting this printer.
I got similar one (model MPT-II) and it works with python-escpos library in bluetooth mode if you create the rfcomm serial binding manually.
Instructions:
Note: I paired the printer through UI first, before running these. Pairing can also be done from CLI.

# Scan bluetooth
hcitool scan
# (optional) Check services for the found printer (MTP-II)
sdptool {bluetooth_mac_address}
# Create rfcomm bind
sudo rfcomm bind /dev/rfcomm0 {bluetooth_mac_address} 1
# Allow access for any user (just an example, use stricter if required)
sudo chmod 777 /dev/rfcomm0
# Install the python library in virtualenv
mkdir printer
cd printer
python -m venv .venv
source .venv/bin/activate
pip install python-escpos[all]

Create test python file main.py with contents:

from escpos import printer
p = printer.Serial("/dev/rfcomm0")
p.text("Hello world")
p.print_and_feed(3)

Run it

python main.py

At least text and QR codes work. Going to test images later.

Open to ideas if there is a simpler method.

1 Like

this forum is so use full on so many fronts - I’m always learning new ways to do things in linux. I had seen some python code to do this but not tried it - I’ll copy the code - my interest in this is that I’m afraid I’ll break the printer on my DevTerm and I want to print from other linux devices and thermal printers are very convenient especially the small ones for printing notes. - thanks!