by PedroR » Thu May 12, 2011 4:53 pm
by PedroR
Thu May 12, 2011 4:53 pm
Ah I see.
Thanks i-Bot!
I've been doing some reverse engineering of my own and
it seems that the Remotes don't behave exactly as described in the docs (page 59 of the C source manual).
We have 2 remotes at the office so I could experiment with 2 different ones.
Apparently:
-
Byte 1 is the Remote Control ID and not Byte 3. (at least it's the only thing that changes if you change remotes)
- Byte 2 seems to always be 01000000 (<strike>not sure if</strike> this means 2 <strike>or 64 though...</strike>).
The docs don't specify what this should be but the sample code makes use of this data to verify if the Robot knows this remote.
- Byte 3 seems to always be 0
The docs say this would be the Remote Control ID but I believe it's wrong (it seems it's byte 1) and the docs don't specify what Byte 1 should be either. Again, the sample code makes use of this data to verify if the Robot knows this remote.
- Byte 4 is the data Byte as documented
The order of the bits seems to be reversed (I'm not sure if this is correct though; probably a normal practice in IR communications but a newbie here).
From what I understand you receive the bytes in the correct sequence 1, 2, 3 , 4.
But each byte seems to have the least significant bit on the left (bits coming in reverse order) so for the STOP button I'm seeing the bits comming in this order 1 1 1 0 0 0 0 0.
<strike>If you make it into 11100000 this is 224.</strike>
If you reverse it, you get 00000111, which is 7 (STOP button) and corresponds to the code seen on the Serial Remocon Protocol as well.
[EDIT] I've confirmed it. Found the IR constants in the Sample C code and they're the same as those explained here http://robosavvy.com/RoboSavvyPages/Rob ... ommand.pdf
So I'm definitely receiving the bits from the least significant to the most significant. [/EDIT]
Other interesting bits:
- There always seems to be a final pulse/rise of 500us when the remote finishes sending everything
- There seems to be an initial pulse/rise of varying length but maybe this is noise I'm seeing.
I have some Excel Sheets with the analysis of the data and timings of rise and falls.
I won't be posting them as it's probably basic for most of you by now but if you'd like I can make them available.
Regards
Pedro.
Ah I see.
Thanks i-Bot!
I've been doing some reverse engineering of my own and
it seems that the Remotes don't behave exactly as described in the docs (page 59 of the C source manual).
We have 2 remotes at the office so I could experiment with 2 different ones.
Apparently:
-
Byte 1 is the Remote Control ID and not Byte 3. (at least it's the only thing that changes if you change remotes)
- Byte 2 seems to always be 01000000 (<strike>not sure if</strike> this means 2 <strike>or 64 though...</strike>).
The docs don't specify what this should be but the sample code makes use of this data to verify if the Robot knows this remote.
- Byte 3 seems to always be 0
The docs say this would be the Remote Control ID but I believe it's wrong (it seems it's byte 1) and the docs don't specify what Byte 1 should be either. Again, the sample code makes use of this data to verify if the Robot knows this remote.
- Byte 4 is the data Byte as documented
The order of the bits seems to be reversed (I'm not sure if this is correct though; probably a normal practice in IR communications but a newbie here).
From what I understand you receive the bytes in the correct sequence 1, 2, 3 , 4.
But each byte seems to have the least significant bit on the left (bits coming in reverse order) so for the STOP button I'm seeing the bits comming in this order 1 1 1 0 0 0 0 0.
<strike>If you make it into 11100000 this is 224.</strike>
If you reverse it, you get 00000111, which is 7 (STOP button) and corresponds to the code seen on the Serial Remocon Protocol as well.
[EDIT] I've confirmed it. Found the IR constants in the Sample C code and they're the same as those explained here http://robosavvy.com/RoboSavvyPages/Rob ... ommand.pdf
So I'm definitely receiving the bits from the least significant to the most significant. [/EDIT]
Other interesting bits:
- There always seems to be a final pulse/rise of 500us when the remote finishes sending everything
- There seems to be an initial pulse/rise of varying length but maybe this is noise I'm seeing.
I have some Excel Sheets with the analysis of the data and timings of rise and falls.
I won't be posting them as it's probably basic for most of you by now but if you'd like I can make them available.
Regards
Pedro.