Thermal printer service doesn't start

Thanks for the guidance! It gives the same error as the log:

Oops: Unable to determine board revision from /proc/device-tree/system/linux,revision
or from /proc/cpuinfo
→ No “Hardware” line
→ You’d best google the error to find out why.

This does seem to be a wiringPi error, I think?

where you install the wiringPI ?

is it from
sudo apt install devterm-wiringpi-cpi -y ?

Oops! No, I compiled it with ./build from the ClockworkPi github. I removed it and installed it from apt now per your instructions. Now the driver gives me this error:

/usr/local/bin/devterm_thermal_printer.elf: error while loading shared libraries: cannot open shared object file: No such file or directory

Getting closer! I’ll keep looking, and I’ll appreciate your help if you have any other tips!


ldd /usr/local/bin/devterm_thermal_printer.elf

and paste the results

let’s find out where the .so will be loaded

Here’s the output: (0x0000ffff7ff6d000) => not found => /lib/aarch64-linux-gnu/ (0x0000ffff7fe57000) => /lib/aarch64-linux-gnu/ (0x0000ffff7fcda000)
/lib/ (0x0000ffff7ff3a000)

I do have in /lib, but not

OK, I made a link to and restarted devterm-printer, then did echo -en “\x12\x54” > /tmp/DEVTERM_PRINTER_IN. It worked! Test print successful.

However, I still can’t print from the shell (from the “Print” command in Firefox, for example.) In the Printers menu, any print jobs become “Held” and it shows an error message that the printer “may not be connected.”

I don’t know where to begin with this one–I guess this is an issue with the cups driver?–so any help would be much appreciated. And thanks so much for your help so far, @guu !

1 Like

perhaps reinstall

devterm-thermal-printer-cups ?

sudo apt install -y devterm-thermal-printer-cups 

Don’t use this GitHub - clockworkpi/WiringPi: Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings) I don´t know why its added to the repo.

As you can see the error comes from here , and the CPI WiringPi has those values hardcoded

Use this WiringPi cd into wiringPi and make install

cd wiringPi
make install

I have the same issue with printer from the system/browser GUI, but I can still echo something to /tmp/DEVTERM_PRINTER_IN and it prints correctly.

I got frustrated and reimaged, then found out installing snapd can cause this(I don’t know how yet).

@guu So far I haven’t had any luck uninstalling and reinstalling devterm-thermal-printer-cups and/or cups itself. Thanks for the tips, though!

@Petrakis Oh, interesting! I’ll give this a try. Thanks!

@marrrk Wow, I would have never guessed it was an issue with snapd. I’ll be looking into it too, I’ll let you know if I figure anything out.

Ok for the snapd case I think it’s the apparmor(snapd dependent package) causing cups not working properly,

[ 26.259166] audit: type=1400 audit(1638854668.916:29): apparmor=“DENIED” operation=“capable” profile="/usr/sbin/cupsd" pid=1787 comm=“cupsd” capability=12 capname=“net_admin”

I fixed the apparmor issue by adding

# devterm printer
/dev/pts/1 wr,

to /etc/apparmor.d/usr.sbin.cupsd within block

/usr/sbin/cupsd flags=(attach_disconnected) {}

Devterm should ship that apparmor rule as part of the printer package


nice tips ,marked ,thanks bro

1 Like

Amazing, thank you so much @marrrk!

Very happy I posted this topic, I appreciate all the assistance.


Ah! This got it to work, Thank you : >!

Hi marrrk, I tried to update the file, but I dont have the permission (readonly). how to do that?

Use sudo in order to open it!

I fixed it with chmod 777

1 Like

I noticed a comment at bottom of that section in /etc/apparmor.d/usr.sbin.cupsd:

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.sbin.cupsd>

So I think the DevTerm specific fix could go there instead. (Funny enough, the README file they mention doesn’t exist!) I’m not sure how these files get updated, but I’m guessing some kind of package update might wipe out the file you suggested at some point, while this user file might be left alone. Just a guess though. I’m not sure how all this stuff is supposed to work. (The “local” file existed, but was empty on my DevTerm.)

1 Like

If you installed the armbian wiringpi package you’ll get this error.

Try removing it and installing just the CPI version either from apt or source