 |
Author |
Topic: Interpretting Serial Input (reverse engineering) (Read 820 times) |
|
kevin
|
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
|
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
|
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
|
Re: Interpretting Serial Input (reverse engineerin
« Reply #4 on: Mar 17th, 2004, 1:55pm » |
|
Thanks all. Some useful tips there.
|
|
|
|
|