Hey everyone,
I finally got back to my RS232-sniffer project... found that I swapped
the tx and rx lines on the USART (Serial3 in arduino-mega-land) and
left out the power decoupling caps.

After some rework (http://imgur.com/ZxrTJ5V) and headbanging I
realized I forgot to flip the GPIO pins that were attached to ONLINE
and SHUTDOWN lines on the RS232-to-TTL converter chips and things seem
to be working as far as getting data from Python to the Arduino and
back again.

So next was to try and get the serial mouse protocol working... I
found this page which seemed good enough to start:
http://paulbourke.net/dataformats/serialmouse/

I wrote some Python code to take in the X and Y movement amounts, and
two booleans for the mouse buttons, then do some binary masking,
shifting, etc to get the 3 bytes needed.

The protocol says "7 bit, 1 stop bit, no parity", and when I get the
byte in Arduino and println(inByte, BIN) I see the 7 bits expected,
but when I send that byte back out of the USART, I get the last bit as
being a 1... now since I know this should only be 7 bits not 8, I
figure that's just a library glitch/anomalie (making the unused bit a
1 instead of a 0).

The real issue now is, how the heck do I test a serial mouse in this
day and age? The Ubuntu wiki page lists some methods, but the top-most
one required restarting which seems unnecessary... and didn't work
anyway (though now I realize I had the baud set on 9600 but that mouse
page says it should be 1200).

TLDR;
Does anyone know of a better way to test/use a serial-mouse... or at
least print out the decoded data (with a program that I didn't write!)
by attaching to a serial-port (/dev/ttyUSB3 is where the USB to serial
converter is showing up as... this is secondary to the Arduino's USB
to Serial, which is showing up on /dev/ACM0)

-- 
-Nathan
_______________________________________________
dorkbotpdx-blabber mailing list
[email protected]
http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber

Reply via email to