Back

FreeBSD doesn't have Wi-Fi driver for my old MacBook. AI build one for me

99 points2 hoursvladimir.varank.in
petcat1 hour ago

I feel like ubiquitous hardware support in every OS is going to be a solved problem soon. We're very close to just being able to set an AI coding agent to brute-force a driver for anything. The hardware designer would have to go well out of their way to obfuscate the interface if they really wanted to forbid it, instead of just not bothering to support an OS like BSD or Linux.

diath50 minutes ago

The primary reason why it worked is because Claude could rip off the Linux driver. Without any prior work to rely on, how will the AI figure out proprietary hardware?

0538 minutes ago

- have AI write a windows filter driver to capture all hardware communications

- have AI reverse engineer Windows WiFi driver and make a crude prototype

- have AI compare registers captured by filter driver with linux driver version and iterate until they match (or at least functional tests pass)

not exactly rocket surgery, and windows device drivers generally don't have DRM/obfuscation, so reverse engineering them isn't hard for LLMs.

wingmanjd35 minutes ago

So we send an AI agent to the French cafe instead of us?

https://download.samba.org/pub/tridge/misc/french_cafe.txt

ThrowawayR235 minutes ago

[delayed]

WD-4236 minutes ago

He also mentioned it took 2 months. I’m actually wondering how long it would take to do the Linux to BSD port by eyeball, or at least ai assisted. Probably not that much longer? I guess it depends on wall time vs real time.

Nextgrid37 minutes ago

Trial and error?

Just like it does when given an existing GPL’d source and dealing with its hallucinations, the agent could be operated on a black box (or a binary Windows driver and a disassembly)?

The GPL code helped here but as long as the agent can run in a loop and test its work against a piece of hardware, I don’t see why it couldn’t do the same without any code given enough time?

bootwoot40 minutes ago

True. But also -- how do humans do it? There are docs and there's other similar driver code. I wouldn't be surprised if Claude could build new driver code sight-unseen, given the appropriate resources

chrisjj37 minutes ago

[delayed]

rustyhancock45 minutes ago

I haven't read the article but my first question was, install wifibox?

It's a bhyve VM running alpine Linux and you pass through your WiFi adaptor and get a bridge out on the freebsd host.

WD-4240 minutes ago

Literally explained in the post, that’s why you read first.

Gigachad48 minutes ago

Maybe one day, but it doesn't look like we are very close yet. From the OP article, they handed it the working linux driver and asked it to just make this FreeBSD compatible, but it could not. Looks like it took OP a significant amount of work over 2 months to get something that seems to work.

What is interesting is it seems like the work resembles regular management, asking for a written specification, proof reading, etc.

plagiarist40 minutes ago

To make these things work you do need to write a spec and figure out what unit tests will prove it actually did what you want. Even then it will take a bunch of shortcuts so it's best if you're a domain expert anyway.

lazide46 minutes ago

Aka, the hard part.

ahoka53 minutes ago

That pesky GPL does not stop us anymore, cool.

petcat41 minutes ago

What would the GPL have to do with this?

estimator729248 minutes ago

Drivers can be anywhere from so trivial you can throw it together by hand in an afternoon to so complex that it requires an entire engineering team six months of concentrated effort.

octoberfranklin43 minutes ago

Hardware driver bugs frequently manifest as concurrency flakiness or heisenbugs.

AI is notoriously bad at dealing with bugs that only cause problems every few weeks.

rvz1 hour ago

> We're very close to just being about to set an AI coding agent to brute-force a driver for anything.

That sounds quite naive and it isn't that simple. Even the author expressed caution and isn't sure about how robust the driver is since he hasn't seen the code himself nor does he know if it works reliably.

Even entertaining the idea, someone would have already have replaced those closed source Nvidia drivers that have firmware blobs and other drivers that have firmware blobs to be open replacements. (Yes Nouveau exists, but at the disadvantage of not performing as well as the closed source driver)

That would be a task left to the reader.

pmontra38 minutes ago

I'm not so sure that Nouveau is slower than the proprietary Nvidia driver. I didn't run benchmarks on my personal use case but my subjective experience is that Nouveau might be faster. It's a Debian 11, X11, NVIDIA driver vs Debian 13, X11, Nouveau on the same laptop with a Quadro K1100mq. The desktop of the newer system seems to be faster. Of course it could be the sum of the individual improvements of kernel, GNOME, etc. I only move windows around my desktop, no games, so it's a very limited scenario.

ineedasername42 minutes ago

someone would have already have replaced those closed source Nvidia drivers that have firmware blobs

This isn’t quite a fair example, these are so massively complex with code path built explicitly for so many individual applications. Nvidia cards are nearly a complete SoC.

Though then again, coding agents 1 year ago of the full autonomous sort were barely months old, and now here we are in one year. So, maybe soon this could be realistic? Hard to say. Even if code agents can do it, it still costs $ via tokens and api calls. But a year ago it would have cost me at least a few dollars and a lot more time to do things I get done now in a prompt and 10 minutes of Opus in a sandbox.

calmbonsai42 minutes ago

> We're very close to just being about to set an AI coding agent to brute-force a driver for anything.

This is false. To "brute force" a driver, you'd need a feedback loop between the hardware's output and the driver's input.

While, in theory, this is possible for some analog-digital traducers (e.g WI-FI radio), if the hardware is a human-interface system (joystick, monitor, mouse, speaker, etc.) you literally need a "human in the loop" to provide feedback.

Additionally, many edge-cases in driving hardware can irrevocably destroy it and even a domain-specific agent wouldn't have any physics context for the underlying risks.

6r1757 minutes ago

I really wanted to believe the original comment as it is indeed not something I wouldn't see against - however there is truth that hardware can be capricious and one could definitely burn something flipping the wrong bit - here comes the fantastic world of Megaman ; where he's analyzing the bits of the unknown driver - one mistake could burn his owner the machine - he didn't receive the latest analysis tool ; hm...maybe some other ai knows about this on the darkclanet ?

Sorry I drifted, claude is probably done generating stuff

0xbadcafebee36 minutes ago

[delayed]

ulf-7772354 minutes ago

Software is still eating the world, now even faster. I wonder how soon we will adapt to this new situation where software is vibe coded for anything and make use of this software without caution as expressed in the article.

For most people the main difference will be: Will it run and solve my problem? Soon we will see malware being put into vibe coded software - who will wants to check every commit for write-only software?

tkiolp442 minutes ago

I think in the future (in 10 years?) we are going to see a lot of disposable/throwaway software. I don’t know, imagine this: I need to buy tickets for a concert. I ask my AI agent that I want tickets. The agent creates code on the fly and uses it to purchase my tickets. The code could be simple curl command, or a full app with nice ui/ux. As a user I don’t need to see the code.

If I want to buy more tickets the same day, the ai agent will likely reuse the same code. But if i buy tickets again in one year, the agent will likely rebuild the code to adjust to the new API version the ticket company now offers. Seems wasteful but it’s more dynamic. Vendors only need to provide raw APIs and your agent can create the ui experience you want. In that regard nobody but the company that owns your agent can inject malware into the software you use. Some software will last more than others (e.g., the music player your agent provided won’t probably be rebuilt unless you want a new look and feel or extra functionality). I think we’ll adopt the “cattle, not pets” approach to software too.

b851 minutes ago

It'd be nice to have drivers for newer Mac's for a better Asahi Linux experience. Good use of AI imo.

integralpilot39 minutes ago

We don't use AI to help write code due to copyright concerns, it's against our policy. We obviously need to be very careful with what we're doing, and we can't be sure it hasn't seen Apple docs or RE'ed Apple binaries etc (which we have very careful clean-room policies on) in its training data. It also can't be guaranteed that the generated code is GPL+MIT compatible (as it may draw inspiration from other GPL only drivers in the same subsystems) but we wish to use GPL+MIT to enable BSD to take inspiration from the drivers.

Gigachad45 minutes ago

AI wouldn't work here. The OP task was converting one open source driver in to another one for FreeBSD. Since Mac doesn't have open source drivers to start with, a person still has to do the ground research. At least until you can somehow give the AI the ability to fully interact with the computer at the lowest levels and observe hardware connected to it.

tokyobreakfast45 minutes ago

This is like complaining Delorean didn't make spare parts for your homemade time machine.

midtake48 minutes ago

This used to be more common right? Back in the winmodem days?

octoberfranklin47 minutes ago

That AI was trained on the GPLv2 Linux source code, which does have a driver for your Wi-Fi.

How is this not copyright laundering?

irishcoffee44 minutes ago

This is really neat, I'm glad it worked.

This is atrocious C code.

h4kunamata1 hour ago

The Linux community has been doing this since forever. Old hardware is fully supported on Linux, unless of course, you are a macOS fanboy because Apple will do everything to preventing you from owning your hardware, including locking hardware ID via firmware.

This isn't a news to be in here.

Joyfield1 hour ago

AIs being able to do this has not been around "since forever" though.

iknowstuff1 hour ago

I don’t think Apple is any different than any other vendor who doesn’t bother releasing Linux drivers? support for most devices depends on the community creating them no?

If you’re a macOS fanboy presumably you don’t care about Linux support.

h4kunamata57 minutes ago

>I don’t think Apple is any different than any other vendor

Read my previous comment again!! If you buy a genuine display and install it, it won't work because Apple locks the hardware ID via firmware. It must be installed by Apple only.

No other vendor does that, the Linux community always found its way to get a non-supported hardware working.

Windows until recently with the AI slope, was the only major OS used everywhere so why many vendors only have Windows driver, I understand theirs "Why bother?"

tokyobreakfast58 minutes ago

> any different than any other vendor who doesn’t bother releasing Linux drivers

Which has dwindled in number so much as to practically not be problem anymore. There is even a Linux-only or Linux-first attitude with some vendors.

Buying Apple to run Linux borders on stupidity nowadays because of the vast better options fit for purpose.

Like buying a gasoline vehicle then complaining it can't run on diesel. It wasn't designed to.

h4kunamata57 minutes ago

THANK YOU!!!!!!

kombine55 minutes ago

Most vendors are different from Apple in that they don't have their own OS and software ecosystem that is in direct competition with Linux.

johnjames871 hour ago

what a salty comment

groundzeros201552 minutes ago

This is exciting! This sounds like a great application because it’s mostly tedious work to adjust an existing driver to another device.