View Full Version : USB2Dynamixel/AX12/Linux: COMM_RXTIMEOUT: There is no status packet

12-12-2015, 12:08 PM
I purchased a AX-12 servo, as well as a USB2Dynamixel controller, from Trossen.

Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
CPU: i686

I have hooked them up to my desktop PC via USB port.

I loaded the ftdi_sio kernel module.

The kernel does see the controller:

Dec 12 12:03:46 bling kernel: [540393.144200] usb 1-1.3: new full-speed USB device number 11 using ehci_hcdDec 12 12:03:46 bling kernel: [540393.245001] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
Dec 12 12:03:46 bling kernel: [540393.245020] usb 1-1.3: Detected FT232RL
Dec 12 12:03:46 bling kernel: [540393.245022] usb 1-1.3: Number of endpoints 2
Dec 12 12:03:46 bling kernel: [540393.245023] usb 1-1.3: Endpoint 1 MaxPacketSize 64
Dec 12 12:03:46 bling kernel: [540393.245024] usb 1-1.3: Endpoint 2 MaxPacketSize 64
Dec 12 12:03:46 bling kernel: [540393.245025] usb 1-1.3: Setting MaxPacketSize 64
Dec 12 12:03:46 bling kernel: [540393.245389] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

I have attached the AX-12 servo to the controller and supplied it with 12.00 V power from my power supply.

I have also downloaded and compiled the Dynamixel SDK.

However, I have a problem when I run any example, for example SyncWrite.

The error is: COMM_RXTIMEOUT: There is no status packet!

I have tried to modify timeout value in the library. The program does wait visibly a lot longer, with the same result. So, the problem is NOT because the timeout is set too low.

I wanted to know the following:

1) How can I fix this to make any sample program interact with the controller without timing out
2) How can I interrogate the controller to find out its state, connected servos, etc
3) What are the samples called SyncWrite and ReadWrite actually supposed to DO?

Please note that I do not have Microsoft Windows.


12-12-2015, 01:29 PM
I may be wrong, but I don't believe Sync writes do not produce a status packet.

Sorry I can not help much more on this as I don't use their libraries... I sort of hacked up my own versions of libraries with bits and pieces I borrowed from different places. I have most of it up in my Raspberry Pi project (https://github.com/KurtE/Raspberry_Pi).

There is lots of information about how to talk to the servos up in the AX12 manual
(http://www.trossenrobotics.com/images/productdownloads/AX-12%28English%29.pdf)Example Syncwrite is talked about in section 4-6.

12-12-2015, 03:14 PM
OK, what program DOES produce a status packet? I just want to connect to the dynamixel and get status, right now.

12-12-2015, 04:49 PM
Lots of programs/calls generate status packets, depending on your hardware configuration and the like...

In order for others to help here, it always helps to have enough information. From your description, I am assuming you only have one servo connected up to the USB2Dynamixel and is in it's default shipped state of ID=1, communications set for 1mbs...
Also that you are following the stuff in the Robotis documention, such as: http://support.robotis.com/en/software/dynamixel_sdk/usb2dynamixel/linux/gcc.htm

If you are having problems with a specific example program, it would help if you would include a listing of the program, plus description of hardware (you have most of it here.

For example the Reading present position should work, if everything is setup properly, as long as:
PresentPos = dxl_read_word( DEFAULT_ID, P_PRESENT_POSITION_L );

DEFAULT_ID is equal to 1. Note: if there are no servos on your buss with ID=1 or there are multiple servos on your buss with ID=1, then it may not receive a response.

Robotis has programs out there that allow you to query what is there and update stuff. Again I normally run my own stuff, such as my AX12 Test program that is part of the github project I linked to earlier. Note: this program is setup for some of my other projects such as Hexapod, Quad or HROS1, and in several of these configurations, I don't be default query ID=1 as I have run into issues in the past where a servo may get reset and revert to ID=1, which would conflict with my real servo #1, so I tried to avoid that issue... Also not sure if I have all of my Makefiles setup to compile for I686.

Good luck

12-12-2015, 05:14 PM
If you have more than one Dynamixel on the chain did you set the ID's different? Also did you make sure the baud rate was correct? the only program that will send you a status packet back I in the SDK is readWrite I believe. Sync_write will not.

12-12-2015, 11:20 PM
Ping or Read are the best ways to see if a servo is there at all.

And start with a single servo!

12-13-2015, 08:23 AM
Hi guys. Thanks a lot for replying. Here's my detailed answer and more questions.

* I have taken these servos "out of the box" after buying them from Trossen, and did not modify or reprogram them in any way
* Only ONE servo is connected to the USB2Dynamixel controller
* The selector switch on USB2Dynamixel is in the RS232 position
* ReadWrite is the test program that attempts to read the servo status. Here's a line from it that does what you mentioned above:
PresentPos = dxl_read_word( DEFAULT_ID, P_PRESENT_POSITION_L );

That program ReadWrite is NOT WORKING and printing an error: COMM_RXTIMEOUT: There is no status packet!
I would like to know hot to fix and troubleshoot that.

Also, jwatte mentioned a "Ping" program, what is it and where can I find it?

Also, where can I find more programs for talking to servos, like KurtEck mentioned?

All I want is to get that stuff to work, so far nothing is really working.

12-13-2015, 01:07 PM
So just a sanity check.

When you apply power to the servo does the red light flash once? (Which let's you know it is getting power.)

12-13-2015, 06:28 PM
Also, jwatte mentioned a "Ping" program, what is it and where can I find it?

Actually, I was suggesting the PING dynamixel command. (read word is another Dynamixel command.)

See manual:


12-13-2015, 07:52 PM
So just a sanity check.

When you apply power to the servo does the red light flash once? (Which let's you know it is getting power.)

Yes, it does flash once.

12-14-2015, 09:22 AM
I assume you have tried with multiple servos. It is also slightly possible that the servos were initialized to different id's, especially if this was part of some kit for some robot. I often try to run some different diagnostic programs. Often I hack up my own.

For example you could modify the Robotis Read/Write example to try to scan through all of the possible servos to see if it finds any. Could use the ping or could query a register. Below is a quick and dirty I did which reads the positions... It build on a copy of linux (running on my Mac under Parallels). I did not go dig up my USB2Dynamixel, so did not test if it fully works or not. But you might give it a try. Note: in the comments it prints out a message for every possible servo, if I were running it in a normal case I would probably comment out the error case and only print something if the read of a register succeeds

//################################################## ########
//## R O B O T I S ##
//## ReadWrite Example code for Dynamixel. ##
//## Hacked up to scan for servos...
//## 2009.11.10 ##
//################################################## ########
#include <stdio.h>
#include <termio.h>
#include <unistd.h>
#include <dynamixel.h>

// Control table address
#define P_GOAL_POSITION_L 30
#define P_GOAL_POSITION_H 31
#define P_MOVING 46

// Defulat setting
#define DEFAULT_BAUDNUM 1 // 1Mbps
#define DEFAULT_ID 1

int main()
int baudnum = 1;
int deviceIndex = 0;
int PresentPos;
int CommStatus;
int id;

printf( "\n\nScan Servos\n\n" );
///////// Open USB2Dynamixel ////////////
if( dxl_initialize(deviceIndex, baudnum) == 0 )
printf( "Failed to open USB2Dynamixel!\n" );
printf( "Press Enter key to terminate...\n" );
return 0;
printf( "Succeed to open USB2Dynamixel!\n" );

for (id=1; id < 253; id++)
// Read present position
PresentPos = dxl_read_word( DEFAULT_ID, P_PRESENT_POSITION_L );
CommStatus = dxl_get_result();

if( CommStatus == COMM_RXSUCCESS )
printf( "%d : %d\n",id, PresentPos );
// Comment out below to only see which servos are found
printf( "%d : failed(%d)\n", id, CommStatus );

// Close device
printf( "Scan completed: Press Enter key to terminate...\n" );
return 0;

12-17-2015, 11:13 PM
OK, I finally figured it out. The reason for this was that I incorrectly connected the power cable. I do recall having meticulously followed some instruction, which turned out to be incorrect. But, no matter, I have it right and I am happy.

I also wrote a command line utility that takes the servo ID, and the goal position for that servo, and instructs said servo to take the goal position.

The entire robot program may be just a shell script calling this utility for various servo joints.

Here's a video of it executing: