FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Integration
(Moderators: fry, REAS)
   Interpretting Serial Input (reverse engineering)
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Interpretting Serial Input (reverse engineering)  (Read 820 times)
kevin

WWW
Interpretting Serial Input (reverse engineering)
« on: Mar 12th, 2004, 1:34am »

Hi,
 
I'm trying to get processing to work with an old serial mouse I have. An experiment with hardware hacking.
 
From printing the output of serial when a serial event happens I've got a rough idea of what patterns do what.
 
However, when trying to interpret them it's a little more difficult. The output sends series of digits, sometimes 3, sometimes 4. There doesn't seem to be a distinguishing block from which to parse it. I only did it by looking at time codes when the mouse buttons were pressed etc...
 
Has anyone got any tips on how to figure this out. Is there non-printable codes that it sends too.
 
Thanks,
 
- Kevin, busy reading up on mouse protocols.
« Last Edit: Mar 17th, 2004, 1:53pm by kevin »  
michael05

WWW
Re: Interpretting Serial Input (reverse engineerin
« Reply #1 on: Mar 12th, 2004, 11:16am »

i tried to use a freepen device. but i could not interpret the signals, too.
 
http://processing.org/discourse/yabb/board_Contribution_Physica_l_action_display_num_1071402882.html
 
the results were really unstable. one button returned different signals.
 
the interpretation of a sgi-serial device was much easier. after an initialization string it returned hex values for each wheel (0-255 -> 0-360 degrees).
 

°°°°°°°°°°°°°°°°°°°°
http://www.m05.de
michael05

WWW
Re: Interpretting Serial Input (reverse engineerin
« Reply #2 on: Mar 12th, 2004, 12:08pm »

here is a description of the pc mouse signal:
http://www.hut.fi/~then/mytexts/mouse.html
 
my mouse returns just 6 values 128 or 0.
 
128, 0, 0, 0, 0, 128
0, 0, 0, 0, 0, 128
...
 

°°°°°°°°°°°°°°°°°°°°
http://www.m05.de
fry


WWW
Re: Interpretting Serial Input (reverse engineerin
« Reply #3 on: Mar 12th, 2004, 5:23pm »

a few notes on serial:  
 
+ almost all the values you get will be unprintable, so you should just be printing the values from 'serial' directly. just do println(serial) to see the stream.
 
+ if you're getting inconsistent values, that often means you're communicating with the port at the wrong speed or wrong settings (for parity, number of data bits, etc).  
 
+ for things like a pc serial mouse, you should be able to find specs online to get you started for the basics, i've seen these before but don't have a link offhand.
 
+ in addition, when dealing with serial devices, things can be confusing because sometimes the device is in the middle of a packet of data (or even off by a few bits) as your processing app is started. if possible, try to start the app in p5, then start the serial device, to ensure that things are sync'ed. prolly can't do that for a mouse, but in general, it's a useful thing.
 
kevin

WWW
Re: Interpretting Serial Input (reverse engineerin
« Reply #4 on: Mar 17th, 2004, 1:55pm »

Thanks all. Some useful tips there.
 
Pages: 1 

« Previous topic | Next topic »