logoalt Hacker News

Claude Code Teaching macOS to Natively Print to the HP Laser 1008a

121 pointsby amrrsyesterday at 9:14 PM76 commentsview on HN

Comments

ryandrakeyesterday at 9:45 PM

I was able to (through heavy Claude use) successfully reverse engineer a golf cart motor controller that is programmable over USB, but only was supported by a Windows application. Claude walked me through using ILSpy on the .NET assembly, using Wireshark to capture the protocol over USB, and to completely map out all of the functionality in the Windows application. The output was a portable C library and CLI program which, so far, has worked well.

I consider myself kind of an AI detractor but even I'll admit that the tool allowed me to do something it would have taken weeks-to-months to learn to do the hard way.

show 2 replies
Tiberiumyesterday at 9:42 PM

Unfortunately this is a very misleading article and headline. I don't doubt the end result - it's useful that it works, but it's not "natively" and, unlike what some people assume, Claude didn't write a driver. It basically used HP's existing proprietary driver in a Linux VM on macOS, and just bridged that to macOS.

It also requires a root launcher that runs code from the user ~/.hp1008 dir, so security is weakened.

oneplaneyesterday at 10:36 PM

Wouldn't it have made more sense for Claude to suggest using the existing Linux-Airprint-VM project/product that already does this exact thing?

There's even a zero-install method via https://printervention.app where it runs that Linux VM isolated inside a WebUSB-capable browser. That website itself was posted right here on HN not too long ago.

I get that the LLM code assistant software prefers writing stuff, but constantly re-writing the same solution seems a bit inefficient.

show 1 reply
feintruledyesterday at 9:43 PM

So the critique from the other story holds true - it really is just running the Linux driver inside docker, and (perhaps) dressing it up as something more - though I note the claim on this page is walked back from the original 'writing the driver'. On the other hand, it really did get him printing from his Mac, so in this new LLM results based world we live in it did its job admirably.

embedding-shapeyesterday at 9:46 PM

Somehow, I'm not exactly sure why, I got creeped out by Claude's finishing line:

> Thanks for being such a game debugging partner through all the test pages. Enjoy printing, you and the family.

Maybe it's because my own LLM usage is very "Question > Answer" or "Do this > Agent does that" and I never say "Wow, that's crazy it works, thank you!" at the end or such, so I don't see that sort of things, but if I saw that regularly I'd turn me off so badly from using LLMs. I'm not exactly sure where this feeling is coming from though, it's relatively innocent but just feels so inauthentic, I'm guessing because it's simply a machine.

show 1 reply
LeoPantherayesterday at 9:32 PM

Claude Code is extremely "honest", and uses that word 10 times in that short transcript.

inguzyesterday at 11:09 PM

Reminded me of when I had a Teletype ASR33 on AirPrint (https://github.com/hughpyle/ASR33/tree/master/cups). With LLMs that would have taken a half hour. It would have maybe been less fun? but there's a lot of time faffing around on PPD that I'll never get back.

leftouterjoinstoday at 1:50 AM

Nice! About a year ago I used Claude to make a macOS driver for an ancient laser engraver that only ever worked with Windows.

https://github.com/leftouterjoins/EpilogDriver

saejoxyesterday at 9:31 PM

my Brother dcp-t230 also doesn't have macos drivers and it's a usb only printer. if i ever get some tokens to burn, i would try the same.

show 5 replies
mjmvisseryesterday at 10:36 PM

Had a similar experience. I bought an ePaper display and a Pi 4 to run a calendar widget on. I got stuck because the open source project I was building off expected the previous generation of ePaper display, and the firmware had changed completely. I found the new firmware examples, but got stuck trying to get it to work. With Claude assisting we banged it out in two sessions of about 3 hours each.

codeberg.org/mjmvisser/infoframe if anyone’s interested.

IronWolveyesterday at 9:39 PM

Claude is great at that. I have a usb keypad with no linux version of the app to program it. Since its just a vial/qmk based, claude built me a linux version in qt/python.

sgjohnsonyesterday at 10:30 PM

This is awesome. I take it your plans for the next weekend include actually cleanrooming the driver so you can skip running it in a linux container? =P

show 1 reply
etothetyesterday at 11:43 PM

Very cool. I want to do something similar to ressurect old Orb disks from over 25 years ago.

TacticalCoderyesterday at 10:05 PM

If this could all finally solve, once and for all, printing and scanning issues it'd be lovely (btw there are entire businesses who's only raison d'etre is "installing printers at clients and fixing them when they stop printing").

But of course it's hard not to both marvel and lament (at) the fact that in the mid-1990s (so yup 30 years ago) I could:

    nc 192.168.1.150 9100 < tiger.ps
And the native PostScript printer (also an HP laser btw: a LaserJet) would just start printing.

I know, I know, about garbled print jobs, pages of codes being printed, etc.

But still: it's hard to not at least wonder if some things haven't been lost. For a start printers with their own IP addresses were sweet (instead of a USB cable and, now, people setting up, say, a Pi just to expose a LAN IP for/to their printer). Then of course another talk could be had about the "quality" of modern day HP laser printers compared to what you'd get int the nineties.

show 3 replies
bethekidyouwantyesterday at 11:07 PM

Doesn’t every printer work with CUPS?

bredrenyesterday at 10:42 PM

Notably done on Opus 4.8.

ChrisArchitectyesterday at 9:42 PM

[dupe] Discussion, including activity from the dev https://news.ycombinator.com/item?id=49344643

tracespectyesterday at 10:19 PM

güzel bir çalışma olmuş

iluvcommunismyesterday at 9:35 PM

[dead]

theturtleyesterday at 11:13 PM

[dead]