Thermal printer will not work at Armbian 22.05 Jammy XFCE

Hello all,
I installed Armbian 22.05 Jammy XFCE from the armbian site.
Then the thermal printer will not work.

I installed the following from github of clockworkpi.
・ Devterm_thermal_printer.elf
・ Devterm_wiringpi_cpi

sudo apt install devterm-thermal-printer-cups
sudo apt install devterm-thermal-printer
Also ran.

“devterm-socat.service” seems to be working fine.
But “devterm-printer.service” doesn’t work.
systemctl status is failed.

The execution result of
sudo /usr/local/bin/devterm_thermal_printer.elf
is

Unable to open SPI device: No such file or directory

I’m not sure about the SPI settings.
Please tell me how to set it.

thermal printer requires SPI function from kernel

we don’t know if the Armbian 22.05 has the SPI enabled kernel patched on

so I think that is why

Unable to open SPI device: No such file or directory

check /dev/ to see if there is any node called

/dev/spidev.X

for the reference

I recently got the official printer stuff working with: enable spidev · yatli/arch-linux-arm-clockworkpi-a06@f2c02ce · GitHub

1 Like

Thank you for answering.
There was no SPI under / dev.

OK , I try patch the source. I’ll give it a try.

I’m not familiar with this specific version of Armbian because I’m using the R-01. But I’ve used older Armbians on a number of other SBCs. Did you enable SPI with armbian-config? Usually you have to turn on any hardware features you want to use. Otherwise everything is configured as generic GPIO pins.

I enabled spi-spidev and rebooted and don’t see any /dev/spidev devices. dmesg sows “GICv3 256 SPIs implemented” but haven’t tried installing any other other stuff like the wiringpi_cpi stuff so that may be the reason.

I’m not sure of the context of this statement but I will mention the things that I would look at and check. I can only think of a few things that would prevent the /dev/spiev* devices from showing up:

  1. The device tree doesn’t have the SPI devices enabled/listed. That should not be the case from your statement.
  2. The kernel modules aren’t loading. Besides the hardware specific driver, which sounds like it loaded, you need the “spidev” module.
  3. The module isn’t completely configured. You might need some additional arguments somewhere. Check the OS documentation. On my OrangePi running Armbian I need these two lines in the /boot/armbianEnv.txt:
    param_spidev_spi_bus=1
    param_spidev_spi_cs=1
    
    The needed values may be different for you.
  4. Broken udev rules or rules renaming it.
  5. Some other use conflicting with the SPI device, like GPIO.

Thank you @ChipMaster I will check, I am still coming up to speed on this stuff and suspect it may be kernel or other related but I was trying the first (easy) fx you suggested. I will report back with anything new.

Thanks

So I think it was trying 2 different spi overlays, I made sure it only listed spidev and then had

param_spidev_spi_bus=0
param_spidev_spi_cs=0

in the armbianEnv.txt and now I have /dev/spidev.0

I didn’t have any thermal paper so I’ll get some today and report back in the printer works.

okay so I noticed on the CPI image, the device was spidev2.0 not spidev0.0 so I changed the armbianEnv file to reflect that.

The printer software starts at boot now but I think there’s a size/scaling issue because while the printer works in the CPI image, it just very slowly feeds the paper with no printing on it on the Armbian image.

I did notice that changing the post-print feed to 15mm in CUPs and printing a test page resulting in the weird slow feed/no print issue but at the end, it smoothly fed 15mm of blank paper, so some pieces are working correctly.

I’ll keep hitting it with a stick but I’m not sure what I’m missing. I feel so close.

Maybe the devterm specific kernel overlays? I’m a bit out of my depth :slight_smile: