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

Connection issue using the terminal

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

Connection issue using the terminal

Post by freeforall » Sat Apr 28, 2007 6:44 pm

Post by freeforall
Sat Apr 28, 2007 6:44 pm

Hello everybody,

I uploaded a .hex file with the terminal of the Bioloid. After its execution, the robot got stuck and I have no way to launch the Boot Loader in the purpose to upload the Bioloid Program. I tried that by holding the # button and the reset button of the robot but the issue remained.

Please I really need a quick answer because I have to participate to an exhibition next week.

Thank you for your answer.
Hello everybody,

I uploaded a .hex file with the terminal of the Bioloid. After its execution, the robot got stuck and I have no way to launch the Boot Loader in the purpose to upload the Bioloid Program. I tried that by holding the # button and the reset button of the robot but the issue remained.

Please I really need a quick answer because I have to participate to an exhibition next week.

Thank you for your answer.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by billyzelsnack » Sat Apr 28, 2007 7:39 pm

Post by billyzelsnack
Sat Apr 28, 2007 7:39 pm

Hate to say this, but.. It is possible to brick your CM5 by uploading naughty code. I know because I bricked mine.

Were you uploading example.c or something you wrote?
Hate to say this, but.. It is possible to brick your CM5 by uploading naughty code. I know because I bricked mine.

Were you uploading example.c or something you wrote?
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by freeforall » Sat Apr 28, 2007 7:58 pm

Post by freeforall
Sat Apr 28, 2007 7:58 pm

Hi,

Yes and here is the main function of the code I uploaded.

int main(void)
{
byte bCount,bID, bTxPacketLength,bRxPacketLength;

PortInitialize(); //Port In/Out Direction Definition
RS485_RXD; //Set RS485 Direction to Input State.
SerialInitialize(SERIAL_PORT0,1,RX_INTERRUPT);//RS485 Initializing(RxInterrupt)
SerialInitialize(SERIAL_PORT1,DEFAULT_BAUD_RATE,0); //RS232 Initializing(None Interrupt)

gbRxBufferReadPointer = gbRxBufferWritePointer = 0; //RS485 RxBuffer Clearing.

sei(); //Enable Interrupt -- Compiler Function
TxDString("\r\n [The Example of Dynamixel Evaluation with ATmega128,GCC-AVR]");

//Dynamixel Communication Function Execution Step.
// Step 1. Parameter Setting (gbpParameter[]). In case of no parameter instruction(Ex. INST_PING), this step is not needed.
// Step 2. TxPacket(ID,INSTRUCTION,LengthOfParameter); --Total TxPacket Length is returned
// Step 3. RxPacket(ExpectedReturnPacketLength); -- Real RxPacket Length is returned
// Step 4 PrintBuffer(BufferStartPointer,LengthForPrinting);

bID = 5;


TxDString("\r\n\n Press any Key to continue"); RxD8();
gbpParameter[0] = P_GOAL_POSITION_L; //Address of Firmware Version
gbpParameter[1] = 0x00; //Writing Data P_GOAL_POSITION_L
gbpParameter[2] = 0x08; //Writing Data P_GOAL_POSITION_H
gbpParameter[3] = 0x00; //Writing Data P_GOAL_SPEED_L
gbpParameter[4] = 0x01; //Writing Data P_GOAL_SPEED_H
bTxPacketLength = TxPacket(bID,INST_WRITE,5);
bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE);
TxDString("\r\n TxD:"); PrintBuffer(gbpTxBuffer,bTxPacketLength);
TxDString("\r\n RxD:"); PrintBuffer(gbpRxBuffer,bRxPacketLength);

bID = 6;
gbpParameter[0] = P_GOAL_POSITION_L; //Address of Firmware Version
gbpParameter[1] = 0x00; //Writing Data P_GOAL_POSITION_L
gbpParameter[2] = 0x05; //Writing Data P_GOAL_POSITION_H
gbpParameter[3] = 0x00; //Writing Data P_GOAL_SPEED_L
gbpParameter[4] = 0x01; //Writing Data P_GOAL_SPEED_H
bTxPacketLength = TxPacket(bID,INST_WRITE,5);
bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE);
TxDString("\r\n TxD:"); PrintBuffer(gbpTxBuffer,bTxPacketLength);
TxDString("\r\n RxD:"); PrintBuffer(gbpRxBuffer,bRxPacketLength);

TxDString("\r\n\n End. Push reset button for repeat");
while(1);
}

Is there any chance that the problem comes from this code?

Thank you.
Hi,

Yes and here is the main function of the code I uploaded.

int main(void)
{
byte bCount,bID, bTxPacketLength,bRxPacketLength;

PortInitialize(); //Port In/Out Direction Definition
RS485_RXD; //Set RS485 Direction to Input State.
SerialInitialize(SERIAL_PORT0,1,RX_INTERRUPT);//RS485 Initializing(RxInterrupt)
SerialInitialize(SERIAL_PORT1,DEFAULT_BAUD_RATE,0); //RS232 Initializing(None Interrupt)

gbRxBufferReadPointer = gbRxBufferWritePointer = 0; //RS485 RxBuffer Clearing.

sei(); //Enable Interrupt -- Compiler Function
TxDString("\r\n [The Example of Dynamixel Evaluation with ATmega128,GCC-AVR]");

//Dynamixel Communication Function Execution Step.
// Step 1. Parameter Setting (gbpParameter[]). In case of no parameter instruction(Ex. INST_PING), this step is not needed.
// Step 2. TxPacket(ID,INSTRUCTION,LengthOfParameter); --Total TxPacket Length is returned
// Step 3. RxPacket(ExpectedReturnPacketLength); -- Real RxPacket Length is returned
// Step 4 PrintBuffer(BufferStartPointer,LengthForPrinting);

bID = 5;


TxDString("\r\n\n Press any Key to continue"); RxD8();
gbpParameter[0] = P_GOAL_POSITION_L; //Address of Firmware Version
gbpParameter[1] = 0x00; //Writing Data P_GOAL_POSITION_L
gbpParameter[2] = 0x08; //Writing Data P_GOAL_POSITION_H
gbpParameter[3] = 0x00; //Writing Data P_GOAL_SPEED_L
gbpParameter[4] = 0x01; //Writing Data P_GOAL_SPEED_H
bTxPacketLength = TxPacket(bID,INST_WRITE,5);
bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE);
TxDString("\r\n TxD:"); PrintBuffer(gbpTxBuffer,bTxPacketLength);
TxDString("\r\n RxD:"); PrintBuffer(gbpRxBuffer,bRxPacketLength);

bID = 6;
gbpParameter[0] = P_GOAL_POSITION_L; //Address of Firmware Version
gbpParameter[1] = 0x00; //Writing Data P_GOAL_POSITION_L
gbpParameter[2] = 0x05; //Writing Data P_GOAL_POSITION_H
gbpParameter[3] = 0x00; //Writing Data P_GOAL_SPEED_L
gbpParameter[4] = 0x01; //Writing Data P_GOAL_SPEED_H
bTxPacketLength = TxPacket(bID,INST_WRITE,5);
bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE);
TxDString("\r\n TxD:"); PrintBuffer(gbpTxBuffer,bTxPacketLength);
TxDString("\r\n RxD:"); PrintBuffer(gbpRxBuffer,bRxPacketLength);

TxDString("\r\n\n End. Push reset button for repeat");
while(1);
}

Is there any chance that the problem comes from this code?

Thank you.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by Bullit » Sat Apr 28, 2007 10:28 pm

Post by Bullit
Sat Apr 28, 2007 10:28 pm

I don't have a cm-5 but I work with a cm-2 all the time and I have a hard time believing you could brick it by updating code. The bootloader (at least in the cm-2) is locked and can't be overwritten without an spi interface.

To get to the bootloader you should only need the robot terminal set to 57600 baud and the proper serial port. Hold down the # key and then press the mode which I think is reset on the cm-5.
I don't have a cm-5 but I work with a cm-2 all the time and I have a hard time believing you could brick it by updating code. The bootloader (at least in the cm-2) is locked and can't be overwritten without an spi interface.

To get to the bootloader you should only need the robot terminal set to 57600 baud and the proper serial port. Hold down the # key and then press the mode which I think is reset on the cm-5.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by billyzelsnack » Sat Apr 28, 2007 11:27 pm

Post by billyzelsnack
Sat Apr 28, 2007 11:27 pm

I was writing code for it for a couple of weeks before I bricked it, so I was very familiar with the whole process. Maybe it is not bricked, but I sure tried a lot of things trying to get it working again. I have a bunch of threads about it from a couple months back.

btw.. I guess I should say.. Equivalent of a brick. haha. It's still doing something. If I connect to it, it'll spew data at me. However, I can't get it to stop or download another program onto it.
I was writing code for it for a couple of weeks before I bricked it, so I was very familiar with the whole process. Maybe it is not bricked, but I sure tried a lot of things trying to get it working again. I have a bunch of threads about it from a couple months back.

btw.. I guess I should say.. Equivalent of a brick. haha. It's still doing something. If I connect to it, it'll spew data at me. However, I can't get it to stop or download another program onto it.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by freeforall » Sun Apr 29, 2007 8:38 am

Post by freeforall
Sun Apr 29, 2007 8:38 am

I exactly have the same problem as yours, billyzelsnack! What could we do? Did you try to contact Robotis to explain the issue with CM-5? Is there any chance we can upload data with another software? By rights, what do electronics enginners use to upload data on the ATMega128?

But I agree with Bullit. When I launch the terminal and push the reset button, my C program starts to be executed. So, it's unlikely we overwrote the Boot Loader because I found this in the user's manual:
"When the power is applied, the “Boot Loader” located at address 0x1E000 executes the file Bioloid_VerXXX.hex is loaded on to the 48 Kbyte user area, starting at Address 0X00000. You can see that the executable file of the user created C program has to be loaded at address of 0."

However I think that the terminal get stuck when the C program we uploaded starts to be excecuted. It's the reason why we are unable to use #+reset to launch the boot loader. Or may be we overwrote the part of the data that permits to use this shortcut (#+reset)

Thank you for your help guys. I'll keep you up to date with any answers I find to the problem.
I exactly have the same problem as yours, billyzelsnack! What could we do? Did you try to contact Robotis to explain the issue with CM-5? Is there any chance we can upload data with another software? By rights, what do electronics enginners use to upload data on the ATMega128?

But I agree with Bullit. When I launch the terminal and push the reset button, my C program starts to be executed. So, it's unlikely we overwrote the Boot Loader because I found this in the user's manual:
"When the power is applied, the “Boot Loader” located at address 0x1E000 executes the file Bioloid_VerXXX.hex is loaded on to the 48 Kbyte user area, starting at Address 0X00000. You can see that the executable file of the user created C program has to be loaded at address of 0."

However I think that the terminal get stuck when the C program we uploaded starts to be excecuted. It's the reason why we are unable to use #+reset to launch the boot loader. Or may be we overwrote the part of the data that permits to use this shortcut (#+reset)

Thank you for your help guys. I'll keep you up to date with any answers I find to the problem.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by billyzelsnack » Sun Apr 29, 2007 6:31 pm

Post by billyzelsnack
Sun Apr 29, 2007 6:31 pm

I've went so far as writing my own program to try and talk to the CM-5 fast enough in an effort to snap it out of it, but couldn't get it.

I bought my robot from Trossen and I've talked a bit back and forth with them about it, but I've not pursued it much since I built Arnaud's interface.

Still.. Keep me up to date. I'd like the CM-5 working so that I can at least use it to charge the battery.
I've went so far as writing my own program to try and talk to the CM-5 fast enough in an effort to snap it out of it, but couldn't get it.

I bought my robot from Trossen and I've talked a bit back and forth with them about it, but I've not pursued it much since I built Arnaud's interface.

Still.. Keep me up to date. I'd like the CM-5 working so that I can at least use it to charge the battery.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by freeforall » Fri May 04, 2007 6:13 pm

Post by freeforall
Fri May 04, 2007 6:13 pm

Hi billyzelsnack,

I resolved my problem. I had a problem with my USB/Serial converter. The CM-5 was able to send but not to receive data. That's why the # didn't work.

However, I did some resarch and I'm sure you didn't overwrite the BootLoader beacause it's protected and there is no way to overwrite it without an spi interface. so I'm pretty sure that you have a problem of sending data. you can't launch the bootloader for the simple (and only) reason that the CM-5 doesn't recieve the # signal. so try another serial cable.
Hi billyzelsnack,

I resolved my problem. I had a problem with my USB/Serial converter. The CM-5 was able to send but not to receive data. That's why the # didn't work.

However, I did some resarch and I'm sure you didn't overwrite the BootLoader beacause it's protected and there is no way to overwrite it without an spi interface. so I'm pretty sure that you have a problem of sending data. you can't launch the bootloader for the simple (and only) reason that the CM-5 doesn't recieve the # signal. so try another serial cable.
freeforall
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Sat Nov 11, 2006 1:00 am

Post by billyzelsnack » Fri May 04, 2007 8:04 pm

Post by billyzelsnack
Fri May 04, 2007 8:04 pm

Glad that you got it worked out.

I was using a desktop machine that didn't require a usb/rs232 adapter, but I think I'll give it a try on another computer since you managed to get yours working.

Fingers crossed!
Glad that you got it worked out.

I was using a desktop machine that didn't require a usb/rs232 adapter, but I think I'll give it a try on another computer since you managed to get yours working.

Fingers crossed!
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by hamid_m » Fri May 04, 2007 8:14 pm

Post by hamid_m
Fri May 04, 2007 8:14 pm

Hello,

Check your serial cable too, sometimes one of the wires is beeing cuted!!! it has happened for me once, another time my caps lock was on :wink:.
freeforall has right, it is no way to overwrite the bootloader because the SPM assembly language operation is not able to access the boot loader area.

Hamid.
Hello,

Check your serial cable too, sometimes one of the wires is beeing cuted!!! it has happened for me once, another time my caps lock was on :wink:.
freeforall has right, it is no way to overwrite the bootloader because the SPM assembly language operation is not able to access the boot loader area.

Hamid.
hamid_m
Savvy Roboteer
Savvy Roboteer
Posts: 133
Joined: Thu May 03, 2007 4:56 pm

Post by billyzelsnack » Sat May 05, 2007 1:13 am

Post by billyzelsnack
Sat May 05, 2007 1:13 am

Woo.

Well.. Guess what? It works on my brother's machine. Geez.

I guess I somehow blew the serial port on my machine when I was writing the firmware to it. You'd think that I'd get some sort of error message during my write calls? bah. I'll hopefully be storing this in the hardware debugging lesson learned category in my brain. :)

Though.. I guess I'll never know if the serial port was bad. I had my desktop machine at my office and the office kinda burned down the other week.. That serial port is definitely bad now!

http://www.madison.com/tct/opinion/colu ... id=132313#

Doh!

Anyway. I'm glad I have a working CM5 again. Thanks for the idea to try!
Woo.

Well.. Guess what? It works on my brother's machine. Geez.

I guess I somehow blew the serial port on my machine when I was writing the firmware to it. You'd think that I'd get some sort of error message during my write calls? bah. I'll hopefully be storing this in the hardware debugging lesson learned category in my brain. :)

Though.. I guess I'll never know if the serial port was bad. I had my desktop machine at my office and the office kinda burned down the other week.. That serial port is definitely bad now!

http://www.madison.com/tct/opinion/colu ... id=132313#

Doh!

Anyway. I'm glad I have a working CM5 again. Thanks for the idea to try!
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Bioloid connects camera

Post by enyaw15 » Thu Aug 06, 2009 4:52 am

Post by enyaw15
Thu Aug 06, 2009 4:52 am

hi~ everyone,we got a problem.

now,we want Bioloid which receive the value 1,2,3 from camera.

Through AVR,we wish AX-12 can move,just like :

receice 1:(ID1)move to 90 position.

So,about to the Rxpacket() function,how do i
hi~ everyone,we got a problem.

now,we want Bioloid which receive the value 1,2,3 from camera.

Through AVR,we wish AX-12 can move,just like :

receice 1:(ID1)move to 90 position.

So,about to the Rxpacket() function,how do i
enyaw15
Newbie
Newbie
Posts: 2
Joined: Thu Aug 06, 2009 4:29 am

bioloid connet camera

Post by enyaw15 » Thu Aug 06, 2009 5:01 am

Post by enyaw15
Thu Aug 06, 2009 5:01 am

hi~ everyone.

now, we want Bioloid receive value 1,2,3 from camera

ex: when AX1-2 (ID-1) receives vaule 1 can moves to 90 degree position.

So,how do i use AVR's Rxpacket() function to get it ?

please give me answer everyone,thx.
hi~ everyone.

now, we want Bioloid receive value 1,2,3 from camera

ex: when AX1-2 (ID-1) receives vaule 1 can moves to 90 degree position.

So,how do i use AVR's Rxpacket() function to get it ?

please give me answer everyone,thx.
enyaw15
Newbie
Newbie
Posts: 2
Joined: Thu Aug 06, 2009 4:29 am


13 postsPage 1 of 1
13 postsPage 1 of 1