I want to run FreeBSD on my laptop, but they don't have a [complete] driver for my wifi card. I've thought about diving into AI coding-assistant agents just to see if I could use one to finish throwing together a working driver... but figuring out the AI agents is frictiony enough that I'm leaving it be. (I'm not a VSCode user)
Writing a basic Linux device driver when you know nothing about Linux drivers
51–60 of 72 posts
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#52Earlier quoted context omitted.
I had the same reaction. Nano leaf is extremely cool for that.
This has to put them in the top 0.01% of companies that make consumer electronics. I can think of only a few companies that bother to publish any details... And most of them are focused on industrial customers where it isn't unreasonable to need certain protocol details for integration or even just compliance with certain regulatory systems. Maybe things are changing? I have noticed that some of the LED light control…
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#53Earlier quoted context omitted.
I sometimes think about this, starting from scratch with a computer hardware and software stack that disallowed all of the layers of abstraction that have built up over the decades. Yeah many of the abstractions help with performance but maybe there's value giving up much of that performance in exchange for simplicity.
For toy tinkering, to replicate something like the old ability to just write a byte to an IO memory location and have it appear on the pins of a parallel port, you could design a simple USB peripheral that did similar. Give it a set of DIP switches to pick a number (4 for 0-f, more would probably be overkill but feel free) and have the driver present something like /proc/simpleio/device /in and /proc/simpleio/device…
What I'm talking about is a whole computer system + systems programming language + OS which is as simple to understand and program as computers were in the 80s. With modern speedups, without modern layers of abstraction.
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#54Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#55Earlier quoted context omitted.
I sometimes think about this, starting from scratch with a computer hardware and software stack that disallowed all of the layers of abstraction that have built up over the decades. Yeah many of the abstractions help with performance but maybe there's value giving up much of that performance in exchange for simplicity.
For toy tinkering, to replicate something like the old ability to just write a byte to an IO memory location and have it appear on the pins of a parallel port, you could design a simple USB peripheral that did similar. Give it a set of DIP switches to pick a number (4 for 0-f, more would probably be overkill but feel free) and have the driver present something like /proc/simpleio/device /in and /proc/simpleio/device…
I actually bought a real parallel port card years ago that plugs into a PCI port on my motherboard. Incidentally it also provides 4 serial ports.
Only tried it on Windows, but it works great. If I recall there was some kind of library I have to use in modern Windows versions due to a permissions or kernel isolation thing.
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#56> I also thought I’d message the vendor and ask them if they could share any specifications or docs regarding their protocol. To my surprise, Nanoleaf tech support responded to me within 4 hours, with a full description of the protocol that’s used both by the Desk Dock as well as their RGB strips. How cool is that? Too many vendors still think that they have valuable intellectual property in such relative trivialitie…
I have a solar inveter from a company, aparticular German brand. I wanted to use home assistant with it so I needed rs232 data.. tried the support and they asked me to sign an NDA. Okay, cool. I did with a fake name, address and everything and they sent a file.. Turns out the file is available online. Facepalm pro Max. So my question is, what kind of "IP" is in a data sheet that needs protection ? And this isnt even…
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#57With questionable grammar: [https://rajiv256.github.io//projects/ouros/](link)
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#58Are VFIO or eBPF sufficient; Does this code need to run in the kernel?
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#59This is awesome! But it also makes me a little bit sad. The original parallel port and even ISA interface seemed so simple by comparison, with less layers of abstraction. Just run a wire, and write to a port. I remember when I was a kid, I found a breakout board in an electronics store's random clearance parts bin, with an ISA header on an edge. On a whim I took it home and wire-wrapped a 7-segment LED onto it. Power…
USB itself, at least the 1.1 protocol that's still used for some devices today, isn't all that complicated in itself: https://youtu.be/wdgULBpRoXk
Many if the complicated parts here, like device identifiers, are the things you'd need to manually configure if you were to use a serial port. Those hundreds of pages are similar to the hundreds of device types, vendors, and models that Windows would list when you clicked "add new hardware" back in Windows 98. When push comes to shove, you're just sending energy pulses down wires, there's just a chip in there that helps collect pulses so you don't need to manage the timing manually.
Re: Writing a basic Linux device driver when you know nothing about Linux drivers
#60> I also thought I’d message the vendor and ask them if they could share any specifications or docs regarding their protocol. To my surprise, Nanoleaf tech support responded to me within 4 hours, with a full description of the protocol that’s used both by the Desk Dock as well as their RGB strips. How cool is that? Too many vendors still think that they have valuable intellectual property in such relative trivialitie…
I wish more vendors would put "Linux support" on the package. Or maybe "Unofficially supported in Linux" or "Linux community support" if they don't want to get their fingers burned. Maybe this kind of thing should be enforced in the GPL (as many devices use Linux under the hood).