It seems to be sending me 'd' packets (lowercase d) but rather than being the large magellan-style crunch-the-nibbles 26-byte packets, I'm getting 16-byte packets starting with 'd' and ending with '\r'. That leaves 14 bytes to make six values.
The zero value seems to be
Code: Select all
b'd\xe0\x80\xe0\x80\xe0\x80\xe0\x80\xe0\x80\xe0\x80\xa1\x80\r'
And decoding the two-byte axes is vexing me as well. The rightmost bits count about as I would expect, but the leftmost are stranger. For example, if I look at the first two bytes (representing the "toward and away" axis) the first one (looks like an MSB, normally
Code: Select all
\xe0
Code: Select all
0b11100000
Code: Select all
# e0 1110 0001
# a1 1010 0001
# a2 1010 0010
# 63 0110 0011
# a4 1010 0100
# 65 0110 0101
# 66 0110 0110
Code: Select all
# 5f 0101 1111
# 9e 1001 1110
# 9d 1001 1101
# dc 1101 1100
# 9b 1001 1011
# 5a 0101 1010
...and either way, no idea what to do with bytes 13 and 14, which change somewhat with everything else.
Does this protocol sound like anything anyone's seen here? I've got the buttons decoded just fine, but the ball packet is completely eluding me; the only code or documentation that references a 'd' packet is the magellan protocol with the nibble-crunching, but that's not what I'm seeing with this. Any ideas?