How difficult would it be write a driver for wireless adapter for Linux?

I have this wireless adapter but it only came with a driver for Windows and it doesn't work with Linux out of the box so I figured writing my own driver would be a cool project to learn about kernel modules and low level programming. But... how hard is this really? I know some C++. Never written any kernel modules though, not even some Hello World shit. What's a realistic time frame for me to get a working driver for this WiFi adapter?

Attached: bwjk.png (474x711, 113K)

Try looking for drivers online first. Use lsusb to see what chipset it is. You might get lucky

>What's a realistic time frame for me to get a working driver for this WiFi adapter?
maybe a few weeks if you can figure out what you're doing quickly enough.
have you found a datasheet yet?

2

I don't even know what a datasheet is.

I don't even know what the hardware is, but I'm going to write a driver for it in machine code. Look out world!

>Look out world!
Is it... is it going to explode?

Could you give a quick rundown on what the process for writing drivers is?

If it didn't work out of the box, it likely needs non-free drivers to work, so if you write a free driver, you'd be greatly benefiting the world. Good on you, OP. I sometimes fantasize about doing stuff like you're doing. Reverse-engineering non-free shit and making free versions. I can't even program, though. I'm hoping to get on adderall and then take another stab at learning some of this stuff. I've got plenty of time.

you write drivers in c

I'm at the same stage as you bro. I have literally no idea where to start so I'm asking here. Don't hit the adderall too hard, eh? That shit fucks you up in the long term if your dose is too high.

could be similar enough to an existing driver to just need a small patch, or it could be a mostly new driver, who knows, there's a lot of variables

Based brainlet user

He was just making fun of me, dude.

this board is gaymers, wintard children, macfag faggots and incel neckbeard virgin ricers who only ever wrote hello world in python and now consider themselves hackers.

if your first instinct is to ask here, then you will fail. Im calling it, no ifs, no
>b-but what if he really works hard on it!!1
nope, you're gonna fail. savour that feeling, of not having accomplished what you set out to do

Attached: x2-1-lg[1].jpg (500x278, 34K)

Have you looked into NDISWrapper?
(Used it years ago with success, don't even know if it's used anymore)

I just randomly googled "how to write linux wifi driver" and the first (quora) result actually gave competent advice.

the fact that you asked on Jow Forums shows what kind of loser you are.

I don't even care about the network access. I've got several working wireless adapters and ethernet cables. I just want that aesthetic feeling of writing really low level code that interfaces directly with the hardware. It sounds satisfying as fuck desu.

haha yeah that was totally me, OP. You sure told me!

Go ask Greg K Hartman.
The guy wrote the original USB stack for the kernel.
He also reverse engineered a shit ton of adapters of all kinds related to USB.

If he could do this over a decade ago it can't be that difficult.
It's probably just not well documented but much less complex than expected.

>the fact that you asked on Jow Forums shows what kind of loser you are

Seriously send this guy a msg.
He's open to mentoring to kernel mod devs and driver newbs.

Also look into HID USB specification.
If you don't want to make a foss implementation than you can probably look in openwrt's repos and grab a binary(proprietary) wireless chipset driver for /usr/local/firmware or /etc/firmware

I don't think it's doable without intimate knowledge of the hardware. Like most drivers are tens of thousands of lines of C and assembly written by people who have the engineering blueprints.
I'd be impressed if you could get the little flashy light to turn on.

Yeah this is way over my head and requires too large a time investment. I have other fish to fry right now... maybe one day.

if your intested in hardware, try doing something with a rasberry pi or andruino. That would be a great learning project. Make a wireless light or something. Then come back to this project once u know more

JUST

Buying a freedom respecting USB Atheros wifi for $10 or less is easier.

you might be able to use the windows driver with ndiswrapper

Holy shit

depends on the year it was made. recent wifi devices are pretty much a standalone device that the driver just sends commands. i've seen a few that use AT commands.

Kek
Good luck, you're going to need it.

Easy mode:
* There is already a driver for that chipset, you just need to add a few IDs and tweaks/tunables

Normal mode:
* Get the documentation (datasheets) from the vendor
* Figure out how to interface the device with the kernel you are using (bus, data structures, protocols, etc.)
* Write your driver
* Fix bugs, with a system constantly crashing

Hard mode:

* The vendor tells you to fuck off, you won't have any doc
* Literally spend weeks or months reverse engineering the hardware

boot windows install in qemu, give the vm access to usb wifi dongle, make it log all usb traffic, and you are 50% there.

In order to write a driver for a device, you need to know how to talk to it. I guess in theory you could maybe reverse engineer the Windows driver to figure it out. You would probably also want to look at the code of an open source driver for a similar device to see what kinds of things a driver for a wireless adapter does, to help with the reverse engineering process.

he already gave up morons