Devterm printer kernelspace driver

I’m trying to get this up and running.
Installed the 3 aur packages. Using /etc/modules-load.d to load mtp02.
dmesg | grep mtp02 returns a single line informing that the module is loaded.
A device shows up at /dev/mtp02.0
Problems:

  • The printer doesn’t show up in cups printer list.
  • sudo mtp02_grayprint.py RIM.png results in OSError: [Errno 25] Inappropriate ioctl for device
  • sudo mtp02_bw..... - nothing happens

Edit: found your note in cupsinstall, installed the printer device (had to use /dev/mtp02.0, not /dev/mtp02.0_cups)

Did you modified FDTOVERLAY in:
/boot/extlinux/extlinux.conf

FDTOVERLAYS /overlays/mtp02-a06-devterm.dtbo

For cups you need to manually install:

Port:
AppSocket/HP JetDirect
parallel:///dev/mtp02.0_cups

1 Like

Thanks!

  • /boot/armbianEnv.txt does not exist.
  • mtp02-a06-devterm.dbto is installed to /boot/overlays by the aur packages
  • I added the line FDTOVERLAYS /overlays/mtp02-a06-devterm.dtbo to extlinux.conf – should I do /boot/overlays/mtp02.... instead?

Edit:
-rw-r--r-- 1 root root 30720 May 8 23:33 mtp02.0 why is it a regular file :scream:

EditEdit:
This works:
FDTOVERLAYS /boot/overlays/mtp02-a06-devterm.dtbo

reqular file was created by invoking bwprint

For me works

 FDTOVERLAYS /overlays/mtp02-a06-devterm.dtbo

inside /boot/extlinux/extlinux.conf

Thanks for your realtime help!!

Where’s your actual dtbo file located?
Mine is installed into /boot/overlays.

dtbo is installed to /boot/overlays
but u-boot sees as / partition which is mounted in linux as /boot

ooh I see. For me there’s only one giant partition /.

Can the python script do text printing?

not by itself, but you can be interested with GitHub - korneliuszo/png2escp - repo, script fontrenderer.py

1 Like

Cool, I’ll play with it :stuck_out_tongue:

I wasn’t able to print images as clean as yours, but that’s probably due to the bad paper roll quality I got from supermarket for free ((

I know this thread is a bit old, but it is still the latest.

I’ve been trying to get the printer running on manjaro, but ran into errors when trying to compile.
here is the log file in case you’re still active on here.

https://pastebin.com/raw/QCUQb87C

You could have just comment out this line, but you would need to allow
non-root user access from userspace. (and comment out unused function as
it is declared as static)

Change in kernel has no impact on driver, only includes additional
safeguards - read-only attribute(const)(!! only in compile time !!) of
passed struct via reference (in C called pointer).

Check out Fix for build on post 6.2 by korneliuszo · Pull Request #7 · korneliuszo/devterm-printer · GitHub
it should have correct patch.

to use it change in

branch to issue-1

thanks for your help!
I think I’m making progress. the cups driver works already. only writing directly into the other device leaves the lines empty. I suspect i’m missing the right font. will have to check when I find time.

edit: I’ll also have to figure out how to make it use dynamic paper size instead of always feeding the whole specified paper size.

Try:
cat /dev/urandom > /dev/mtp02.0

Should print noise with default printer settings using this kernel
interface.