Remix.run Logo
Claude Code Teaching macOS to Natively Print to the HP Laser 1008a(cdn.kuber.studio)
115 points by amrrs 5 hours ago | 75 comments
ryandrake 4 hours ago | parent | next [-]

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.

squibonpig 3 hours ago | parent | next [-]

Had a similar experience getting a niche app running under wine. The bot had to bring in a different open source renderer, patch dlls, adapt a mapping tool from a different chip architecture to partly map and modify the binary, crazy stuff. Alternatives exist but are expensive, this got it working in an hour when doing it myself would probably be 2 weeks.

josephg 2 hours ago | parent [-]

Last week I had Claude add support for aac audio to davinci resolve on Linux, just by patching the binary. It did almost exclusively with gdb and objdump, patching about 5 functions over an hour or two.

I only got it to the proof of concept stage. The patch adds aac but breaks flac support in the process. And it only works for aac in mp4 container files. But I’m sure with a bit of time we could make a patch which works everywhere and is additive only.

I say ‘we’ - I barely helped. Almost all the work was done by Claude.

Here’s Claude’s report, if anyone wants to build on this work:

https://claude.ai/code/artifact/87d38c2e-9ecb-4066-90cf-e0b2...

sinpif 4 hours ago | parent | prev | next [-]

Had a similar thought today - maybe we could finally get Linux drivers for more HW...

nevi-me 4 hours ago | parent | next [-]

And with the Linux Kernel being friendly to both LLM usage and a modern language, for some of us who don't know C, a huge barrier is lifted from being able to write device drivers.

Not a successful anecdote, but I have a Windows Hello compatible Kengsington fingerprint reader, and for some time I wanted to write drivers for Linux. Even without using C, it would have been a huge undertaking only to fail in the end; because Claude did much of the research and concluded that the device wouldn't work on Linux (can't remember why but it made sense). Then it suggested what could work.

yakz 4 hours ago | parent [-]

Back in the day when dial-up modems were a "significant" market, the concept of "WinModems" came around. Minimum hardware, maximum software. If the sensor is good enough to actually work though, it probably won't be long before an agent can implement the driver, if it can't already.

ryandrake 4 hours ago | parent | prev [-]

I don't understand the technology enough to see why, but LLMs seem unusually skilled at reverse engineering proprietary software.

mmh0000 4 hours ago | parent | next [-]

LLMs are good at producing what they/the public know.

In this case:

  LLMs know the USB Spec very well.

  LLMs know how to read raw packet dumps.

  LLMs know how to convert a packet dump to USB spec

  LLMs know how to write code to generate USB packets from the spec.
LLMs are also VERY good at transliteration, i.e., converting known-good Python to Rust.

Basically, If you have a well-documented problem, the LLM is a shortcut to learning it yourself. LLMs fail when you have a novel or poorly documented problem. They also fail when you provide the LLM with terrible context or too much context.

CamperBob2 2 hours ago | parent [-]

Don't sell in-context learning short. Right now I'm waiting on Claude to wrap up the latest of a half-dozen extensive changes to XML files for a fairly-obscure (and obsolete) closed-source electronics CAD program. I am pretty sure it doesn't know anything about these files besides what's in the XML .DTD file (which I also gave it.)

This is a very novel, reasonably-poorly-documented problem, and so far it has batted 1.000.

danielheath 4 hours ago | parent | prev | next [-]

IMO it's because they don't get burnt out by a lack of results.

After 5-6 consecutive approaches fail, I need a reason to think the next one might work out to stay motivated.

Claude will keep burning credits trying new approaches until something sticks. That's a huge advantage in a field where most of the things you try don't go anywhere.

notfromhere 3 hours ago | parent | prev | next [-]

LLMs seem to be trained to work very well against a goal, especially one it can verify against. I guess because it can easily know if it passed or failed, va other tasks where good/bad output is subjective

jasonfarnon 2 hours ago | parent | prev | next [-]

It's LLMs' generalist skills. I think reverse engineering is usually hard when you're in an unfamiliar domain. Eg I've never programmed a videogame or windows application but I'm trying to crack one. On the other hand if you know the domain, and know what the programmers' intentions must be in any given block of code, it's often straightforward. There are no unfamiliar domains for LLMs, including it seems proprietary software.

fl0id 4 hours ago | parent | prev | next [-]

To some degree. But esp for drivers, you still need to know when they go wrong, and steer them right, or your code will either just not work or be an unmaintainable, not-upstreamable mess.

IshKebab 3 hours ago | parent | prev [-]

I don't think they're any more skilled at it than someone who knows how to reverse engineer stuff... But it is definitely a place where AI is amazing because reverse engineering is usually extremely time consuming and tedious. AI doesn't care about that.

It also has the benefit that it doesn't usually matter too much if it gets minor details wrong. It's definitely one of the areas - like hacking - where it's a) tedious and b) insensitive to mistakes where AI absolutely shines.

mjg59 2 hours ago | parent | next [-]

My experience is that they're better than me at a lot of the process, so probably worse than someone who's a full time reverse engineer but as good as or better than most. They'll definitely get some small details wrong that would derail the entire thing, so having some skills that are pretty much "This smells wrong" helps a lot, but I think for many scenarios they'll unblock someone who has little RE experience.

SchemaLoad 2 hours ago | parent | prev [-]

Also verifiable. LLMs shine when they can know when the task is completed correctly. Otherwise they will finish and hand over something that's wrong.

andrewmg 3 hours ago | parent | prev | next [-]

Ditto (except not being an AI detractor): I used Claude and Codex to reverse engineer the proprietary protocol for controlling Devialet amplifiers and then build an iOS controller app to replace the manufacturer's abandoned official app.

The whole thing took about a day, spread out over a week or so. Without AI, I wouldn't have even started the project, because I couldn't spare the time it would have taken.

teepo 2 hours ago | parent [-]

i looked those up, that's pricey gear. is that a similar app abandonment like with Sonos deprecating and moving to newer protocols?

andrewmg an hour ago | parent [-]

Sort of. The company released a new model and deprecated its older ones. It’s still possible to control the amps with the (really neat) physical remote.

eggnet 3 hours ago | parent | prev | next [-]

I wonder how hard it would be to create various firmware updaters for drives or other devices.

SchemaLoad 2 hours ago | parent | next [-]

I'd be cautious here because you very easily could brick the hardware. For writing a PC driver it's a lot safer since you can just fail repeatedly until it works.

baby_souffle 2 hours ago | parent | prev [-]

Firmware is a lot harder for a whole host of reasons but it is possible / I've done it.

The odds of success go up a LOT when the stock firmware is easy to extract and reverse engineer.

Rebelgecko 4 hours ago | parent | prev | next [-]

I've had good luck using AI to reverse-engineer Bluetooth comms for "smart" products with shitty apps.

scoot an hour ago | parent [-]

I've recently done the same for a Bluetooth LED matrix display, then took it a step further assembling my own hardware (ESP32 controller and RGBIC matrix) to have control over the firmware for features that weren't possible with the off-the-shelf device.

None of this would have been possible (or at least practical from a time-value perspective) for me to do without Claude driving the whole exercise.

antihero 3 hours ago | parent | prev [-]

Are we either in a dangerous time where we'll run out of people that have weeks to months, and the resolution/boredom/ability to figure this sort of thing out?

Or are we in a really cool time where we've solved everything so much so many times we can focus on other things?

Tertiary question: If answer two, what the fuck is that?

cracell 2 hours ago | parent [-]

More the second.

For programmers this is the equivalent of when accountants got spreadsheets. We can just tell the machine what to do without manually performing all the steps.

Some programmers enjoyed the code writing more than the problem solving though.

Tiberium 4 hours ago | parent | prev | next [-]

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.

supriyo-biswas 15 minutes ago | parent | next [-]

This comment should be pinned, and the fact that a misleading post continues to be on the first page blows my mind.

a2tech 26 minutes ago | parent | prev | next [-]

He could have done this with 10-15 minutes of googling instead of spending 4 hours prompting a LLM.

netsharc 2 hours ago | parent | prev | next [-]

Ah, 2026... When the "tech write up" on page 1 of "Hacker News" is some genius selling an LLM creating a VM as "wrote a driver".

OP should probably add this to his list of accomplishments on LinkedIn...

perching_aix 3 hours ago | parent | prev | next [-]

It's strange, because I have zero doubt in my mind that Claude could 100% genuinely reimplement the driver and port it to actually natively run on macOS, were it prompted that way.

qingcharles 2 hours ago | parent | next [-]

Agreed.

I bought some cheap host-managed SATA drives the other day that the BIOS can't see and Windows won't recognize. I asked Claude to write a Windows app so I can use them, and it resisted at first, but then gave up and wrote it and they now work great.

It had to implement the entire stack of bare-metal drive functions over SATA and a whole new filesystem to go with it.

bombcar an hour ago | parent | prev [-]

Generate the VM, send it crafted PDFs to print, see what it produces, and build a driver. Not that “hard” even for a human, an AI could probably one-shot it.

xyst 4 hours ago | parent | prev | next [-]

yup, clocked this in just the first few lines of the transcript.

I am sooo tired of this AI generated slop.

pudgywalsh 3 hours ago | parent | prev [-]

For the amount of electricity wasted by the LLM in the data center it would have been more efficient to buy a new printer that works out of the box.

bethekidyouwant 3 hours ago | parent [-]

Redditors actually believe this

NewsaHackO 3 hours ago | parent [-]

Also, they seem to care about wasting electricity but doesn’t bat an eye of discarding a perfectly fine printer.

oneplane 4 hours ago | parent | prev | next [-]

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.

Lucasoato 4 hours ago | parent [-]

But it wouldn’t have used so many tokens ;)

feintruled 4 hours ago | parent | prev | next [-]

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-shape 4 hours ago | parent | prev | next [-]

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.

yakz 4 hours ago | parent | next [-]

The way that you talk to it influences the way that it responds to you and it is not subtle. I don't want to hitch on to the "it's just really complicated autocomplete" bandwagon, but this is one of the ways that it does feel like that.

nevi-me 4 hours ago | parent [-]

With voice dictation (wispr flow), I find it easier for me to talk naturally as if I'm talking to a friend. I'll sometimes give lengthy notes on context for a project, like why I want to do it, e.g. something for my wife to use.

So I find it common (and fine, I suppose) for Claude to reply using that context. "Let me know what your wife thinks of the app" etc.

theultdev 4 hours ago | parent | prev | next [-]

I'd be willing to bet somewhere in that conversation he said family printer or something.

Seems an oddly specific thing to hone in on otherwise.

hmokiguess 4 hours ago | parent [-]

That's funny, 'Ctrl + F' for 'family' returns a lot of uses of that word in different contexts, so I guess it must have scored heavy eh

ex-aws-dude 4 hours ago | parent | prev [-]

> Leave my family out of this!

mag7269 4 hours ago | parent [-]

https://peepshow.gifglobe.com/scene/?id=HAGUFD3NuzO4

leftouterjoins 20 minutes ago | parent | prev | next [-]

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

LeoPanthera 5 hours ago | parent | prev | next [-]

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

DougN7 4 hours ago | parent [-]

I find it uses “faithful” an awful lot. But it comes in waves - not at all for a few days and then 10 times in an hour.

inguz 3 hours ago | parent | prev | next [-]

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.

saejox 5 hours ago | parent | prev | next [-]

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.

trollbridge 4 hours ago | parent | next [-]

I did a similar project for another make of printer, but used DS Flash and GPT-5.6-Sol, so it was effectively free ($2-$3 of Flash and maybe 5% of a monthly Max sub, so $10?)

qurren an hour ago | parent | prev | next [-]

> if i ever get some tokens to burn

The real trick is to have the AI do something that makes its own money, then tokens are effectively free.

People who are complaining about token costs aren't trying.

asveikau 4 hours ago | parent | prev | next [-]

It didn't write a driver. It used a linux driver. You don't need an LLM.

f0cus10 5 hours ago | parent | prev | next [-]

i have a label printer that's in the same boat. I wonder how many tokens this convo was

altmanaltman 4 hours ago | parent | prev | next [-]

someone already burned those tokens for you: https://github.com/farafonoff/Brother-DCP-T230-MacOS-driver

TacticalCoder 4 hours ago | parent | prev | next [-]

> my Brother dcp-t230 also doesn't have macos drivers and it's a usb only printer.

Same thing here brother: DCP-L2510D (laser printer + scanner).

Wife is on MacOS and cannot print/scan from there, so I'm the scanman.

thrownaway561 4 hours ago | parent | prev [-]

I don't see anywhere in the post or the repo how much it cost him to do this in tokens.

mjmvisser 4 hours ago | parent | prev | next [-]

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.

IronWolve 5 hours ago | parent | prev | next [-]

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.

kccqzy 3 hours ago | parent [-]

Claude can do Linux drivers too. A friend bought a second-hand Intel Mac, installed Linux, and found that some of the hardware didn’t work. It wasn’t very hard to get Claude to write those drivers.

etothet 2 hours ago | parent | prev | next [-]

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

sgjohnson 4 hours ago | parent | prev | next [-]

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

xyst 4 hours ago | parent [-]

bro is going to need opus and a couple thousand dollars in tokens for something that _may_ work.

TacticalCoder 4 hours ago | parent | prev | next [-]

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.

tonyarkles 4 hours ago | parent | next [-]

I was digging into the history of PostScript engines inside laser printers and Adobe made tons of royalty money off of that for quite a long time.

quietsegfault 3 hours ago | parent | prev | next [-]

That mid-1990s postscript, networked printer when new cost as much as a small car! The HP Laser 1000 was like $250 tops new.

ryandrake 4 hours ago | parent | prev [-]

I've always thought USB-only made no sense on a printer. If there was one device in your house that multiple computers (and phones, don't forget) would want to use simultaneously, it's a printer. I'll only buy a printer that has its own built in network connectivity. Infuriating to have to stick a Pi onto your printer just so it can do what should be basic, table-stakes functionality.

skydhash 3 hours ago | parent [-]

A usb controller is way less expensive than something that can run a TCP stack and the associated software.

bethekidyouwant 3 hours ago | parent | prev | next [-]

Doesn’t every printer work with CUPS?

bredren 3 hours ago | parent | prev | next [-]

Notably done on Opus 4.8.

ValentineC 5 hours ago | parent | prev | next [-]

See also: https://news.ycombinator.com/item?id=49344643

ChrisArchitect 4 hours ago | parent | prev | next [-]

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

tracespect 4 hours ago | parent | prev [-]

güzel bir çalışma olmuş