Thermal Printer does not connect ...?

Hi guys,

I just got my A04 yesterday, and it’s a wonderful piece of device. Then, I have mounted everything, updated the system and keyboard firmware according to email from Alex. I’ve even figured out to install obsidian. Everything went smoothly until the printer.

I have tried to print a test page. Then, the status of the printing job turned to ‘Held’. And I tried to release it again. It gives a notice about ‘the devterm printer may not be connected’. I have tried to reinstall the printer driver and cup driver. But, they are fine. I have tried to remount the printer unit. It gave me the same error message. Actually, this is exactly the same message that displayed while there isn’t any printer unit mounted.

Just wondering whether this could be a hardware problem maybe? the problem with the interface or the printer unit itself? or it just could be a driver issue? any thought?

Thanx

does the usb’s on that side of the assembly work? if they don’t then I would suspect the board or the connection between the CPU main board and the extension board.

Well, it works fine. As the extension board has the type-c port, and I use it to charge. I can confirm both USB-A and C work just fine on the extension board. I haven’t tested the HDMI and audio interface though. So, is it possible for a broken interface for the printer? you know, the clip thing on the extension board. or the hard wire that connects to the printer unit. I just don’t have the work around to test it.

here is another thought, battery connector seems not flat ,tight enough

and here is a simple debug way
open terminal

sudo systemctl stop devterm-printer
sudo /usr/local/bin/devterm_thermal_printer.elf 

then open another terminal

try like

echo -en "Hello Devterm\n\n\n\n\n\n\n\n\n\n\n\n\n" > /tmp/DEVTERM_PRINTER_IN 

and then back to the terminal which runs devterm_thermal_printer.elf to see if any log outputed

errrrr. well. Now, I am confused.

  1. I’ve fixed the battery connector issue. It is flat and tight now.
  2. Based on the debug method that you’ve provided. I haven’t received any log output. but, after ‘echo’ something, I have the test message printed, which means the printer is fine, right? However, it still cannot print in a normal way from a software or a test page from printer properties dialog.

So, back to the driver problem?

By the way, the printing happens only when debug.

well ,right now we can sure the hardware part is ok

for debug way ,it’s just run the printer program manually

normally the printer program will run on boot ,you can check it by

ps aux | grep printer 

to see if the devterm_thermal_printer.elf is running

if not running ,then something must be broken ,like the printer systemctl service won’t up

ok, new development.

First of all, I’ve read through the other post regarding the printing service. Well, it has mentioned something about the snap might suspend the printing service. So, I remove the snapd, which I don’t use in anyway.

And, now, the printer works whenever I do ‘echo’ from terminal.

I’ve checked the status of the printer program. It is there, running. So, I went back to print the test page, and it was still ‘Held’. Then, I discovered the message from the printing job attributes, which says: ‘unable to open serial port: permission denied’.

I know it is basic things. But I don’t have much experience on Linux. So, the devterm_thermal_printer.elf is running on root (says from the terminal output), and I assume that if I run any printing from GUI should be from current user, which is cpi? and then, do I need to obtain root access for this? or I can switch to root account to do everything?

Again, I know this might be a very fundamental thing in Linux. However, I’ve read through several things online and trying to figure out the user permission things on Linux. And, I’m pretty sure that I am still on the phase of trying to figure out the differences between su root and su - root. Haha. then, any help? Thanx.

ok
then
the serial port of printer is created by socat
so use

ps aux | grep socat 

to see if socat is running

and here is a screenshot of my printer’s property in settings-> printers

if your printer’s property is not as same as mine
then I suggest to re-install printer related package by

sudo apt update
sudo apt remove devterm-thermal-printer-cups  devterm-thermal-printer -y
sudo apt install -y devterm-thermal-printer-cups  devterm-thermal-printer 
sudo reboot
1 Like

Many Thanx.

Well, as for the result, my printer came back eventually.

  1. socat is running, that is confirmed.
  2. My printer’s property setting is exactly the same as yours, and it didn’t work. So, I tried to re-install the printer package anyway.
  3. Then, I couldn’t connect the GitHub services. I discovered this after I had removed the printer. It leaves me no choice to reflash the card, which reminds me that I couldn’t update system core and keyboard firmware via terminal as the GitHub is inaccessible here. (I can login to the GitHub website via browser. But barely, it has to be refreshed multiple times. And I did the keyboard firmware updating via manually download and a thumb drive. )
  4. After I’ve re-flash the card, magically, everything turned out to be normal. The printer goes well, and I have printed lots of things now.

Seriously, I don’t know what happened. But I’m glad it ‘solved’ finally.

Here is my difficulty:
Using GitHub is extremely painful in my place. I cannot access the game warehouse from my GameShell as well. It is a network issue, which is causing me trouble with nearly everything that I meant to use, such as GitHub, any google services, latex updating, Pinterest, steam, etc. I understand that a ‘ladder’ could fix it. But it’s not an option here as it will affect everything related to my work. Anyway, I may need to figure out some compromise in the future.

Many thanx again.

2 Likes

Now my printer quit working too … is this contagious? doing the uninstall / re-install process now… re-install process did not work as well - I may shut down devTerm remove the batteries and check cables - I do not want to reflash - I have dozens of applications loaded and hours spent installing things… if the printer quit working I’ll wait to this gets figured out…
okay printer diagnostics indicates this is a serial port permission that is denied. .
.

I have the exact issue on my A04 and it’s been driving me a little nuts. Have reseated my cable, checked forums etc multiple times to no avail too. Hopefully there’s a fix or something at some point.

1 Like
sudo chmod 777 /tmp/DEVTERM_PRINTER_IN
sudo chmod 777 /tmp/DEVTERM_PRINTER_OUT

i understand the command sets the read/write access privileges for these ports
was worth a try but no success. (do I need to reboot?)

nope - printer still not “connected”

let me make sure again
does this work?

So reflashing the OS fixed the printer problem?

this works!!! guu! thanks for that test command!

okay I can cat [filename] >/tmp/DEVTERM_PRINTER_IN and the file list out in small font…on the thermal printer!! so I’m guessing now it is an issue with Mousepad using the printer… will check notepadQQ…
NotepadQQ has the error - so I can print through the command line but not from programs - could this be a program permissions issue?
My problem started when I attempted to print straight from Mozzilla Thunderbird and it seems to have locked up…

good that means printer is ok

and another test

how about print something from chrome(chromium) ? can you see the devterm-printer in browser printing preview page ?

actually I’ve never tested printer on notepadQQ… sorry for that

print from chrome does the same thing as Mousepad - print job ends up in Hold on the print job status any attempts to run the print job produce the same error.

then I guess it must be the CUPS problem

try

sudo /etc/init.d/cups stop    
sudo chmod 755 /usr/lib/cups/filter/rastertocpi
sudo chown root:root /usr/lib/cups/filter/rastertocpi
sudo /etc/init.d/cups start

and use chrome to visit

http://127.0.0.1:631

that is web control panel of CUPS

go to Printers to see if there is any jobs,cancel them all