Live data from Hacker News

Getting my daily news from a dot matrix printer

aschmelyun.com

41–50 of 259 posts

Re: Getting my daily news from a dot matrix printer

#42
post #36

I did something similar with a receipt printer. a thermal usb receipt printer is like $75 dollars and easily controlled by python. Super easy to print out images and QR codes. and the autocut functionality makes it easy to segment messages. Additionally the receipt printer is nice because you can activate the bell inside as an additional "notification" and has an extra control for a cash drawer that I am thinking of…

Whats the printer you have? I’ve been thinking of getting one and did not know about the notification and external feature you mention.

I have a Rongta RP331.

The thing I wish it could do different is that when printing a single line, the autocutter hides it, so you have to line feed about 5 times until the line you printed is visible.

If i did it different, maybe i would try to find a printer that is able to do reverse line feed so I can "peek" at a single line and then not waste paper. but i think those are about 3-4 times more expensive.

Re: Getting my daily news from a dot matrix printer

#43

Cool project. I missed that sound. Hearing it again makes me realize how patient my folks were with my midnight debugging sessions… On the other hand, when the author wanted to push Unicode on this, I felt old and immediately pictured Epsons old wire bound manuals outlining supported characters (a subset of ASCII if I recall)

I miss the soundscape of old computers: - the POST beep - the sound a floppy drive makes after inserting - the infernal scream of a dot matrix printer - even I don't miss dial-up sounds though.

Just today at a shop I saw a self checkout terminal crash and reboot - featuring the old AMI boot screen and a nice POST beep. Made me wonder what ancient hardware might hide behind these modern cases and UIs.

Re: Getting my daily news from a dot matrix printer

#44

So, curiosity today. One of the things that this person does is simply echo to /dev/lp0. Which is all you did back in the day. Shove text down the interface, and the printer printed. Now, while we have very fancy modern printers, they're still printers with a long legacy. Even back in the day, early HP laser printers worked like this. Shove data down the wire, and it printed (Courier 10, 66 lines per page). Only the…

Well, that's easy to check out as long as you have a printer connected. It's going to depend on the printer. Doesn't work on my Brother laser printer on Linux, even if I send some valid Postscript to /dev/usb/lp0 . Piping it to lpr works of course, as long as you have a default printer selected.

Once you've established that you can print basic text, you can expect that the printer's escape codes will work.

Re: Getting my daily news from a dot matrix printer

#45
post #37

I did something similar with a receipt printer. a thermal usb receipt printer is like $75 dollars and easily controlled by python. Super easy to print out images and QR codes. and the autocut functionality makes it easy to segment messages. Additionally the receipt printer is nice because you can activate the bell inside as an additional "notification" and has an extra control for a cash drawer that I am thinking of…

Please share some of your code, I would like to see and get a feel for some personal ideas.

I am currently working on an "input" interface to scan resposnes that I write from my typewriter and am planning on releasing a github repo on it when im done. conveniently you can type directly on the receipt printer if the response is short.

Right now all my credentials are hardcoded so i can't push out what I have without some cleanup, but I can point you to some of the libraries: python-escpos and nfcpy were what I used for the bulk of it.

Re: Getting my daily news from a dot matrix printer

#47
post #31

So, curiosity today. One of the things that this person does is simply echo to /dev/lp0. Which is all you did back in the day. Shove text down the interface, and the printer printed. Now, while we have very fancy modern printers, they're still printers with a long legacy. Even back in the day, early HP laser printers worked like this. Shove data down the wire, and it printed (Courier 10, 66 lines per page). Only the…

I just tested this on OS X, which doesn't expose printers through /dev/ in the way you're describing as far as I can tell. But apparently lp exists on OS X, so you can do echo "Hello printer" | lp -d , and find the name through lpstat -p. And sure enough, this works! Just tested on my new printer.

With macOS there is this one off topic thing regarding printing that always gets me. I once had a company Macbook and it connected to my old Brother printer without problems and only then (after almost ten years of having the printer) I discovered it has double sided printing. It just worked. I always wondered if there is a way to connect somehow to this machinery to get a macOS printer driver or whatever and emulate whatever is needed for this to work on Linux.

Re: Getting my daily news from a dot matrix printer

#48
post #6

Matrix printers can actually do quite a lot... depending on the models, you can change fonts, use bold, underline, sometimes italic, double-width and double-height characters and even graphics (although often are relatively low resolutions like 90 or 180 DPI). One funny thing I did once for a escape-room-like game, was a box with only a parallel printer connector on it. When connected to the printer, it was parasite-…

My dad had a 4 color dot matrix printer in the 90s. Printing the pharaoh head from deluxe paint II took FOREVER but actually looked pretty. The paper was really warped after though. Still have it, but no idea where 4 color ribbons would be sourced.

Re: Getting my daily news from a dot matrix printer

#49
post #41

Until very recently, dot matrix printers were still common in doctors' offices in Germany (for reasons), and the sound they make always gives me huge wave of nostalgia, even bigger than hearing a fax/modem emitting its handshake sound.

I periodically run into them in places that still use multipart forms (e.g. manufacturing, shippping/logistics).

Re: Getting my daily news from a dot matrix printer

#50
post #47
post #31

Earlier quoted context omitted.

I just tested this on OS X, which doesn't expose printers through /dev/ in the way you're describing as far as I can tell. But apparently lp exists on OS X, so you can do echo "Hello printer" | lp -d , and find the name through lpstat -p. And sure enough, this works! Just tested on my new printer.

With macOS there is this one off topic thing regarding printing that always gets me. I once had a company Macbook and it connected to my old Brother printer without problems and only then (after almost ten years of having the printer) I discovered it has double sided printing. It just worked. I always wondered if there is a way to connect somehow to this machinery to get a macOS printer driver or whatever and emulate…

IIRC, Apple employed the maintainer[1] of CUPS - which is/was available on MacOS for network printing, and has been available on Linux for even longer. I would be surprised if the feature was not available on Linux for your printer.

Edit: added footnote

1. The chief maintainer - not the only maintainer, between 2007-2019

Post reply on HN