Serial connection issues

Use the following template to help create your post:

  1. What model of servo are you using?
    MX-28 AT protocol 2.0

  2. Describe your control environment. This includes the controller or interface, and any power source.
    U2D2 controller ,DELL i7 and Windows-10 , SMPG Source(by Robotis), C++

  3. Specify the operating mode for applicable models, and any firmware settings you are using.
    Position Control mode, Time-based profile

  4. Include pictures if possible.

  5. Include a full description of the issue.
    Updated the firmware to protocol version 2.0
    Finished my C++ setup for Dynamixel motors. When I tried to run read write on a single motor it was working fine but when I try to run the sync-write program it is throwing an error of unable to open the port. Individual motors are working fine but for serial connection it is giving the error. What might be the issue? (Wire connections are good as individual motors in daisy chain connection are working fine.)


  1. How many MX-28 DXLs are you actually using? As you already have the U2D2 module, I would suggest to use the Dynamixel Wizard 2 tool to check out your Daisy Chain of MX-28 AT to resolve any possible ID mis-identification and make sure that they work together OK first (DYNAMIXEL Wizard 2.0), before trying to debug your C++ program further.

  2. Are you using or modifying the ROBOTIS example program named “sync_read_write.cpp”? i.e. using the ROBOTIS Dynamixel SDK? And also are you writing your own functions to control the DXLs? I had used/modified this Dynamixel SDK example to program up to 12 XL-430s in Position Control mode and Time-Control profiles OK, but I had to move the various Port and Packet Handlers initialization steps (see picture enclosed below) from the Main Function to the Global Level for my program to work properly.

Thanks for the reply.

  1. I am using 3 MX-28 DXL’s in daisy chain with U2D2 controller. I have have run it using wizard 2.0
    Initially I was using a baudrate of 4.5 Mbps but when I changed it 57600, series connection was established.
    Does baudrate effect the connection in anyway?
  2. I am modifying the example code but I am facing some other issues in C++ code I will post it here by today.
1 Like


  1. YES. Master device must match the buadrate at the same speed.

  2. Waiting for you,

These are the errors am facing.
Also when I was using a baud rate of 4500000 serial connection failed to establish where as when I changed the baud rate to 57600 it was successfully connected. Did I miss something as I couldn’t figure the behavior.

When you mean master device is it the controller or the laptop. And can you please elaborate a little more on the topic.
Thank you


As it does not use clock signal, DYNAMIXEL use Asynchronous Serial Communication with 8bit, 1stop, No Parity, you have to match Baudrate. See Asynchronous Serial Communication for more details.
DYNAMIXEL has its own baudrate but it can be settable via control table. See MX-28T/R/AT/AR(2.0)

If you would like to use higher baudrate, you have to set the Baudrate of DYNAMIXEL as 4.5M.

  • Master device can be meant as various concept. Controller or Your PC which really order command what to do.

Hope this description helpful,

Asynchronous Serial Communication with 8bit, 1stop, No Parity this part was really something I didn’t know about and will look into the link you have given.
Baud rate was set to 4.5 in control table using Wizard before running the C++ program, though I faced issues. But now I have posted the screenshots of the error am facing about some buffer overrun or something.

@rajkiran , @Yogurt_Man
I am curious about these errors and I do not have MX-28, but I do have 2XL-430-W350. So I made the following experiment, hopefully it may be useful to you:
I used Dynamixel Wizard 2.0 to set my 2XL-430 to 4.5 Mbps.
I am using a Lenovo Windows 10 PC and Microsoft Visual Studio 2019 (both latest versions).
I downloaded DXL-SDK 3.7.51 from the ROBOTIS GIT-HUB and unzip it as normal.
I used this ROBOTIS YouTube video DYNAMIXEL SDK Walkthrough C++: Software Preparation - Windows - YouTube. to install the DXL Library. As the SLN is made with VS-2015, VS-2019 offered to update the SLN and I let VS-2019 do what it wanted.
When I built the DXL library with VS-2019 with Win64 option, it complained a lots, about 21 warnings
but it created the DLL OK - see screenshot below

I also built the DXL library with VS-2019 for Win32, that went very well - no complaints from VS-2019 at all.

Then I followed this YouTube video DYNAMIXEL SDK Walkthrough C++: ReadWrite Example - Windows - YouTube but applied it to “sync_read_write.cpp” in both Win32 and Win64 modes.

I had to change some Control Table addresses to fit with my 2XL-430 actuator

Then I compiled and ran both Win64 and Win32 release versions for “sync_read_write.cpp” OK at 4.5 Mbps. Absolutely no error at compile time nor at execute time.

Which Visual Studio version are you using? I did not have to change or set anything about the COM port used for the U2D2 via Windows Device Manager at all.

Hope that my experiment helped!

1 Like

Well the issue am facing now is not with baud rate. It is some data type error or something where am getting buffer over run and corrupted heap something like that. I have posted screenshots of the same in the thread. @Yogurt_Man

When looking at your screenshots more closely, it looks like that you are using the Profile “Release - x64” and the error message is about a Win32 DLL. Have you tried switching to “Release - x86” to use a Win32 profile to see if this error would go away?

Did you build the DXL-SDK library for Win64 or Win32?

I didn’t try that way but I built it for Win 64