Live data from Hacker News

Getting my daily news from a dot matrix printer

aschmelyun.com

131–140 of 259 posts

Re: Getting my daily news from a dot matrix printer

#132
post #103

Earlier quoted context omitted.

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

I know about CUPS. There is no real alternative on Linux, is there? But it doesn't work like on macOS. I am sure they added some of magic on top. On macOS I think it either recognized my printer or I had to select it from a list. I don't remember which for sure. It was a few years ago. On Linux my Brother printer is not on the list. Brother offers a deb and rpm packages which may be obsolete for all I know. Then you…

> I know about CUPS. There is no real alternative on Linux, is there?

I don't know what lifting "real" is doing here, but lpd(8)[0] (line printer daemon) is what we used to use, and printcap(5)[1] to configure. It was general enough that you could make a music playlist system out of it[2].

[0] https://man.netbsd.org/lpd.8

[1] https://man.netbsd.org/printcap.5

[2] https://patrick.wagstrom.net/weblog/2003/05/23/lpdforfunandm...

Re: Getting my daily news from a dot matrix printer

#133

til you can still easily buy continuously feedable paper for dot matrix printers on amazon - was wondering if that was a scarce resource for a project like this! kudos!

I've seen dot matrix still used at car dealerships so doesn't totally surprise me there'd still be plenty of industry uses

Re: Getting my daily news from a dot matrix printer

#135

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 wonder if this works with a sharp M205 I have in storage.

Re: Getting my daily news from a dot matrix printer

#136
A long time ago we used to output certain key server logs summarised to a dot matrix printer. It was a neat place to see the history at a glance, but the idea was also that it was an unhackable audit. Probably done more efficiently with WORM drives nowdays, but without that immediate tactile presence.

Re: Getting my daily news from a dot matrix printer

#137

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…

> One of the things that this person does is simply echo to /dev/lp0.

> So, if I plug a USB printer into a computer, and ls > /dev/usbXXX, will it print today? Does that still "just work"?

Both of the following worked for me:

  printf 'hello\f' > /dev/usb/lp0
  printf 'hello\f' | nc -N $printer_ip 9100
This is on a Brother laser printer. Its programming guide is linked next to its manual online. The language is PCL, but you don't really need to know much about it to get simple stuff printed.

Neither of the above involve CUPS. Using the `lp`/`lpr` executable like in other comments requires the printer to be registered with CUPS first.

For `ls >`, the printer expects DOS line endings. `\n` just moves to a new line without "returning the carriage", so you need to pipe through `sed 's/$/\r/'` or use `nc -C`.

With the USB connection, you can print multiple times to build a single page and it won't come out until you provide the form feed. With the TCP connection, the page will be printed when the connection is closed.

Re: Getting my daily news from a dot matrix printer

#138

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…

In my experience, inkjet printers can print line by line like teletypes, but laser printers can't.

Re: Getting my daily news from a dot matrix printer

#140

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…

Whatever vendor(s) decided that the restaurant industry needed to switch over to thermal printers, I hope Cory Doctorow has a chat with them.

"Let's just tape this thermal receipt to your to-go container, and ... refund? What do you mean refund?"

Post reply on HN