by Fritzoid » Mon Jul 16, 2007 12:46 pm
by Fritzoid
Mon Jul 16, 2007 12:46 pm
I missed the fact that the 0xD0 and 0xD1 commands stay in the loop! But not before I had disassembled the latest download and compared it to the source listing byte-by-byte. Then I went a litter farther, writing a small program which switches the RN into serial mode and throws some test commands at it. Some results so far...
1. 0xFA commands must be sent 4 times to stop IM command fetching. The MR3024 responds with 3 and sometimes 4 0xFA echos.
2. It takes 2 0xD0 commands in a row to get the ball rolling. The first one returns no data the second responds twice for a total of 4 0x00s. Sometimes the controller responds 0xB0 0xB0 and you can't get into serial mode without a power reset.
3. Even after sending a 0x6F the RN seems oblivious to input from the IR remote control.
4. 0xFn and 0xEn commands are not entirely equivalent. Here's a list of the commands I've tried so far...
0xF1 - Reads servo configuration data. Format 0xF1,addr,0x00,servo#.
Here addr is a one-byte data offset and servo# is a one-byte servo number. Data found from 0x00 to 0x2D. Returns one byte of data and one byte 0x03.
0xF2 - Writes configuration data!!! Format 0xF2,addr,data,servo#. Here addr is a one-byte offset, data is the new data byte and servo# is the selected servo number. This one is not for the faint of heart as the effect of changing the configuration without changing the checksum is unknown!!! Returns two bytes of 0x03.
0xF3 - Reads servo RAM. Format 0xF3,addr,0x00,servo#. Similar to 0xF1 except that the data comes from a different place.
0xF4 - Possibly writes to servo RAM. Format 0xF4,addr,data,servo#. Similar to the 0xF2 command. More investigation needed on this one.
0xF5 - Read servo position. Format 0xF5,0x00,0x00,servo#. This seems to be returning the target position rather than the current position. Response is two bytes of position data.
0xF6 - Move servo to position. Format 0xF6,poshi,poslo,servo#. Here poshi the the high-order byte of the position and poslo is the low-order byte. Returns two bytes of 0x03.
0xF7 - Read servo software level. Format 0xF7,0x00,0x00,servo#. Returns the one-byte software version number followed by 0x00. The current servo version is 1.08 encoded as 0x6C in the response.
0xF8 - Read current and voltage. Format 0xF8,0x00,0x00,servo#. Returns two bytes of data. This command needs more investigation to verify the results.
0xF9 - Unknown. Format 0xF9,0x00,0x00,servo#. Returns two bytes of 0x00. If this were like 0xE9 then it would return the current position but all I've seen is zeroes.
There's probably a lot more yet to be discovered

I missed the fact that the 0xD0 and 0xD1 commands stay in the loop! But not before I had disassembled the latest download and compared it to the source listing byte-by-byte. Then I went a litter farther, writing a small program which switches the RN into serial mode and throws some test commands at it. Some results so far...
1. 0xFA commands must be sent 4 times to stop IM command fetching. The MR3024 responds with 3 and sometimes 4 0xFA echos.
2. It takes 2 0xD0 commands in a row to get the ball rolling. The first one returns no data the second responds twice for a total of 4 0x00s. Sometimes the controller responds 0xB0 0xB0 and you can't get into serial mode without a power reset.
3. Even after sending a 0x6F the RN seems oblivious to input from the IR remote control.
4. 0xFn and 0xEn commands are not entirely equivalent. Here's a list of the commands I've tried so far...
0xF1 - Reads servo configuration data. Format 0xF1,addr,0x00,servo#.
Here addr is a one-byte data offset and servo# is a one-byte servo number. Data found from 0x00 to 0x2D. Returns one byte of data and one byte 0x03.
0xF2 - Writes configuration data!!! Format 0xF2,addr,data,servo#. Here addr is a one-byte offset, data is the new data byte and servo# is the selected servo number. This one is not for the faint of heart as the effect of changing the configuration without changing the checksum is unknown!!! Returns two bytes of 0x03.
0xF3 - Reads servo RAM. Format 0xF3,addr,0x00,servo#. Similar to 0xF1 except that the data comes from a different place.
0xF4 - Possibly writes to servo RAM. Format 0xF4,addr,data,servo#. Similar to the 0xF2 command. More investigation needed on this one.
0xF5 - Read servo position. Format 0xF5,0x00,0x00,servo#. This seems to be returning the target position rather than the current position. Response is two bytes of position data.
0xF6 - Move servo to position. Format 0xF6,poshi,poslo,servo#. Here poshi the the high-order byte of the position and poslo is the low-order byte. Returns two bytes of 0x03.
0xF7 - Read servo software level. Format 0xF7,0x00,0x00,servo#. Returns the one-byte software version number followed by 0x00. The current servo version is 1.08 encoded as 0x6C in the response.
0xF8 - Read current and voltage. Format 0xF8,0x00,0x00,servo#. Returns two bytes of data. This command needs more investigation to verify the results.
0xF9 - Unknown. Format 0xF9,0x00,0x00,servo#. Returns two bytes of 0x00. If this were like 0xE9 then it would return the current position but all I've seen is zeroes.
There's probably a lot more yet to be discovered
