Table of Contents

Controlling the Seed Robotics Hand using the Simple Text Protocol (STP)

All Seed Robotics products can be controlled using the Seed Robotics STP Protocol and they also have full support for the Dynamixel Protocol (versions 1 and 2).

On this document, we will focus on the STP protocol which is a simpler, lighter and easy to use approach to controlling the units.

The main advantage of the STP protocol is that you can quickly send commands to the unit and query status information using a direct Serial Connection and text commands.

When operating through the USB Connector, the unit creates a Virtual serial port on the host computer, to which you can connect at any Baud rate, up to 10Mbps.

When operating via Bluetooth (if installed), the unit uses the Bluetooth Serial Port Profile (SPP) to create a Virtual COMM port on the target device.
The Bluetooth interface can be used wirelessly with your computer and also your smartphone.

Introducing the STP

The protocol is pretty simple and straightforward and is built on the following foundations:

The description of the Control Table memory positions is available for each device:

Connecting to the hand

By default, the STP protocol is available over the USB and Bluetooth interfaces (Bluetooth may not be available if it is was not requested as an option).

To connect via USB:

To connect via Bluetooth (if installed in your unit):

Once you're connected, you're ready to start typing your commands.

Reading and Writing to the Control Tables

Unlike the Dynamixel protocol, in the STP protocol, we have a clear distinction if we want to read/write a byte or a word (2 bytes). If you examine the Control tables, there is a column named “Size” which indicates the number of bytes for that parameter. Size=1 means a byte, Size=2 means a word (2 bytes)

We recommend that you take time to examine the Control Tables to familiarize with the parameters that are BYTE or WORD.

To read and write to the control table, 4 commands are made available: reb and wrb to read and write a byte and rew and wrw to read and write a word. For the complete syntax, see the Console commands for your unit:

WRITING to a device

As an example, to move an Actuator with ID 2 to position 256, you would send the following commands:

Firstly we must set the Torque on, so we write the value 1 to memory position 24 (this is a Byte value):

wrb 2 24 1

Next, we write the desired Goal position (in this case 256). The goal position parameter is at Memory Position 30 and is a Word (2 byte value)

wrw 2 30 256

After sending each command, the slave acknowledges the command and replies with a status byte enclosed in brackets [ ]. This status byte is the Error bitmask and contains valuable information about the status of your servo.

READING from a device

As an example, to read the current Temperature of an Actuator with ID 4, you would send to the bus:

reb 4 43

When the slave receives the command it will return the value requested enclosed in brackets [ ] followed by the error bitmask also enclosed in brackets.

The returned Error Bitmask

After sending a command, a return byte is always sent, enclosed in [ ]. The return byte is a bitmask that contains the status of the servo. Data is returned as a decimal number that, once converted to binary can be interpreted as follows:

IMPORTANT: in the RH2D, using the Robotis XL-320 actuators, the error bitmask is different from the above. Please refer to the RH2D documentation and Control table for the XL-320 actuators for more information.

Extended commands for Online Diagnostics and Maintenance

The Console exposes specific command to assist in diagnosing your unit and re-configuring some of the options on the fly.

The go-to commands for Diagnostics are status and about.

The restart psu command helps you clear overload errors in the Internal Actuators without having to reset power on the entire bus. This is done by restarting only the built-in PSU that regulates power to the internal Actuators.

The setfan command helps you adjust the units' fan speed (on supported models) to improve thermal behaviour or reduce noise (depending on the usage scenario).

For a Complete list of commands, please see the List of Console Commands (for EROS architecture)

FAQ / Troubleshooting

If you are using a Serial Terminal make sure it set to use \n as a line terminator.

For example, for Termite, click “Settings” and under “Transmitted text”, select “Append LF”;
If using Putty, type Ctrl+J after typing your command, to send the “\n” character. Putty doesn't support adding “\n” automatically but pressing Ctrl+J sends a “\n” which has the same effect.
For any other Terminal program, please consult the instructions of the program.

Conclusion

The STP Protocol is as simple as it gets. It respects the Memory Mapped design of the actuators and provides an easy-to-use protocol to interface with the units.

The fact that all replies come enclosed in brackets [ ] makes it easy to parse when building your own program.