And so. I've reprogrammed UART to 7data bits and 1stop bit, following the documentation in this mode mouse should send 3 bytes. I've created my serial mouse service but it didn't work so i've debugged it.
As far as i know mouse first byte should containt it's 6th bit equal to logical 1, i've printed all 3 bytes in binary and i was surprised that when i press a key, mouse send 3 bytes and all contains their 6th bits equal to 1. I can't get it, i see that button bits are changed when i press a key, but why other 2 bytes ar very similar to the 1st(not equal but similar) ? When i just move the mouse sometimes all bytes contains 0's.
So in some word, the problem is that my mouse doesn't send bytes in the right order, sometimes it send 3 bytes as all of them are 1st bytes and etc....
Serial Mouse
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Serial Mouse
beware that different serial mice may implement different protocols (yeah, that's stupid, but that's the way it is), so you might want to lookup for drivers specific to your mouse (or mouse model).
Re:Serial Mouse
You haven't said anything about baud rate, it must be set properly too (1200 bps IIRC).
Re:Serial Mouse
And i think, that i'm gonna to work on another devices drivers, so lotsa work to do... But so much fun .