Writing a basic Linux device driver when you know nothing about Linux drivers or USB (crescentro.se)
from learnbyexample@programming.dev to linux@lemmy.ml on 28 Jun 11:52
https://programming.dev/post/33034792

#linux

threaded - newest

Brewchin@lemmy.world on 28 Jun 12:27 next collapse

Found this to be an interesting read, and well written. Thanks for sharing it.

warm@kbin.earth on 28 Jun 12:47 next collapse

A very nice, simple webpage too.

Tenderizer78@lemmy.ml on 28 Jun 16:24 collapse

I opened it and was immediately taken aback at how refreshing it feels to open a page that is entirely (mostly) just HTML/CSS.

SoulKaribou@lemmy.ml on 29 Jun 01:00 collapse

Then i’m sure you’ll like this: no-js.club/members/ There’s also no css and no html clubs. Last but not least, take a look at gemini protocol, which is a bit like gopher: lightweight and textbased only

Xttweaponttx@sh.itjust.works on 29 Jun 13:03 collapse

Yeah, came to the comments to say exactly this! The writer has an RSS feed as well - added to my reader!! 😃 cheers, op - what a find!

RollForInitiative@feddit.org on 28 Jun 12:54 next collapse

Interesting read. I wonder where OP got the specs for the device itself, i.E. what it expects in terms of data and what the response (interrupt) values mean?

IsoKiero@sopuli.xyz on 28 Jun 13:02 next collapse

Over the past few posts I’ve set up a Windows VM with USB passthrough, and attempted to reverse-engineer the official drivers, As I was doing that, 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.

killeronthecorner@lemmy.world on 28 Jun 13:04 next collapse

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. The docs mostly confirmed what I had already discovered independently, but there were a couple of other minor features as well (like power and brightness management) that I did not know about, which was helpful.

Combo of investigating and a foot up from the manufacturer.

When I’ve done this in the past for game controllers I’ve not received such an emphatic response (other than when I was working for the vendor).

Did get some via FOI for a few other products though.

comfy@lemmy.ml on 28 Jun 23:29 collapse

Yeah, props to the Nanoleaf team for helping the author out. Win-win. The author says at the end that they intend on sharing it around more once it has more polish, so I hope they upstream it properly and demonstrate to Nanoleaf that helping out volunteers helps their product reach more customers. (I know it’s iffy to suggest it’s ok to neglect Linux and let us sort it out ourselves, but if we get open-source drivers in the process with the help of the company, I think that’s a net win)

[deleted] on 28 Jun 14:00 collapse

.

Tenderizer78@lemmy.ml on 28 Jun 16:26 next collapse

I would try doing this for my Intel WiFi/Bluetooth card that doesn’t support Linux (WiFi works anyway though). Since the CTRL key is dead (again) and the whole build of it is not to my liking I think I’ll get an old Windows 10 laptop to replace the whole system instead.

Saturnalia@sh.itjust.works on 29 Jun 04:59 collapse

When I installed Ubuntu on an HP laptop recently, I got a message that I didn’t have the drivers for my internal Intel wireless chip. It was at this point that I realized the laptop also didn’t have an Ethernet port. The installer told me to put the drivers on a flashdrive. Thankfully the error spelled out enough for me to find the drivers online. There were a few different versions and I put them all on the stick.

Bluetooth didn’t work, but I realized that was fixed by just enabling the service with systemctl.

ILikeBoobies@lemmy.ca on 28 Jun 16:37 next collapse

Trivia you can use to woo potential partners Here’s 443 pages on generic HID implementations.

My pants!

voodooattack@lemmy.world on 28 Jun 22:14 next collapse

This is amazing. I love discovering new/interesting developer blogs like this one, which is a challenge considering they’re all buried by SEO bullshit.

Cricket@lemmy.zip on 01 Jul 23:36 collapse

If you’re not already aware of it (I wasn’t until recently) there’s a search engine that “prioritizes non-corporate content”: marginalia-search.com

I couldn’t find this particular article or blog there, I’m not sure why. Perhaps their robots.txt blocks it, which would be unfortunate. It turns up other similar content though.

voodooattack@lemmy.world on 02 Jul 14:11 collapse

That’s beautiful. Thank you!

Cricket@lemmy.zip on 03 Jul 18:34 collapse

You’re welcome! I’m glad you like it.

4grams@awful.systems on 28 Jun 23:58 next collapse

This is a great write up, not only in content, but also in spirit and tone. An enjoyable read beginning to end and inspires me to try more stuff.

IMALlama@lemmy.world on 29 Jun 01:22 next collapse

Great read, with some amusing asides.

<img alt="" src="https://lemmy.world/pictrs/image/f1ffe0f7-f7c1-4427-bcf5-e1f2a5c9641e.jpeg">

Shots fired!

utopiah@lemmy.ml on 29 Jun 05:38 collapse

Shit… kind of makes me want to learn Rust now!

Anyway, wonderful write up. No BS, both shortcuts if you just want to the code and in depth links e.g. www.beyondlogic.org/usbnutshell/usb1.shtml all written with a fun tone. Plenty of actually useful content showing us all that sure, it is not trivial to write a (USB) driver but it is also probably not as hard as we imagine. Particularly enjoyed the :

  • userspace driver, namely being able to tinker locally without feel the pressure to push back the work to Linux the kernel itself
  • libusb and other drivers, namely that there is a myriad of points to start from already, not just writing reverse engineering bits in memory to the new device and hoping it’ll work