I remember reading some books about Linux Device drivers around the end of my university education for Comp. Science. Soon there-after I got a job and haven't really worked much with Linux/Embedded (I do mostly java stuff now). However it's something I want to look into.
Anyways I recall reading an online article (ill edit post if I can find it) about writing a USB Driver for Linux for a Little "USB Missile Turret" similar to this:
http://www.thinkgeek.com/geektoys/warfare/8a0f/
Anyways it went into detail about how to write the driver without a driver being provided (the guy just found a generic one on ebay....and figured out how to like...write the driver just by looking at the components and such). ANYWAYS it was pretty amazing.
I have a pretty good clue about how low level embedded stuff works, but thats for stuff like AVR's/PIC Microcontrollers, I have no idea how something like this would be written for like a Normal processor in a PC.
Anyways I guess what Im asking is.....how do you figure out this kinda stuff, where would I find such information.
edit: found the link
http://matthias.vallentin.net/blog/2007/04/writing-a-linux-kernel-driver-for-an-unknown-usb-device/
(It's way more confusing then I thought, I didn't realize he reverse engineered a Windows USB driver..im guessing it'd be impossible to figure out without snooping through a windows driver?)
The Linux kernel and drivers are GDFL source. You can read the code, change them, compile them, and experiment to your heart's delight with them. That is a pretty good way to learn.
Related
I'm looking into making a project with the Kinect to allow my Grandma to control her TV without being daunted by using the remote. So, I've been looking into basic gesture recognition. The aim will be to say turn the volume of the TV up by sending the right IR code to the TV when the program detects that the right hand is being "waved."
The problem is, no matter where I look, I can't seem to find a Linux based tutorial which shows how to do something as a result of a gesture. One other thing to note is that I don't need to have any GUI apart from the debug window as this will slow my program down a fair bit.
Does anybody know of something somewhere which will allow me to in a loop, constantly check for some hand gesture and when it does, I can control something, without the need of any GUI at all, and on Linux? :/
I'm happy to go for any language but my experience revolves around Python and C.
Any help will be accepted with great appreciation.
Thanks in advance
Matt
In principle, this concept is great, but the amount of features a remote offers is going to be hard to replicate using a number of gestures that an older person can memorize. They will probably be even less incentivized to do this (learning new things sucks) if they already have a solution (remote), even though they really love you. I'm just warning you.
I recommend you use OpenNI and NITE. Note that the current version of OpenNI (2) does not have Kinect support. You need to use OpenNI 1.5.4 and look for the SensorKinect093 driver. There should be some gesture code that works for that (googling OpenNI Gesture yields a ton of results). If you're using something that expects OpenNI 2, be warned that you may have to write some glue code.
The basic control set would be Volume +/-, Channel +/-, Power on/off. But that will be frustrating if she wants to go from Channel 03 to 50.
I don't know how low-level you want to go, but a really, REALLY simple gesture recognize could look at horizontal and vertical swipes of the right hand exceeding a velocity threshold (averaged). Be warned: detected skeletons can get really wonky when people are sitting (that's actually a bit of what my PhD is on).
Currently Roland does not make drivers for Linux, so I am starting a project to write a driver for the Roland GR-55 Guitar Synthesizer, but after looking around, I find I have several options and not sure which is the best or most current method, so I thought I'd ask before waisting a lot of time on this.
This device uses USB, it controls the MIDI and Audio devices in the GR-55.
ALSA or libusb api are two choices; both are new to me; its been years since I wrote a device driver and it was for Unix back in the 80's, but I do know I can figure out how, once I know what tools to use, which I'm guessing both use C still; I have looked at the libusb api; very nice; but I have no idea about ALSA project; seems they are geared into getting modules into the kernel to achieve this.
I would like to find programmers that have worked with Roland like Device Drivers dealing with MIDI and Audio that might be able to help point me in the right direction; I have asked Roland for help; will be waiting for a reply, but not wanting to hold my breath, I think getting started would be my best option; even if they do help, they will only be suppling technical specs, which would be great.
I hope I gave enough details; not much else to say when asking a question about Device drivers.
Many sites and articles on getting widescreen monitors to work on notebooks in their native resolution mention something called the "Mode Removal Table" in the Video BIOS which specifically prevents certain video modes:
http://www.avsforum.com/avs-vb/showthread.php?t=947830
http://software.intel.com/en-us/forums/showthread.php?t=61326
http://forum.notebookreview.com/dell-xps-studio-xps/313573-xps-m1330-hdmi-hdmi-tv-issue-2.html
http://forums.entechtaiwan.com/index.php?action=printpage;topic=3363.0
Does such a thing really exist? The fix worked for me but I wanted to find out if I can read, modify, or work around this table. However I can't find any mention of it in the various VESA standards. Perhaps it actually goes by some other more cryptic name?
“Many sites and articles”? The first couple of dozen results are from you, and most of the rest are from that Intel article you mentioned or other people linking to that article.
You could always try asking someone who talks as though they know how to do it. There's another thread that discusses it—though it too has no information on the table, only a quick mention of it.
There does not seem to be any currently known way to read the GMA video BIOS. You would have to dump the BIOS and reverse-engineer it to figure out where the table is and how to interpret it. Unfortunately, even extracting it is difficult since nobody seems to have had enough interest in creating a tool to automate it. Looks, like you’ve got even more reversing to do. (Techincally, because the GMA is an integrated graphics-adapter, you'll need to extract the video BIOS from the system BIOS, then extract the table.)
Ramble: I have been goggling for the past ~week trying to get information on tablet programming for Linux. I am currently a student tasked with making a tablet application (mobile but tablet is the preferred device). I am allowed to program with Linux however the class instruction is based on Microsoft XP tablet input "Inking." I however would like to learn how to write a similar app in Linux ( I am going to attempt to make a gesture GUI for kismet [probably tie in air crack too, mostly just run scripts]).
Problem: My problem however is that the I cannot find any opensource gesture engines or similar tools to inking as far as Linux goes. I know that communities hate n00b questions but can you point me to some n00b xInput programming tutorials that include gestures. The best I found is how to doodle with a bitmap backing.
I'm sorry for n00bing out here, really I'm usually able to fend for my self.
OK, I don't know much, but I am moved by your anti-n00bness.
http://www.x.org/wiki/XOrgInputDriverSpec
It doesn't look like it's implemented yet, but there is some hope!
https://launchpad.net/canonical-multitouch <- canonical recently announced this, so there's not that much work yet
I don't know, man. You've got a tough question...
Recently, i began developing a driver of an embedded device running linux.
Until now i have only read about linux internals.
Having no prior experience in driver devlopment, i am finding it a tad difficult to land my first step.
I have downloaded the kernel source-code (v2.6.32).
I have read (skimped) Linux Device Drivers (3e)
I read a few related posts here on StackOverflow.
I understand that linux has a "monolithic" approach.
I have built kernel (included existing driver in menuconfig etc.)
I know the basics of kconfig and makefile files so that should not be a problem.
Can someone describe the structure (i.e. the inter-links)
of the various directories in the kernel-source code.
In other words, given a source-code file,
which other files would it refer to for related code
(The "#include"-s provide a partial idea)
Could someone please help me in getting a better idea?
Any help will be greatly appreciated
Thank You.
Given a C file, you have to look at the functions it calls and data structures it uses, rather than worrying about particular files.
There are two basic routes to developing your own device driver:
Take a driver that is similar to yours; strip out the code that isn't applicable to your device, and fill in new code for your device.
Start with the very basic pieces of a device driver, and add pieces a little at a time until your device begins to function.
The files that compose your driver will make more sense as you complete this process. Do consider what belongs in each file, but to some extent, dividing a driver among files is more an art than a science. Smaller drivers often fit into just one or two files.
A bit of design may also be good. Consider what you device does, and what your driver will need to do. Based on that, you should be able to map out what functions a device driver will need to have.
I also believe Linux Device Drivers, Third Edition may help you get on your way to driver development.
Linux files themselves include files based on what they do, what layer they are in, and what layer they access of the call stack. The Big Picture truly informs how each file is related to the next.
I had to fix a kernel driver once. My biggest tip (if you use vim) is to set it up with ctags so you can jump around the kernel source with ctrl-] every time you see a function you don't understand.