LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2007, 06:17 AM   #1
fuzzyash
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Fedora Core 4
Posts: 184

Rep: Reputation: 30
USB Optical Mouse Data Acquisition


Hi All,

I am looking for a way to view the raw data being sent from my USB optical mouse.

A little background on why:
I want to use the optical reader as a linear position sensor for a CNC project I am working on. I figure it would make a good position feedback sensor.

I've been googling for a while but haven't found exactly what I'm looking for.

Even better would be if someone out there could point me to a site that explains how the data is encoded. I know how the device itself works but nothing about the way the data is sent to the PC.

Thanks
 
Old 03-11-2007, 06:38 AM   #2
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Quote:
Originally Posted by fuzzyash
Hi All,

I am looking for a way to view the raw data being sent from my USB optical mouse.

A little background on why:
I want to use the optical reader as a linear position sensor for a CNC project I am working on. I figure it would make a good position feedback sensor.

I've been googling for a while but haven't found exactly what I'm looking for.

Even better would be if someone out there could point me to a site that explains how the data is encoded. I know how the device itself works but nothing about the way the data is sent to the PC.

Thanks
An optical mouse is likely to be a standard USB HID device. Maybe this link- www.usb.org/developers/devclass_docs/HID1_11.pdf - will help you.
In fact, you may be able to get some implementation information by getting the kernel sources, and starting at the file "usbmouse.c" - which is under drivers/usb/input.

Cheers,
Danny
 
Old 03-13-2007, 06:26 AM   #3
fuzzyash
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Fedora Core 4
Posts: 184

Original Poster
Rep: Reputation: 30
Hmmm...

Thanks dannystaple. I guess thats exactly what I asked for but far more in depth than what I'm looking for!

Without having to learn all the internal workings of the USB protocol & then all the mouse workings is there an easy way of acquiring just the X/Y motion information from an optical mouse, say by simply scanning for every 5th byte (just grasping at thin air here!) or something?? I would like not to have the mouse plugged into a USB port but wired into a simple data acquisition PCB of my own design.

Does anyone know of any How-Does-It-Work style sites out there that this info might reside on??

Spose I'm just hoping it's going to be simple enough to be viable to use!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb optical mouse ftbreak Slackware 5 02-05-2005 08:24 PM
Use a usb optical mouse nmares Linux - Hardware 3 09-08-2004 01:42 AM
Logitech USB optical mouse fails with flaky usb tisource Linux - Hardware 2 06-20-2004 11:26 PM
Optical USB mouse theearp Mandriva 16 01-10-2004 07:18 PM
optical usb mouse TankT101 Linux - Hardware 3 08-07-2003 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration