Why is there no open source firmware for laser or inkjet printers?
James Newton wrote 05/08/2019 at 22:25 • 0 pointsUnlike routers, e.g. OpenWRT, there doesn't seem to be any effort to replace closed source printer firmware with open source code. And as recent articles have shown, there are serious vulnerabilities in some closed source printer firmware. e.g. the whole "fax attack" on multifunction machines (which doesn't even require a connection to the net to exploit).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I would like to replace the hp firmware with grbl 1.1, instead of cartridges, put a z axis recovered from a dvd drive, plus a Plotter Holder knife
Are you sure? yes | no
I know this is an old post, but I was wondering if it would be possible to make an HP printer (CP5225) print CMY colors, then retract the paper and print the K color on top before exiting the printer? The Uninet iColor 550 and 800 do this (for heat transfers) and wanted to know if it would be possible at all - if there was someone with that kind of expertise out there?
Are you sure? yes | no
I'm currently working on a simple piezo inkjet printer. https://hackaday.io/project/167446-diy-inkjet-printer
With much lower resolution and slower than a desktop inkjet printer but built from scratch and open source.
Are you sure? yes | no
There is is open source software for laser and inkjet printers. For a laser printer you can find inspiration from LDGraphy (https://github.com/hzeller/ldgraphy) . For inkjet there is inkshield (https://reprap.org/wiki/Inkshield) and Oasis 3DP (https://hackaday.io/project/86954-oasis-3dp) . Now you could argue that this isn't exactly a paper printer; still it is close. There is even a. open-source piezo inkjet head (https://reprap.org/wiki/Reprappable-inkjet) . Although its state is pretty dire.
What also might be of interest is Inkless (https://youtu.be/bRVU0z7n6DM ) . It was a startup which tried to burn into a paper instead of using toner ( it failed due to lack of engineering skills in my opinion).
Are you sure? yes | no
Great discussion. I would like to add a related quesion. An Epson Ecotank printer looks like an ideal device to experiment with printing of non-ink materials on non-paper targets. But, then I would like to specify exactly where each and every drop of ink must land on the target (e.g. a glas slide). No hassle with color spaces and smart software that dithers my "images". Is it possible to modify the printer firmware to make this possible? Nowadays, you need to buy an expensive industrial printer for this purpose (tenthousands of USD). A modified cheap Ecotank printer would be a great alrenative.
Are you sure? yes | no
I was trying to hack the epson firmware of cheap desktop printers to use it´s hardware as a generic 2D platform for any application. I was able to disassemble the initialization part of it but this is very complex. The idea was to identify the address of the ports for dealing with the electric motors but I did not reach that part. Anyway I could identify the processor, linux system version and other stuff. It is too hard work to reverse engineer these firmware packages because they are huge and complex. Bying a SBC and integrating it into the existing hardware is much easier.
Are you sure? yes | no
“'Free software' is a matter of liberty, not price. To understand the concept, you should think of 'free' as in 'free speech,' not as in 'free beer'.”-Richard M. Stallman
Are you sure? yes | no
I could go into why... but not without throwing some people, I care about under the bus... main thing it boils down too is the training for new equipment and the revenue companies pay to manufactures
Are you sure? yes | no
...
Are you sure? yes | no
I used to work at a company making printer software. Basically, a company (Canon, for instance) would come out with a new printer hardware, we would tune our code to run on their platform, they would then put the software into their machine. Any printer that isn't from HP or Apple has some of my code in it.
The software that goes into printers is hundreds of thousands of lines of code.
Basically, the printer is underspec'd for rendering, doesn't have enough memory to render a full page, so the software breaks the page up into slices and renders the next slice while the current slice is printing. That takes a lot of effort to get right.
For example, a laser printer cannot stop in the middle of printing a page, so not only does the slice have to fit in memory it has to be finished rendered at the time the drum reaches that part of the page.
Then there is verification: the three basic languages are postscript and PCL/GL, and the number of corner cases in those description languages is massive. My company purchased a debug set of reference tests and rendered output for these three languages... and it was massive. We're talking huge amounts of shelf space just to store these books of output, and there were new ones every time the language spec changed. (Postscript and the other languages have versions, and bug fixes.)
The printer hardware is straightforward: the hardware description is usually a known processor type (for which you can get a compiler), and an I/O map that shows which GPIO lights up which LED, how to send data to the laser and so on. That part was pretty straightforward.
To give you an idea of the complexity, IBM came and had us port our existing software to their new machine - software which had been ported to several dozen other hardware systems and was pretty robust - and the initial build released by the software team was found to have 900 bugs.
IMO, Only a company with a dedicated software and QA team and good management will be able to make printer software.
Are you sure? yes | no
Peter, those are great points, about the complexity and timing issues with the printer engine. However, there are printer drivers which do nothing but send a bitmap to the printer from a driver that does all the rendering on the PC where there is plenty of time and memory. So all the firmware on the printer has to do is ask for the bitmap as buffer space comes available, and squirt that into the engine in time with the mirrors. WinPrinter.
BTW: I dream in PCL5. Worked with it for years and years.
<esc>&f1022yXAny text placed here will be centered<esc>&f1X<esc>(s1p10v0s0b4148T<esc>*p479x540Y|<esc>*vo1T<esc>&a180P<esc>(s3V<esc>&f1022Y<esc>&f2X<esc>*v1oT<esc>&a0P<esc>(s6V<esc>&f1022Y<esc>&f2X<esc>&l2H
Are you sure? yes | no
Older printers are perhaps possible... but there's not much point. The logic board for a Canon BJ-100 (c. 1994) is a pair of gate arrays and a Toshiba microcontroller. Two stepper motors are driven by an L298N and a transistor array. It may not be an inclined plane or a lever, but it sure is a simple machine!
But, then, this is an early-to-mid-1990s black and white pile of junk. It has a parallel port (as in, before USB) FFS. My mother had one in lawschool and I still remember how it treated highlighting in Word 95 when we tried it -- only once -- it printed a checkerboard pattern over the word, rendering said word illegible.
Probably the easiest thing to build, if you really wanted a DIY printer somethingorother, would be a modern recreation of a machine I've heard about that I'm told existed in the Soviet Bloc during that era... it was a one-pin dot-matrix printer that used carbon paper for the 'ink' -- a modern felt tip pen on a solenoid (or a pointy-tipped solenoid and carbonless paper...) would work just as well. You could probably control it with an Arduino Uno/Nano if you had external memory in there somewhere -- you'd need something for a document cache since you're not going to fit an entire page of text (let alone images) in an ATMega328's 2k of RAM, and you'd do well to just have it take in ASCII text over RS-232 with the RX/TX lines and a MAX232 (otherwise you'd need to code up a Postscript interpreter of some variety, since that's what most printers speak these days -- and since Postscript, last I heard, was a proprietarily-licenced Adobe thing... well... you have fun with that) and use a character ROM for the font proper. You could of course at that point have "swappable" (by way of a select-switch bank) ROMs for different character sets, just like many older dot matrix printers did...
Are you sure? yes | no
>code up a Postscript interpreter of some variety,
Ghostscript is under Affero GPL.
>since that's what most printers speak these days -- and since Postscript, last I heard, was a proprietarily-licenced Adobe thing
The specs for the language are published and anybody can implement them.
There are other printer languages like HP's PCL, possibly more widespread than Postscript.
These facts can be readily looked up.
Are you sure? yes | no
Ghostscript is not exactly Postscript. It is close -- but my understanding is, there are differences. Also I did not want to spend an hour on Wiki at that time.
Are you sure? yes | no
Ghostscrpt (and many other OSS Postscript interpreters) are good enough that they are used in printing applications. If you have printed any PS file on Linux to a non-PS printer you can be sure that some FOSS was involved in the conversion. If you have viewed any PDF (descended from PS) file without Adobe software, then you can also be sure that some other rendering engine was involved.
Are you sure? yes | no
That's fair.
Are you sure? yes | no
Inkjet printers are built with custom chips that there is not public source for documentation. Also, the algorithms for printing and taking care of the print cartridges are very proprietary. There is also, a hell of a lot of firmware in an inkjet printer. I don't know about the Laser printers, but assume the problems are similar.
Are you sure? yes | no
Hell of a lot of firmware is just a start. Controlling a printer is more like running super specialized cnc machine. It can be done, but each model has it's own construction quirks, so you can't generalize firmware. Each printer model would require it's own tuning parameters, pinout and speeds configuration.
As fr proprietary algorithms for printing, see https://hackaday.com/2018/11/12/sprite_tms-magic-paintbrush/
Are you sure? yes | no