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

Ax-12 firmware update gone wrong

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

Ax-12 firmware update gone wrong

Post by clusher » Fri Jul 17, 2009 2:53 pm

Post by clusher
Fri Jul 17, 2009 2:53 pm

Hey guys
I'm using the USB2Dynamixel and I decided to update the firmware of the AX-12 servos. So I used the Dynamixel Manager, asked to update the software and from here everything went wrong.

First thing, all the Dynamixels I can contact with now have ID=1. So I have to go one by one to change their ID's.
Second thing, there are 3 servos I can't contact with. Two of them have no reply when connected to CM-5 although there is some kind of reply (I'm also using the USB2Dynamixel to snif the bus). The other one simply has the LED on and has absolutely no reply.

Was any of this supposed to happen? Any advices on what to do to the malfunctioning servos?
Hey guys
I'm using the USB2Dynamixel and I decided to update the firmware of the AX-12 servos. So I used the Dynamixel Manager, asked to update the software and from here everything went wrong.

First thing, all the Dynamixels I can contact with now have ID=1. So I have to go one by one to change their ID's.
Second thing, there are 3 servos I can't contact with. Two of them have no reply when connected to CM-5 although there is some kind of reply (I'm also using the USB2Dynamixel to snif the bus). The other one simply has the LED on and has absolutely no reply.

Was any of this supposed to happen? Any advices on what to do to the malfunctioning servos?
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by RandomMatt » Fri Jul 17, 2009 6:34 pm

Post by RandomMatt
Fri Jul 17, 2009 6:34 pm

If you can easily talk on the dynamixel bus to a single servo at 57600baud... you're fine.

When you first attach the AX12 it waits for a # char, if it doesn't get one in ~1/60th second then it tries to run the application code (i.e. the servo firmware - the servo firmware sets the baud rate to the rate specified in the eeprom).

So.. send many #s down the line (at 57600), attach the servo and you'll get to its bootloader. Then you can use h to get help.

You probably want to reset the eeprom and make sure that the firmware is in application mode. With luck, you'll have a servo running at 1Mbit, with ID=1.

If you're unlucky you'll need to reflash the firmware, which requires a binary firmware image (StuartL has shown how to get one of those) and tools/programmer from libbioloid.
If you can easily talk on the dynamixel bus to a single servo at 57600baud... you're fine.

When you first attach the AX12 it waits for a # char, if it doesn't get one in ~1/60th second then it tries to run the application code (i.e. the servo firmware - the servo firmware sets the baud rate to the rate specified in the eeprom).

So.. send many #s down the line (at 57600), attach the servo and you'll get to its bootloader. Then you can use h to get help.

You probably want to reset the eeprom and make sure that the firmware is in application mode. With luck, you'll have a servo running at 1Mbit, with ID=1.

If you're unlucky you'll need to reflash the firmware, which requires a binary firmware image (StuartL has shown how to get one of those) and tools/programmer from libbioloid.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by clusher » Fri Jul 17, 2009 8:50 pm

Post by clusher
Fri Jul 17, 2009 8:50 pm

Thanks, I'll be trying that on monday late afternoon...
Let's hope I don't need the binary image thingy :p
Thanks, I'll be trying that on monday late afternoon...
Let's hope I don't need the binary image thingy :p
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by clusher » Tue Jul 21, 2009 12:30 pm

Post by clusher
Tue Jul 21, 2009 12:30 pm

After trying some other things, I finally managed to send those #s through the line, using a Python script. I got a reply from one of the broken ax-12, with some options. A(plication), R(eset), D(ump), C(lear). I choose reset. So I didn't need to send any 'h' to get help.

The weird thing is that I had already achieved this point using a Putty Session, but when I asked to reset, everything stopped... 30minutes after I decided it was taking quite some time resetting...
How long is this reset supposed to take? How do I know when it's done? I'm reading the line from time to time, waiting for some kind of message from the servo...

EDIT: I forgot to mention, the red light of the servo is on...
After trying some other things, I finally managed to send those #s through the line, using a Python script. I got a reply from one of the broken ax-12, with some options. A(plication), R(eset), D(ump), C(lear). I choose reset. So I didn't need to send any 'h' to get help.

The weird thing is that I had already achieved this point using a Putty Session, but when I asked to reset, everything stopped... 30minutes after I decided it was taking quite some time resetting...
How long is this reset supposed to take? How do I know when it's done? I'm reading the line from time to time, waiting for some kind of message from the servo...

EDIT: I forgot to mention, the red light of the servo is on...
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by RandomMatt » Tue Jul 21, 2009 12:49 pm

Post by RandomMatt
Tue Jul 21, 2009 12:49 pm

ahhh... my mistake for not being clear. To sort out the eeprom...

You want to Clear the eeprom. This takes suprisingly long (a few seconds).
Then, you want to put the servo in Application mode.
Then, you want to Go.
At this point - the servo should have its light off, and be ID 1, talking at 1Mbit.

---

For what it is worth, I think Help gives:
Command : L(oad),G(o),S(ystem),A(pplication),R(eset),D(ump),C(lear)

If your help gives a different prompt, then your servo has a slightly different bootloader - which may, or may not, be a problem.

---

If the above doesn't work, then the chances are that the firmware in the servo is corrupt.

To fix that ...
download libbioliod and libcompat http://www.braincell.cx/bioloid/dist/
make everything in the tools directory
Read doc/programmer.html
... and you should be in business!
ahhh... my mistake for not being clear. To sort out the eeprom...

You want to Clear the eeprom. This takes suprisingly long (a few seconds).
Then, you want to put the servo in Application mode.
Then, you want to Go.
At this point - the servo should have its light off, and be ID 1, talking at 1Mbit.

---

For what it is worth, I think Help gives:
Command : L(oad),G(o),S(ystem),A(pplication),R(eset),D(ump),C(lear)

If your help gives a different prompt, then your servo has a slightly different bootloader - which may, or may not, be a problem.

---

If the above doesn't work, then the chances are that the firmware in the servo is corrupt.

To fix that ...
download libbioliod and libcompat http://www.braincell.cx/bioloid/dist/
make everything in the tools directory
Read doc/programmer.html
... and you should be in business!
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by clusher » Wed Jul 22, 2009 10:37 am

Post by clusher
Wed Jul 22, 2009 10:37 am

I must be doing something wrong...
In order to feed voltage to the servos I have to keep the CM5 connected to it. So, as it is said in programmer, I connected the Cm5 do the not working servo alone, sent the exemple.hex to the CM5 and turned the bridge mode on.
Afterwards, I ran programmer from a Command Prompt and said to flash DX_AX12(v24).bin through COM4 (connected to the CM5 through the serial cable). The first time it failed. I tried again and the result was:
Code: Select all
*
Loading Ready..Sucess
Rewriting:0x0000
Size:0x17c2 Checksum: 7f-7f


I turned power off and back on, and not only the red light of the servo is still on, but the CM5 is unable to find it. So... what's wrong here?

I have another question though. The bridge mode says that it bridges 1M/57600... so it communicates to the AX12 at a 1M baudrate? Shouldn't I be using a 57600 baudrate? If so, how?

I also tried flashing through the USB2Dynamixel, but the answer came from the CM-5 even in bridge mode...

Getting desperate here :shock:
BTW, great work with the library, seems solid and I read the whole thread about it, people really liked working with it.

EDIT: Nevermind, it worked. However, it seems that CM5 is now working at 2M baudrate to the servos. And this time, with the Robotis Firmware. I'll deal with that when all my servos are working again. Thanks for all the help!
I must be doing something wrong...
In order to feed voltage to the servos I have to keep the CM5 connected to it. So, as it is said in programmer, I connected the Cm5 do the not working servo alone, sent the exemple.hex to the CM5 and turned the bridge mode on.
Afterwards, I ran programmer from a Command Prompt and said to flash DX_AX12(v24).bin through COM4 (connected to the CM5 through the serial cable). The first time it failed. I tried again and the result was:
Code: Select all
*
Loading Ready..Sucess
Rewriting:0x0000
Size:0x17c2 Checksum: 7f-7f


I turned power off and back on, and not only the red light of the servo is still on, but the CM5 is unable to find it. So... what's wrong here?

I have another question though. The bridge mode says that it bridges 1M/57600... so it communicates to the AX12 at a 1M baudrate? Shouldn't I be using a 57600 baudrate? If so, how?

I also tried flashing through the USB2Dynamixel, but the answer came from the CM-5 even in bridge mode...

Getting desperate here :shock:
BTW, great work with the library, seems solid and I read the whole thread about it, people really liked working with it.

EDIT: Nevermind, it worked. However, it seems that CM5 is now working at 2M baudrate to the servos. And this time, with the Robotis Firmware. I'll deal with that when all my servos are working again. Thanks for all the help!
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by RandomMatt » Wed Jul 22, 2009 10:53 am

Post by RandomMatt
Wed Jul 22, 2009 10:53 am

don't worry... you're so close to having it done.

I can thing of two things that may be causing a problem. The first is much more likely to be the issue (and much easier to do)

1) Explanation: When the servo is in the bootloader the LED is on. The first thing the firmware does is switch off the LED. As with the CM5 it is possible to get the servo to boot into the bootloader rather than the firmware - which isn't what you want, but it is the default.

Fix: get to the bootloader prompt and make sure that you have set Application mode... and then Go. The LED should go off. (If it does... i think you're fine, if not see below).

2) I'll confess that I haven't tried to flash one of my AX12s with that image. Download this file http://www.braincell.cx/~stuart/ax12-rev16-binaryfiles.zip. That image has been tested and is known to be good.
don't worry... you're so close to having it done.

I can thing of two things that may be causing a problem. The first is much more likely to be the issue (and much easier to do)

1) Explanation: When the servo is in the bootloader the LED is on. The first thing the firmware does is switch off the LED. As with the CM5 it is possible to get the servo to boot into the bootloader rather than the firmware - which isn't what you want, but it is the default.

Fix: get to the bootloader prompt and make sure that you have set Application mode... and then Go. The LED should go off. (If it does... i think you're fine, if not see below).

2) I'll confess that I haven't tried to flash one of my AX12s with that image. Download this file http://www.braincell.cx/~stuart/ax12-rev16-binaryfiles.zip. That image has been tested and is known to be good.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by clusher » Wed Jul 22, 2009 11:03 am

Post by clusher
Wed Jul 22, 2009 11:03 am

clusher wrote:EDIT: Nevermind, it worked. However, it seems that CM5 is now working at 2M baudrate to the servos. And this time, with the Robotis Firmware. I'll deal with that when all my servos are working again. Thanks for all the help!


I guess the running in application mode must have worked the second time around... Actually, the first time, I just turned the CM5 off, and it was connected to a plug. Is it possible that it kept feeding the servo and it didn't power cycle it? Just a wild guess. Anyway... now I'll do the same for the other malfunctioning servos. Keep your fingers crossed!
clusher wrote:EDIT: Nevermind, it worked. However, it seems that CM5 is now working at 2M baudrate to the servos. And this time, with the Robotis Firmware. I'll deal with that when all my servos are working again. Thanks for all the help!


I guess the running in application mode must have worked the second time around... Actually, the first time, I just turned the CM5 off, and it was connected to a plug. Is it possible that it kept feeding the servo and it didn't power cycle it? Just a wild guess. Anyway... now I'll do the same for the other malfunctioning servos. Keep your fingers crossed!
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by clusher » Wed Jul 22, 2009 2:24 pm

Post by clusher
Wed Jul 22, 2009 2:24 pm

Success.
Every servo is responding to status packets, even the IMU seems to have recovered, so I'm going to re-assemble the human Bioloid.
However... I put back the Robotis firmware on the CM5 (the Bioloid is shared between 2 or 3 projects, and the others use the original firmware), but when I run the Manage mode on Terminal, it says
Code: Select all
<->PC:57142BPS <->Dynamixel:2000000BPS


So... 2M? If I do "search" it finds all the servos (I suppose it tries with all baudrates available), but when I turn it on it detects none, and if I try to send messages by using "cid" command it returns "NoData". Any idea about what's happening?
From the AtMega128 (page 197) I see that 2M is the maximum baudrate available (I thought it was 1M)... but why is it enabled? And how to disable?
Success.
Every servo is responding to status packets, even the IMU seems to have recovered, so I'm going to re-assemble the human Bioloid.
However... I put back the Robotis firmware on the CM5 (the Bioloid is shared between 2 or 3 projects, and the others use the original firmware), but when I run the Manage mode on Terminal, it says
Code: Select all
<->PC:57142BPS <->Dynamixel:2000000BPS


So... 2M? If I do "search" it finds all the servos (I suppose it tries with all baudrates available), but when I turn it on it detects none, and if I try to send messages by using "cid" command it returns "NoData". Any idea about what's happening?
From the AtMega128 (page 197) I see that 2M is the maximum baudrate available (I thought it was 1M)... but why is it enabled? And how to disable?
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by clusher » Wed Jul 22, 2009 4:50 pm

Post by clusher
Wed Jul 22, 2009 4:50 pm

This is getting kind of a one-sided thread with all the things I'm trying, I hope it helps anyone in the future.

In order to solve the 2M baudrate, I was here with my teacher and we decided to explore the bootloader and we cleared the EEPROM, set on Application mode and Go. We uploaded the Robotis Firmware to the Cm5, and when we ran it, it automatically changed the baudrate to 1M. So one problem is cleared.

Now the new problem. When we try to enter PLAY mode, it recognizes the servos, the IMU and the AxS1, but it starts coughing out:
Code: Select all
ERROR:0013[0001:50]
ERROR:0013[0002:00]
...
ERROR:0013[00FF:00]
ERROR:0013[0101:00]


and sometimes a ERROR:0010... Any ideas what these are?

Good news are: my C programs seem to be working ok... The servos move and go to predefined stances of mine (standing, sitting, things like that).

Is there something that needs to be changed when we clear the EEPROM of CM-5? Or what are those errors from? The servos or the CM-5?
Damn, I'm needing a brake today!
This is getting kind of a one-sided thread with all the things I'm trying, I hope it helps anyone in the future.

In order to solve the 2M baudrate, I was here with my teacher and we decided to explore the bootloader and we cleared the EEPROM, set on Application mode and Go. We uploaded the Robotis Firmware to the Cm5, and when we ran it, it automatically changed the baudrate to 1M. So one problem is cleared.

Now the new problem. When we try to enter PLAY mode, it recognizes the servos, the IMU and the AxS1, but it starts coughing out:
Code: Select all
ERROR:0013[0001:50]
ERROR:0013[0002:00]
...
ERROR:0013[00FF:00]
ERROR:0013[0101:00]


and sometimes a ERROR:0010... Any ideas what these are?

Good news are: my C programs seem to be working ok... The servos move and go to predefined stances of mine (standing, sitting, things like that).

Is there something that needs to be changed when we clear the EEPROM of CM-5? Or what are those errors from? The servos or the CM-5?
Damn, I'm needing a brake today!
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by RandomMatt » Wed Jul 22, 2009 7:06 pm

Post by RandomMatt
Wed Jul 22, 2009 7:06 pm

Out of interest, which servo firmware did you use? (it'd be nice to know if v24 works!).

Also... what does libbioloids supervisor say when you ask it to scan x for devices? (i.e. is the problem with the robotis firmware? or the servos?)

Finally... I haven't ever(*) used the robotis CM5 firmware - so I cannot help with diagnosing the problem from the cryptic error messages.

* I have looked over StuartLs shoulder while he tested the PSX-B board with it - but that is all!
Out of interest, which servo firmware did you use? (it'd be nice to know if v24 works!).

Also... what does libbioloids supervisor say when you ask it to scan x for devices? (i.e. is the problem with the robotis firmware? or the servos?)

Finally... I haven't ever(*) used the robotis CM5 firmware - so I cannot help with diagnosing the problem from the cryptic error messages.

* I have looked over StuartLs shoulder while he tested the PSX-B board with it - but that is all!
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by clusher » Thu Jul 23, 2009 11:21 am

Post by clusher
Thu Jul 23, 2009 11:21 am

Everything went fine with the v24 Dynamixel firmware. They seem to be responsive, at least concerning my C programs and Python interface.

In the libbioloid, the x-scan detects everything, although sometimes it gets a little confused (but my instinct tells me it's the IMU... something isn't very right there...), and detects around 100 servos :roll:

Since my C programs and my Python interface with the USB2Dynamixel works fine, it has to be a problem with CM-5. I just can't be sure it's the Robotis Firmware, even though my C programs work, because I don't have a clue what this error comes from...
Everything went fine with the v24 Dynamixel firmware. They seem to be responsive, at least concerning my C programs and Python interface.

In the libbioloid, the x-scan detects everything, although sometimes it gets a little confused (but my instinct tells me it's the IMU... something isn't very right there...), and detects around 100 servos :roll:

Since my C programs and my Python interface with the USB2Dynamixel works fine, it has to be a problem with CM-5. I just can't be sure it's the Robotis Firmware, even though my C programs work, because I don't have a clue what this error comes from...
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by RandomMatt » Thu Jul 23, 2009 1:13 pm

Post by RandomMatt
Thu Jul 23, 2009 1:13 pm

Ahhh.... the chances are that libbioloid is confused by two devices on the same ID. This may explain the problem with the robotis firmware.

Try attaching one device at a time and checking its ID - my guess is that you'll find to devices with the same ID.
Ahhh.... the chances are that libbioloid is confused by two devices on the same ID. This may explain the problem with the robotis firmware.

Try attaching one device at a time and checking its ID - my guess is that you'll find to devices with the same ID.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by clusher » Thu Jul 23, 2009 2:51 pm

Post by clusher
Thu Jul 23, 2009 2:51 pm

Great minds think alike, I suppose... :wink:
I had already checked that, all the servos are listed on the scan (including AXS1 and the IMU), and I was able to get replies from each of them using Python. So... no identities are doubled.

Any more guesses?
Great minds think alike, I suppose... :wink:
I had already checked that, all the servos are listed on the scan (including AXS1 and the IMU), and I was able to get replies from each of them using Python. So... no identities are doubled.

Any more guesses?
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Post by clusher » Mon Jul 27, 2009 2:33 pm

Post by clusher
Mon Jul 27, 2009 2:33 pm

One more clue for this riddle.
All motion poses from robotis firmware are... well, corrupted I guess. They make no sense, they only move the arms. I' gonna try getting a different motion file a see where it goes from there.
Maybe that is also messing up the PLAY sequence.

EDIT: yeah, the problem was that the motion files were corrupted. I downloaded the DemoExample from Robotis to the Cm-5 and now everything runs smoothly.
Thank you all for the help. :D
One more clue for this riddle.
All motion poses from robotis firmware are... well, corrupted I guess. They make no sense, they only move the arms. I' gonna try getting a different motion file a see where it goes from there.
Maybe that is also messing up the PLAY sequence.

EDIT: yeah, the problem was that the motion files were corrupted. I downloaded the DemoExample from Robotis to the Cm-5 and now everything runs smoothly.
Thank you all for the help. :D
clusher
Savvy Roboteer
Savvy Roboteer
Posts: 57
Joined: Thu Jul 17, 2008 12:27 pm

Next
20 postsPage 1 of 21, 2
20 postsPage 1 of 21, 2