Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Dynamixel bus monitor

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
8 postsPage 1 of 1
8 postsPage 1 of 1

Dynamixel bus monitor

Post by Fritzoid » Sat Apr 17, 2010 3:16 pm

Post by Fritzoid
Sat Apr 17, 2010 3:16 pm

Debugging problems in Bioloid hardware and software can be a challenge. Often you need to see the packets and their responses from the dynamixels. Some of you savvy roboteers my have used RoboPlus terminal in manage mode to send commands and view their responses. A few of you might even know about the bootloader's MON command which does about the same thing. The problem with both of these functions is that they take a long time to format and transmit the messages back to the PC. They also can't help you in Play mode.

What you really want is some kind of all-purpose sniffer for the dynamixel bus. Here's what I came up with.

Take your USB2Dynamixel (in TTL mode) and wire it to an available connector on the robot. The last servo on an arm or the unused connector on the top of the CM-510 are convienient places to attach it. Now start up a serial port monitor. I use the HHD Free Serial Port Monitor (no link). After the monitor is attached and configured to the correct serial port you need to start up RoboPlus terminal. This will probably come up connected to the wrong port so disconnect if you are already connected. Then reconfigure the connection to use the USB2Dynamixel port number at 1Mb (1000000 bps).

You can run another terminal session on the regular port number at 56Kb or you can use any of the other RoboPlus software at the same time. Alternatively you can just press the buttons on the controller to initiate a test. In any event, all the traffic on the dynamixel bus will be displayed on the terminal session. Of course it will be largely readable in RoboPlus, that's why I use the port monitor. This displays the data in hexadecimal without any formatting, just what I needed.

The result is a real-time dynamixel bus monitor using just the stuff lying on my desk.

When your done, remember to end the terminal session BEFORE you end the port monitor.
Debugging problems in Bioloid hardware and software can be a challenge. Often you need to see the packets and their responses from the dynamixels. Some of you savvy roboteers my have used RoboPlus terminal in manage mode to send commands and view their responses. A few of you might even know about the bootloader's MON command which does about the same thing. The problem with both of these functions is that they take a long time to format and transmit the messages back to the PC. They also can't help you in Play mode.

What you really want is some kind of all-purpose sniffer for the dynamixel bus. Here's what I came up with.

Take your USB2Dynamixel (in TTL mode) and wire it to an available connector on the robot. The last servo on an arm or the unused connector on the top of the CM-510 are convienient places to attach it. Now start up a serial port monitor. I use the HHD Free Serial Port Monitor (no link). After the monitor is attached and configured to the correct serial port you need to start up RoboPlus terminal. This will probably come up connected to the wrong port so disconnect if you are already connected. Then reconfigure the connection to use the USB2Dynamixel port number at 1Mb (1000000 bps).

You can run another terminal session on the regular port number at 56Kb or you can use any of the other RoboPlus software at the same time. Alternatively you can just press the buttons on the controller to initiate a test. In any event, all the traffic on the dynamixel bus will be displayed on the terminal session. Of course it will be largely readable in RoboPlus, that's why I use the port monitor. This displays the data in hexadecimal without any formatting, just what I needed.

The result is a real-time dynamixel bus monitor using just the stuff lying on my desk.

When your done, remember to end the terminal session BEFORE you end the port monitor.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by billyzelsnack » Sat Apr 17, 2010 4:55 pm

Post by billyzelsnack
Sat Apr 17, 2010 4:55 pm

I don't understand what is going on. You have two programs connected to the same serial port? I did not think that was possible.
I don't understand what is going on. You have two programs connected to the same serial port? I did not think that was possible.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by MikeG » Sat Apr 17, 2010 10:41 pm

Post by MikeG
Sat Apr 17, 2010 10:41 pm

Yeah, I'm not following either.

Serial port monitors are great for logging I/O and figuring out what is being passed. You can only monitor the software/hardware connected to a particular port.

I built a simple open source C# project that helps build instruction packets. You kinda have to have an idea what you're doing though.
http://www.agaverobotics.com/services/d ... fault.aspx
Yeah, I'm not following either.

Serial port monitors are great for logging I/O and figuring out what is being passed. You can only monitor the software/hardware connected to a particular port.

I built a simple open source C# project that helps build instruction packets. You kinda have to have an idea what you're doing though.
http://www.agaverobotics.com/services/d ... fault.aspx
MikeG
Robot Builder
Robot Builder
Posts: 18
Joined: Fri Dec 25, 2009 5:37 am

Post by Fritzoid » Mon Apr 19, 2010 11:11 am

Post by Fritzoid
Mon Apr 19, 2010 11:11 am

OK here's the big picture. Your using two terminal sessions on two different USB ports. One using the normal path to the robot. USB to dongle (not USB2Dynamixel) to serial cable to link plug on CM-510. This one runs at 56Kb. The other terminal session takes another path straight to the dynamixel bus. USB to USB2Dynamixel to any attached dynamixel device. This sessiojn runs at 1Mb. If you stick a port monitor on this session you can see and log the actual dynamixel traffic in hexadecimal and at full speed.
OK here's the big picture. Your using two terminal sessions on two different USB ports. One using the normal path to the robot. USB to dongle (not USB2Dynamixel) to serial cable to link plug on CM-510. This one runs at 56Kb. The other terminal session takes another path straight to the dynamixel bus. USB to USB2Dynamixel to any attached dynamixel device. This sessiojn runs at 1Mb. If you stick a port monitor on this session you can see and log the actual dynamixel traffic in hexadecimal and at full speed.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by billyzelsnack » Mon Apr 19, 2010 3:16 pm

Post by billyzelsnack
Mon Apr 19, 2010 3:16 pm

Just to understand what you're saying.. So there are 2 USB2Dynamixel's ( or whatever ) attached to the same dynamixel bus?
Just to understand what you're saying.. So there are 2 USB2Dynamixel's ( or whatever ) attached to the same dynamixel bus?
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by MikeG » Mon Apr 19, 2010 5:56 pm

Post by MikeG
Mon Apr 19, 2010 5:56 pm

I beleive Fritzoid just attached a USB2Dyanmixel to the the Dyanmixel bus through an open port. Now Fritzoid can send commands to the CM5/510 via the Bioloid software and can see the corresponding bytes fly by through the USB2Dyanmixel.
I beleive Fritzoid just attached a USB2Dyanmixel to the the Dyanmixel bus through an open port. Now Fritzoid can send commands to the CM5/510 via the Bioloid software and can see the corresponding bytes fly by through the USB2Dyanmixel.
MikeG
Robot Builder
Robot Builder
Posts: 18
Joined: Fri Dec 25, 2009 5:37 am

Post by Fritzoid » Mon Apr 19, 2010 6:47 pm

Post by Fritzoid
Mon Apr 19, 2010 6:47 pm

Yes that's it, however there's a certain synergy between the terminal program and the port monitor that you may not be appreciating. The port monitor can't choose the speed or direct the data. The RoboPlus terminal program can't display in hexadecimal or log the data. But together they work beautifully.
Yes that's it, however there's a certain synergy between the terminal program and the port monitor that you may not be appreciating. The port monitor can't choose the speed or direct the data. The RoboPlus terminal program can't display in hexadecimal or log the data. But together they work beautifully.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by MikeG » Mon Apr 19, 2010 9:02 pm

Post by MikeG
Mon Apr 19, 2010 9:02 pm

Most of us understand the concept. We've been using port monitors for years to reverse engineer firmware like the CM5/510.

Your first post was just a little confusing.
Most of us understand the concept. We've been using port monitors for years to reverse engineer firmware like the CM5/510.

Your first post was just a little confusing.
MikeG
Robot Builder
Robot Builder
Posts: 18
Joined: Fri Dec 25, 2009 5:37 am


8 postsPage 1 of 1
8 postsPage 1 of 1