<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>HP LaserJet on RockB</title><link>https://baeseokjae.github.io/tags/hp-laserjet/</link><description>Recent content in HP LaserJet on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 13 Sep 2026 22:01:12 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/hp-laserjet/index.xml" rel="self" type="application/rss+xml"/><item><title>Claude Code Printing to a Windows-Only HP Laser From macOS: How an Agent Built a Real Driver</title><link>https://baeseokjae.github.io/posts/claude-code-native-print-hp-laser-2026/</link><pubDate>Sun, 13 Sep 2026 22:01:12 +0000</pubDate><guid>https://baeseokjae.github.io/posts/claude-code-native-print-hp-laser-2026/</guid><description>Yes — Claude Code reverse-engineered a Windows-only HP Laser 1008a and made it print from a Mac via a native CUPS driver. Here&amp;#39;s the honest how, limits, and cost.</description><content:encoded><![CDATA[<p>Can Claude Code make a Windows-only HP laser printer work on macOS? Yes, and it is not hype. In August 2026, PolyThink founder Kuber Mehta spent a single roughly four-hour session coaxing Claude Code (Opus 4.8, 1M context) into reverse-engineering the proprietary SPL3 raster language of an HP Laser 1008a — a rebadged Samsung host-based printer that ships with no macOS driver and no AirPrint — and wiring HP&rsquo;s real codec into the native macOS CUPS stack. The result is a one-command, MIT-licensed installer at github.com/Kuberwastaken/hp-laser-1008a-macos, and it raises a much bigger question about what agentic tools do to hardware tinkering.</p>
<h2 id="the-one-line-wonder-a-windows-only-hp-laser-printing-from-cmd-p">The one-line wonder: a Windows-only HP laser, printing from Cmd-P</h2>
<p>The headline event is simple: a printer that HP only ever supported on Windows and Linux, sitting on a Mac desk, printing from the standard macOS print dialog. No Docker hack, no Windows VM bridged in — the final delivered version runs a 100% macOS-native driver. The Register&rsquo;s Thomas Claburn covered it on 19 August 2026, and a Hacker News thread about the story reached 342 points and 223 comments within about three days. Mehta told The Register he &ldquo;knew very little about macOS drivers but learned along the way,&rdquo; and that the session took roughly 30–40 prompts and consumed about 4% of his monthly Claude usage.</p>
<p>If that reads like a magic trick, the honest explanation is more useful than the headline. Claude Code did not conjure a driver from nothing. It orchestrated a repeatable reverse-engineering pipeline: reading the printer&rsquo;s own diagnostic error pages, beating the macOS USB sandbox, and slotting a real HP raster codec into the system&rsquo;s CUPS print framework. The magic is the method, not the model.</p>
<h2 id="why-the-hp-laser-1008a-never-worked-on-a-mac-rebadged-samsung-spl3-no-airprint">Why the HP Laser 1008a never worked on a Mac (rebadged Samsung, SPL3, no AirPrint)</h2>
<p>The 1008a is not an ordinary PostScript or PCL printer. HP&rsquo;s driver pages for it list Windows and Linux only, with no macOS driver and no AirPrint, for three structural reasons:</p>
<p>First, it is a rebadged Samsung host-based unit. Host-based (or GDI) printers offload raster processing to the connected computer instead of running page-description languages onboard. That makes them cheap, but it means the driver does most of the work — and the wire protocol is proprietary.</p>
<p>Second, the printer speaks SPL3, a proprietary raster language, not the PCL or PostScript that generic macOS drivers understand. When Mehta tried a generic PCL driver, it hung at &ldquo;connecting to device&rdquo; because the printer simply does not speak the protocol that generic driver expects.</p>
<table>
  <thead>
      <tr>
          <th>Printer capability</th>
          <th>HP Laser 1008a</th>
          <th>Typical PostScript/PCL laser</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Onboard page-description language</td>
          <td>None (host-based)</td>
          <td>PostScript / PCL</td>
      </tr>
      <tr>
          <td>Wire protocol</td>
          <td>Proprietary SPL3 raster</td>
          <td>Standard PCL / PS</td>
      </tr>
      <tr>
          <td>macOS driver from HP</td>
          <td>No</td>
          <td>Yes (often AirPrint)</td>
      </tr>
      <tr>
          <td>AirPrint support</td>
          <td>No</td>
          <td>Usually yes</td>
      </tr>
      <tr>
          <td>How it prints from a Mac</td>
          <td>Needs custom raster filter</td>
          <td>Generic driver works</td>
      </tr>
  </tbody>
</table>
<p>Third, HP has broadly moved away from full-featured macOS drivers, leaning on AirPrint even for newer models. machow2.com notes that many HP driver download pages now list &ldquo;Windows only&rdquo; even for new printers. Without AirPrint and without a standard PDL, the Mac owner&rsquo;s options were generic PostScript/PCL drivers (which often fail), running the Windows driver in a VM, or a manual workaround. That is exactly why a Windows-only HP laser is a common, real-world pain point for Mac owners — not an exotic edge case.</p>
<h2 id="what-claude-code-actually-did--the-honest-pipeline-error-pages-usb-sandbox-real-codec-in-the-cups-stack">What Claude Code actually did — the honest pipeline (error pages, USB sandbox, real codec in the CUPS stack)</h2>
<p>Mehta&rsquo;s lightly-redacted full transcript shows the real pipeline, and the honest part matters. The widely-shared version (&ldquo;Claude wrote a driver&rdquo;) undersells the actual work. Here is what happened, step by step:</p>
<ol>
<li>
<p>The generic PCL driver hangs. The first attempt fails cleanly at &ldquo;connecting to device,&rdquo; which is useful ground truth: the printer does not understand PCL.</p>
</li>
<li>
<p>Reverse-engineer SPL3 by reading the printer&rsquo;s own error pages. Rather than guessing, the agent used the printer&rsquo;s diagnostic output to learn the raster dialect it emits and expects.</p>
</li>
<li>
<p>Beat the macOS USB sandbox. Interfacing with the printer over USB from an unprivileged process is blocked by macOS; the final solution routes around that constraint inside the CUPS stack.</p>
</li>
<li>
<p>Wire HP&rsquo;s real rastertospl codec into the native CUPS stack. The critical honest detail: the agent did not author a raster encoder from scratch. It pulled in HP&rsquo;s own raster-to-SPL codec and integrated it as a CUPS filter on macOS, run via a reboot-safe daemon. The final released version is described as &ldquo;100% macOS native&rdquo; by the author, after an earlier iteration was a Docker/Linux-driver bridge.</p>
</li>
<li>
<p>Ship it as a one-command, MIT-licensed installer. So another Mac owner with the same printer can install the fix in one command.</p>
</li>
</ol>
<p>That pipeline is far more instructive than a &ldquo;model did it&rdquo; story. The value is not that Claude Code generated code; it is that the agent held a coherent reverse-engineering loop together for four hours — form a hypothesis, capture ground truth, build the smallest piece, verify against byte-level output, repeat.</p>
<h2 id="method-that-makes-it-work-ground-truth-capture-hypothesis-before-code-byte-level-diffs">Method that makes it work: ground-truth capture, hypothesis before code, byte-level diffs</h2>
<p>The companion case from signalreads.com — a 2009 HP LaserJet P1006, a GDI printer with a Windows-only driver — makes the reusable method explicit. In that ~3-hour session, Claude captured a Windows VM printing a test page with Wireshark/USBPcap, decoded the HBPL-like raster dialect from diffed captures, then scaffolded a PPD plus a rastertohbpl CUPS filter written in C with a libusb wrapper.</p>
<p>Across both cases, the method that actually works has three pillars:</p>
<ul>
<li>
<p>Capture ground truth before you write a line of code. In the P1006 case, that meant sniffing the USB traffic of a known-good Windows print on the exact same device. In the 1008a case, it meant reading the printer&rsquo;s own error pages. Hypotheses about a protocol are worthless until you confirm them against real bytes.</p>
</li>
<li>
<p>Form the hypothesis, then confirm with byte-level diffs — never trust the model&rsquo;s confidence. Agentic systems are excellent at sounding certain and wrong in the same sentence. The P1006 author&rsquo;s explicit warning: verify protocol claims against diffed captures before writing a decoder. The 1008a story only worked because the iteration was grounded in observable printer output, not in the model asserting &ldquo;this is how SPL3 works.&rdquo;</p>
</li>
<li>
<p>Build the smallest verifiable piece and expand. A working &ldquo;hello print&rdquo; test page beats a large unimplemented architecture every time.</p>
</li>
</ul>
<p>This is what distinguishes a genuine engineering session from a plausible dead-end. When Mehta&rsquo;s version initially used Docker to run the Linux driver, the skeptical read was fair — but the point is the loop kept converging because each step was anchored to ground truth rather than to confidence.</p>
<h2 id="where-the-story-gets-complicated-the-its-not-a-real-driver-debate-prior-art-security">Where the story gets complicated (the &ldquo;it&rsquo;s not a real driver&rdquo; debate, prior art, security)</h2>
<p>The Hacker News thread pushed back, and the pushback is worth taking seriously. Several commenters noted the first published version was not a native driver: it ran HP&rsquo;s Linux driver inside Docker/colima and bridged to macOS, rather than a ring-zero native driver. The author later pushed a &ldquo;100% macOS native&rdquo; version, which is the version documented in the transcript. Commenters also flagged:</p>
<ul>
<li>It was not &ldquo;obscure&rdquo; — the printer is sold on Amazon and works fine on Linux. Calling it obscure oversold the difficulty.</li>
<li>The docker-printing approach had documented prior art around 2017 (alecburton.co.uk). One commenter put it bluntly: &ldquo;Claude just plagiarized as usual.&rdquo;</li>
<li>Security is a real concern. The launcher runs as root from user-controlled code in ~/.hp1008. That is a meaningful trust boundary: any code installed into that directory, including a future malicious update to the installer&rsquo;s repo, would run with root privileges.</li>
</ul>
<p>The takeaway is not that the story is fake — it demonstrably works — but that the marketing framing outran the engineering nuance. The genuinely impressive part (sustained, ground-truth-anchored reverse engineering) is less flashy than the headline, and the security and prior-art questions are legitimate. Read the transcript, not the X post.</p>
<h2 id="when-agentic-hardware-reverse-engineering-is-worth-it--and-when-it-isnt">When agentic hardware reverse-engineering is worth it — and when it isn&rsquo;t</h2>
<p>Both the 1008a and P1006 cases share a structural condition that made them tractable: the device is a fixed-protocol, &ldquo;dumb&rdquo; printer with no firmware that changes the wire behavior. That is the defining constraint.</p>
<p>It works when:</p>
<ul>
<li>The device uses a fixed, immutable wire protocol (host-based printers, unauthenticated USB scanners, serial cameras).</li>
<li>You can capture ground truth from a working reference environment (a Windows VM running the real driver on the exact same device).</li>
<li>The failure mode is silent but observable (&ldquo;connecting to device&rdquo; hangs, or an error page that leaks the dialect).</li>
</ul>
<p>It does not work when:</p>
<ul>
<li>The device is firmware-updated or can change its protocol, because your captured ground truth goes stale.</li>
<li>The device requires network authentication — you cannot diff your way past a login the protocol itself gates.</li>
<li>You cannot get a working reference env, because there is nothing to diff against.</li>
</ul>
<p>The honest warning from both authors is the same. Do not attempt this on firmware-updated or authenticated network devices; you are chasing a moving target. The cost math also matters: Mehta burned about 4% of monthly Claude usage plus a long evening. For a one-off, ~4-day reverse-engineering project compressed into one sitting that is a bargain. For a $90 printer, it is worth asking whether the time is better spent on a compatible replacement — which is exactly the debate the thread had about electricity and usage costs versus buying hardware that just works.</p>
<h2 id="the-bigger-shift-agentic-coding-turning-orphaned-hardware-and-shelved-ideas-back-into-play">The bigger shift: agentic coding turning orphaned hardware and shelved ideas back into play</h2>
<p>The Register situates the story inside a wider trend: GitHub racked up roughly 1 billion commits in 2025 (per GitHub COO Kyle Daigle), and agentic tools are collapsing the barrier to entry for projects previously shelved as &ldquo;too ambitious.&rdquo; Mehta&rsquo;s phrasing captures it: &ldquo;Every idea you shelved as too ambitious is now back in play.&rdquo;</p>
<p>The printer is not alone. The same thread surfaced parallel anecdotes — a laser engraver, a Sony camcorder protocol, a scanner, a Stratasys J55, a Brother DCP, and BLE label printers, all revived with agentic tools. The common thread is not that models are geniuses. It is that the cost of sustained, multi-hour, hypothesis-testing engineering work collapsed, so orphaned hardware and niche protocols that no vendor will support become reachable by one motivated person with one good session.</p>
<p>That has an environmental angle the thread also raised: resurrecting a working printer that would otherwise be e-waste. When the alternative is discarding functioning hardware because its vendor dropped an OS, agentic reverse engineering turns a disposal problem into a weekend project. The economics shift from &ldquo;not worth it&rdquo; to &ldquo;worth one evening.&rdquo;</p>
<h2 id="what-this-means-for-how-you-treat-unsupported-devices-e-waste-cost-alternatives">What this means for how you treat unsupported devices (e-waste, cost, alternatives)</h2>
<p>If you own a Windows-only HP laser and a Mac, here is what the case actually changes — and what it does not.</p>
<ul>
<li>Before you shell out for a new printer, the viable paths are: a generic PostScript/PCL driver if the device supports standard PDL; running the Windows driver inside a VM; or, for a growing set of fixed-protocol host-based printers like the 1008a, a community agent-built driver such as the MIT-licensed installer in this case.</li>
<li>Check whether your device is truly unsupported versus merely lacking AirPrint. Many HP lasers that support PostScript/PCL will work with a generic driver; the 1008a and P1006 fail because they are host-based and speak proprietary rasters. That distinction decides whether this approach will help you at all.</li>
<li>Treat agent-built installers with the same caution as any third-party root-installed software. The ~/.hp1008 launcher runs as root from fetched code; verify the source, pin versions, and audit a future update before applying it. A working driver is not a reason to skip the security review.</li>
<li>Respect the boundary conditions. Firmware-updated or authenticated network printers are out of scope for the diff-based method — do not expect a weekend miracle there.</li>
</ul>
<p>The real lesson of the HP Laser 1008a case is not &ldquo;AI writes drivers.&rdquo; It is that agentic tools, anchored to byte-level ground truth, can carry a genuinely hard reverse-engineering project to completion in one evening — and that the honest, reproducible method behind the headline is now in reach of anyone with a printer, a Mac, and patience.</p>
<h2 id="faq">FAQ</h2>
<h3 id="1-can-claude-code-really-print-to-a-windows-only-hp-laser-from-a-mac">1. Can Claude Code really print to a Windows-only HP laser from a Mac?</h3>
<p>Yes. Kuber Mehta used Claude Code to reverse-engineer the SPL3 raster protocol of an HP Laser 1008a and ship a native macOS CUPS driver, published as an MIT-licensed one-command installer. The printer prints from the standard macOS print dialog without any Windows VM or Docker bridge.</p>
<h3 id="2-why-doesnt-the-hp-laser-1008a-have-a-macos-driver">2. Why doesn&rsquo;t the HP Laser 1008a have a macOS driver?</h3>
<p>The 1008a is a rebadged Samsung host-based printer: it has no onboard PostScript or PCL, no AirPrint, and speaks a proprietary SPL3 raster language. HP only ships Windows and Linux drivers for it, and a generic PCL driver fails because the printer does not understand PCL.</p>
<h3 id="3-is-the-driver-in-this-story-actually-native-or-is-it-running-linux-in-a-container">3. Is the driver in this story actually native, or is it running Linux in a container?</h3>
<p>The final released version is described as fully macOS native, wiring HP&rsquo;s real rastertospl codec into the CUPS stack. However, the first published version ran HP&rsquo;s Linux driver inside Docker and bridged it to macOS — which is why Hacker News correctly called out the &ldquo;native&rdquo; framing as initially an overstatement before the author pushed a native rewrite.</p>
<h3 id="4-is-it-safe-to-install-a-claude-generated-printer-driver">4. Is it safe to install a Claude-generated printer driver?</h3>
<p>Treat it like any third-party root-installed software. The launcher runs as root from code in ~/.hp1008, so a compromised or malicious update would have full system access. Verify the source, pin the version, and audit updates before running them.</p>
<h3 id="5-when-is-an-agent-built-driver-worth-it-versus-just-buying-a-new-printer">5. When is an agent-built driver worth it versus just buying a new printer?</h3>
<p>It is worth it for fixed-protocol, host-based printers where you can capture ground truth from a working reference environment and the failure mode is silent but observable. It is not worth attempting on firmware-updated or authenticated network devices. If replacing the printer costs less than the time and ~4% of monthly API usage, buying a compatible unit is often the smarter call.</p>
]]></content:encoded></item></channel></rss>