LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-07-2006, 02:58 PM   #1
nobodynews
LQ Newbie
 
Registered: Feb 2006
Location: Michigan
Distribution: Slackware 10.2
Posts: 2

Rep: Reputation: 0
Linux "Driver"->simulating a mouse


First off, I looked around and didn't see anything about homework related questions being bad. I don't expect any specific answers just good websites that would give me some idea on where to start my project.

Anyway, I am taking an operating systems class and my partner and myself decided on the lofty goal of writing a driver that treats a usb-enabled PlayStation Dance Dance Revolution pad and/or controller as an input device, in this case a mouse.

I don't know a whole lot about Linux I'm basically a newbie in any devolopment sense, but I figured there must be some way to simulate a mouse-style event in software. The idea is we figure out how to access the device, how to move the mouse, and then combine both sections.

If anyone has good websites that may help I'd really appreciate it. Otherwise I'll just get my google-fu on. We have a few months so this isn't time critical. Thanks!

Oh and information will be supplied upon request.
 
Old 02-07-2006, 03:31 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Hi, welcome to LQ,

And you can't have been looking around very thoroughly, because
it's actually in our rules which you read and agreed to... ;}

Verbatim it says:
Quote:
Do not expect LQ members to do your homework - you will learn much more by doing it yourself.

That aside: good luck with your project.


Cheers,
Tink
 
Old 02-08-2006, 09:06 AM   #3
RedShirt
Senior Member
 
Registered: Oct 2005
Location: Denver
Distribution: Sabayon 3.5Loop2
Posts: 1,150

Rep: Reputation: 45
I have no qualms pointing out a few tips though...

Once you have the connection set up to you PC, you can use the xorg.conf file to specify a devive and a location and and an xmodmap to specify actions associated with buttons on devices. I would think you would need to make your own xmodmap and possible your own device type for use in the xorg.conf.

Good luck.
 
Old 02-08-2006, 11:03 AM   #4
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,063

Rep: Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974
In this case, I think that seeking to use the newsgroup for research, for a project that is "two or three months off," is a reasonable use of the forum.

I advise that the moderators should therefore permit this thread to continue.

If nobodynews were searching for an answer to be served-up on a platter, then that obviously would be cheating. But he isn't. The question is, "I've bitten off more than I can chew and how do I go about doing this," then that's really just using the Internet as the research-resource that it is. This is a reasonable, "high information content" place to look, and nobodynews is being entirely up-front about it.

I will put my community-college-instructor hat on for just a moment, however, and emphasize that the first resource that you should always turn to is your instructor. There are two good reasons:
  • By and large, instructors do know what they are talking about.
  • It is critical that an instructor be placed in the loop, and early enough to be able to actually help.
An instructor can easily be working from week-to-week and be unaware of what is actually being absorbed and what is not. This is the main reason why I use pop-quizzes almost every single week.

It is good that you have started early on this and that you are holding your own feet to the fire .. and I trust that you and your lab-partner will continue to do so.

-----

You have two major issues:
  1. You must enable Linux to recognize the USB device and to load the appropriate driver for it, allowing the device to be communicated-with. Were I grading this assignment, it would not be good-enough if "it happened to work okay on my system." I would want you to demonstrate that you understand exactly what various Linuxes do when a device is attached or removed, and that you could tell me how to successfully install that support on a machine where that support did not now exist. I would expect you to tell me how to debug it.
  2. Once Linux recognizes the device, it will be X-Windows (or X-Org) which will actually be doing the talking, and producing mouse events. Again, I would expect for you to be able to demonstrate how that part works, both for X-Windows and for X-Org if they be different. I would expect you to be able to install that support and to debug it.
  3. You may get lucky. You may find that gamesters have already done the work for you. No matter! If the Advance Attack Team from Emperor Zubo's Army from the Planet Frobozz happened to accidentally beam their USB-enabled neutralizer-device onto your doorstep, how would you interface that device to your system? In other words, demonstrate an abstract, adaptable understanding of the topic.
Aren't you glad I'm not your teacher? Be sure to talk it over, though, with your teacher... early, frequently, intelligently, and in-depth.
 
Old 02-09-2006, 11:48 AM   #5
nobodynews
LQ Newbie
 
Registered: Feb 2006
Location: Michigan
Distribution: Slackware 10.2
Posts: 2

Original Poster
Rep: Reputation: 0
Well, thank you all very much for these tips and suggestions and for being underestanding at my straddling the line on the 'no homework questions' rule I somehow missed when browsing around. I pretty much never read the terms of agreement on anything(apparently I should at least skim them from now on!), instead I read the sticky thread "Please READ this before posting!" and didn't see anything suggesting homework is off-limits. My mistake on not reading the rules I agreed to be bound by though. I'll take a look at them sometime this weekend before I post more and dig myself into a larger hole!

Also, I'll get myself a little more situated here and read some of the threads to get a better idea of the atmosphere so I don't end up being 'that guy'. You know: 'THAT guy'. With any luck by the end of this semester I can be a well-thought-of member of the linux development community. Cheers.
 
Old 02-09-2006, 12:59 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Excellent 2nd post, you're most welcome :}


Cheers,
Tink
 
Old 11-01-2007, 04:13 PM   #7
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
Haha I did a similar project a couple of years ago for an OS class. My group wrote a driver for the Xbox remote so that it would work with XMMS and it also had other functions to open file menus and yes, even emulate the mouse (complete with left, right, and middle clicking). We meant to publish it, but we never took the time to get it a little cleaned up (add acceleration to the mouse feature and make sure the module didn't conflict with the current xpad module).

My suggestion to anyone reading this who is interested in a similar project is to first learn how to write some kernel code and look for existing modules in the kernel that are similar. The Xbox remote driver that I helped write was essentially a very heavily modified version of the xbox controller module. Looking at a couple of mouse drivers helped me to understand how to write my own.

happy hacking!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". HELP! badgerbox76 Linux - Newbie 35 03-08-2007 02:27 AM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". badgerbox76 Linux - Games 13 01-11-2006 04:47 PM
k3b: "error decoding audio tracks" and "could not unlock cd driver" lefty.crupps Linux - Software 7 10-13-2005 11:29 AM
suse ati driver "Xlib: extension "XiG-SUNDRY-NONSTANDARD" missing" madcow007 Linux - Hardware 0 03-06-2004 02:53 PM


All times are GMT -5. The time now is 03:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration