Live data from Hacker News

Claude writing a macOS driver for my obscure HP printer built only for Windows

twitter.com

201–210 of 241 posts

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#201

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…

I recently reverse engineered a binary in a system image of Fabrice Bellard's JSLinux [1]. When given just the binary and asked to reverse engineer, Claude Sonnet quickly identified that some utility functions looked like some Fabrice's (yes, Claude mentioned his name without more hints than the binary) library code, so that helped me to guide Claude to fetch some original source code from a Fabrice project (tinyEMU) to use in the reversed project. That allowed to reach a reverse C file that contains just the original part.

[1]: https://github.com/dolmen/JSLinux-utils/blob/main/export_fil...

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#202
post #127

Earlier quoted context omitted.

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

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.

The easiest path is when you get access to a firmware update distribution.

This reminds me to have a look at the latest update I installed in my car for my navigation system and which is installed via an USB key.

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#203
post #190
post #79

Earlier quoted context omitted.

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

Maybe wiimotes will finally work on the Apple silicon bluetooth stack as they already do on Windows and Linus.

This might help; haven’t tried it myself. https://github.com/dolphin-emu/WiimotePair

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#204

Earlier quoted context omitted.

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…

Kinda sounds like you are finally realizing the dream of XML and DTD envisioned 25 years ago.

Exactly! Not to mention the belated realization of the so-called "expert systems" we were promised back in the 80s. Better late than never.

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#205
post #187
post #165

Earlier quoted context omitted.

I do not want to call anyone names but the level of pedantry and gatekeeping in this comment and the replies is outstanding. I can hear Chuck McGill screaming "You're not a real driver!".

requiring a full blown VM (with a different OS) to implement a driver (normally that would work in ring-0 along with the original OS) is not pedantry. for instance the 'windows' part is also entirely nonsensical as the printer works on a default mint installation w/o any issues. The "obscure" part is weird as you can just buy the printer online as well.

> A device driver is software that operates or controls a particular type of device that is attached to a computer.[1] A driver provides a software interface to hardware devices, enabling other software to access hardware functions without needing to know precise details about the hardware.

- https://en.wikipedia.org/wiki/Device_driver

Is using a VM running another operating system as part of a driver weird, yes. Is it still a driver? Also yes.

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#206
!!!

If you have MATRIX PRINTER, please consider running GhostScript regression tests per release (twice a year).

The developer is looking for volunteers.

Otherwise upcoming GhostScript version will remove widely used LQ850 driver and you won't be able to use it in the next Debian/Ubuntu/whatever.

https://bugs.ghostscript.com/show_bug.cgi?id=709659

!!!

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#207

Amazed Claude didn't refuse this for "cybersecurity". Then I noticed this was this Opus 4.8? Did the author start with 4.8 or was this a fallback from the 5 series?

A lot of people are going back to 4.8 because of the over-verbosity of 5.0. It's pretty painful to read through anything "English" that is output by Opus 5. It's like a whole separate pidgin language.

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#208

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.

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.

Do we have good numbers for the embodied energy of a printer? I would be interested to know what the actual cutoff point is.

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#209
post #29

I tried to get Copilot to port the Linux drivers for my HP CP1025 to macOS, but it failed. Even modern Linux can’t print to it any more, I had to put an older distribution on a RasPi and now I’m printing at reduced quality. It was crazy how the LLM held on to outdated information. It suggested so many things that might have worked on an older macOS but very obviously wouldn’t nowadays. It also tried to port from Linu…

CP1025 is supported in foo2zjs.

You need to manually download a color profile data (getweb script) though. Make sure there's /usr/share/foo2zjs/icm/hp-cp1025-rgb-392-bpp1.icm file.

If you tried to use foo2zjs in Fedora / Redhat or similar distro, they now require additional configuration with obscure error message: https://fedoraproject.org/wiki/Changes/FoomaticRipRejectsUnk...

Re: Claude writing a macOS driver for my obscure HP printer built only for Windows

#210

On a similar experience, I use moonlight on my Android TV to stream video games from my computer in another room. I use my own fork from an unmerged PR which enables me to use an Xbox One Wireless adapter so I can play with my pad wirelessly. These pads have a 3.5mm jack on them which on Windows and Linux enables me to route audio from the game to headphones connected to the pad. Moonlight and the xow driver it bundl…

> spec, an export of sniffed usb traffic from Windows, prior art I used to feel proud of the fact I reverse engineered some of my laptop's features using stuff just like this. I suppose that's over.

You're proud of yourself for being able to do the work yourself. That somebody else can get the end result without the skill means that they get the end result, but it doesn't undermine your achievement.
Post reply on HN