Question:
How much electronics does a network interface device driver programmer need to know?
2013-02-08 12:33:21 UTC
So I am getting started with writing device drivers. Specifically those used for network interfaces be they Ethernet cards or wireless adapters. Now when it comes to writing a driver, regardless of the operating system, there is going to be "device specific" code for the actual device. Is it necessary for someone who writes network device drivers to know something about the actual electronic workings of such a device? For example, the basis of modulation encoding of frames as they are transmitted and of course decoding radio signals into frames. I do imagine that wi-fi cards can only detect radio signals within a narrow band width. I wish I had a decent technical book about this. Any suggestions? And yeah, I'm a total n00b to device driver development but hey, gotta start somewhere!
Three answers:
Runa
2013-02-08 13:01:46 UTC
You mostly need to know how microcomputers work internally: memory addressing, interrupts, and that kind of stuff. This should be a cinch if you have ever done any coding in assembly (if you want to code device drivers, it might be a wise investment to learn some by the way).



You might want to check out the DNIS developer's reference and get used to the APIs for coding the drivers that you are interested in.
?
2013-02-08 22:23:40 UTC
Generally you need to be able to understand the device data sheet, maybe not all of it but certainly the register descriptions and description of how it operates.



For an example the data sheet for the current intel gigabit chip is here: http://www.intel.com/content/www/us/en/intelligent-systems/networking/embedded-intel-82574l-and-intel-82574it-gigabit-ethernet-controllers.html

From a quick glance you'd need to be able to follow (after a bit of time getting up to speed, there will be a steep learning curve) at least sections 4.6, 10 and 11.



There is probably a Linux driver for that part out there is you want an example implementation. Intel may even have example drivers floating around on their site, they probably wrote the Linux (and windows) one.



That site will also give you the datasheets for the intel wifi parts if you want to look at them.
?
2013-02-08 20:47:41 UTC
You don't have to know how the electronic components work, you do however have to know the interface... the manufacturer may or may not give you that (it may not be public). If that's the case you can never write drivers for that device, you can try to reverse engineer it with limited success.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...