shared printers

Post Reply
dpannell47
Posts: 1
Joined: Thu Apr 26, 2018 4:01 am
languages_spoken: english
ODROIDs: xu4 (8)
Has thanked: 0
Been thanked: 0
Contact:

shared printers

Post by dpannell47 »

Has anyone had any luck getting drivers for printers for the odroids? I have 8 deployed in a production environment and need to hook a printer up to one and have it shared with the rest of the odroids? This might be more of a linux question than an odroid question, but has anyone done something like this?

User avatar
rooted
Posts: 8727
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 376 times
Contact:

Re: shared printers

Post by rooted »


User avatar
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: shared printers

Post by mad_ady »

Yes, cups should support most printers out of yhe box. Though be warned - there's an old linux saying: In linux it takes 5 minutes to setup a web server, but a printer takes weeks! :D

User avatar
rooted
Posts: 8727
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 376 times
Contact:

Re: shared printers

Post by rooted »

Printing used to be a nightmare in Linux but usually it is plug and pray affair nowadays.

But I have had to keep a dual boot Windows setup more than once for printing, it was bad.

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: shared printers

Post by mctom »

That's one of the reasons why I wrote my printer drivers in Python - no portability problems. :)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: shared printers

Post by mad_ady »

Could you share your printer driver work? Do you talk PCL to the printer? Using libusb directly? I'm curious... And also cups is sometimes troublesome too...

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: shared printers

Post by mctom »

Sure.
I've got a kink for thermal printers. Those usually talk through serial port and obviously have no Linux drivers available.

So basically what needs to be done is to prepare a ppd file, which contains a printer information, like color modes, paper sizes etc.
Secondly, a filter code, that converts raster data to whatever the printer understands. I call it "rastertoextech", for my Extech printer. This is the part I did in Python.
I have found some guy a few years ago who wrote a Python driver for a ticket printer. I asked him for a permission to modify his code and redistribute it as open source, and obviously he said yes, but I never got around to publishing it. I guess nobody would ever be interested in Linux driver for vintage Polish thermal printer. :D
Anyway, my work was to modify the program so it sens data in a way described in programming manual of the printer.

Oh, and another filter, "texttoextech", I have developed so CUPS can handle pure text mode as well - prett handy when you want to print something straight from the console. "texttoextech" is a bash one-liner that transcodes UTF-8 to Latin-2, folds text into 80-char lines, expands tabs into 8 spaces, convert LF into CRLF and so on.

ppd file houses the information that this printer should use "rastertoextech" and "texttoextech" filters for its tasks.

"serial" filter that actually sends data to serial port needed no changes, fortunately, but it IS a bit clunky.
Attachments
extech_driver.tar.gz
(4.01 KiB) Downloaded 15 times
These users thanked the author mctom for the post:
mad_ady (Fri Jun 11, 2021 7:43 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

L67GS
Posts: 578
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 159 times
Been thanked: 83 times
Contact:

Re: shared printers

Post by L67GS »

Apt has worked for every printer driver I've needed for a decade or more.

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: shared printers

Post by mctom »

What can I say, good for you. :D
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

wcairns
Posts: 12
Joined: Wed Feb 18, 2015 2:59 pm
languages_spoken: english
ODROIDs: C-1
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: shared printers

Post by wcairns »

I have been fortunate enough, I have had an HP and a Canon both with WiFi support, connect them to my Wi-Fi network and all of my Linux machines are able to print to them using CUPS, easier setup than in Windows. For both printers, went to add a printer and CUPS found them on the network right away, the HP I had to select the driver, the Canon was recognized without have to select the driver, iirc. Both are multi function and scanning over the network works as well.

Sent from my LM-V405 using Tapatalk


L67GS
Posts: 578
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 159 times
Been thanked: 83 times
Contact:

Re: shared printers

Post by L67GS »

mctom wrote:
Fri Jun 11, 2021 1:06 am
What can I say, good for you. :D
Meaning, find out which driver covers the printer and try apt. It will probably come right to life

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: shared printers

Post by mctom »

Trust me, I wouldn't develop my own driver if it was available anywhere. But thanks anyway!
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: shared printers

Post by mad_ady »

You know, your driver/work should live on github, not as an attachment here. More people might stumble over it and adapt it to their needs/printers :)

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: shared printers

Post by mctom »

I did consider this, but like I said I doubt there is anyone else on this planet who would be interested in Linux driver for Mefa. ;) Extech, on the other hand, the printer that I own now, is a different pair of shoes and might get some attention.
But alas, to publish a driver on github I'd have to prepare an installer or something, so less tech savvy people could benefit from it.
On the other hand, if I wanted to post a sample workflow to create your own driver, I'd have to put some work to create an actual template that is easy to understand and to work with. More comments in Python code, acknowledgement of the original author, detailed instruction wtf is going on in ppd file and so on.

What I'm trying to say is that this is definitely not something that should be tossed on github in hope that someone actually finds it and makes good use of it. But thanks for encouragement, I think I might spend one evening preparing a neat template for the others, and post my Mefa and Extech drivers as fully working examples. Would be also nice to accept pull requests with works of other people, if anyone actually would be happy with their driver.

EDIT: Actually, anyone needs a thermal printer? I think I've got a spare one. :D
https://allegrolokalnie.pl/oferta/polsk ... ding-offer
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests