[solved] BADCHECKSUM 0

Shop Forum Makelangelo Polargraph Art Robot [solved] BADCHECKSUM 0

  • This topic is empty.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #6034
    Anonymous
    Inactive

    Hi,

    I set up an installation using the AMS2 and the control software communicates with the board and works fine in manual mode. But as soon as I convert a file and start drawing, the only message I get is something like:

    > Opening file /Users/user1/Desktop/bead-chain-gear.jpg…

    >
    > 4183 points,
    Finding greedy tour solution…
    Running Lin/Kerighan optimization…

    > 0s : 5431,82mm

    > 1s : 5278,16mm
    Converting to gcode and saving /Users/user1/Desktop/Makelangelo-master/last_official_release/OSX/temp.ngc
    Completed.
    4191 line segments.
    527.6517cm of line.
    Estimated 5m38s s to draw.

    >
    >
    >
    >
    >
    >
    > M110 N0 M110 N0
    > N0 CONFIG T45.5 B-45.5 L-45.5 R45.5 I1 J-1;
    > BADCHECKSUM 0
    >
    >
    >
    >

    Also the > lines tick away without a pause. I am quite sure that I installed the newest versions of firmware and OSX app. Any ideas why this checksum thing occurs?

    Thanks.

    #6775
    Anonymous
    Inactive

    When the PC sends a message to the arduino there is a very small chance that one character doesn’t get transmitted, or gets sent garbled. The software adds up all the characters in a message and the lowest 8 bits form a checksum. On the receiving end the arduino also adds up all the characters and does the same checksum. If they match, the message is processed. If they don’t, BADCHECKSUM [line number]. the PC then knows to resend the failed line. If somehow BADCHECKSUM *also* gets garbled, the PC would then try to send [line number+1], and arduino would send BADLINENUM [line number].

    Does the message match what’s in the /temp.ngc file?
    Have you tried another USB cable?

    I suspect it’s the AMS firmware that’s angry about something but I want to rule out the most obvious solutions first.

    #6776
    Anonymous
    Inactive

    Hold on…

    M110 N0 M110 N0

    ?

    That doesn’t look right. it should be

    M110 N0

    Hrm…

    #6777
    Anonymous
    Inactive

    Had the same error. Tried switching out the USB but no luck. Also verified the gcode and tried eliminating the config info but still no luck.

    #6778
    Anonymous
    Inactive

    I have been running tests to try and reproduce the problem. I will get you a solution ASAP.

    #6779
    Anonymous
    Inactive

    Great….thanks! Wanted to let you know that I also get the double M110 N0 before hitting BAD CHECKSUM.

    #6780
    Anonymous
    Inactive

    I’ve just tested release #80 with AMS1 and the latest firmware. I see that I can load a picture and start a drawing.
    If I try jog motors or pen up/down before that, the board appears to hang. Probably something got broken when I merged the code for AMS1 and AMS2.

    I will be looking into this immediately.

    HOWEVER

    I will put your name in the credits if you spot the problem in the code first.

    #6781
    Anonymous
    Inactive

    I am running the latest AMS firmware with the v1 board. I see a problem on one machine and no problem on the other. I suspect the servo is somehow causing a problem, but the issue isn’t BADCHECKSUM. While I’m still looking into this, I’m low on ideas. Anyone?

    #6782
    Anonymous
    Inactive

    Same problem here.

    just got the Makelangelo3 monday, so i thought i was doing something wrong.
    in my case the motors are connected with a few extenders.

    #6783
    Anonymous
    Inactive

    Running latest firmware with AFMS v2. Will try with servo disconnected.

    #6784
    Anonymous
    Inactive

    Any luck with this?

    #6785
    Anonymous
    Inactive

    Anyone have luck resolving this issue?

    #6786
    Anonymous
    Inactive

    I have not been able to reproduce this problem, tho I’m still trying.

    #6787
    Anonymous
    Inactive

    Some interesting feedback from people who don’t post here –

    >:(

    – has revealed that the UNO board is apparently generating checksums that don’t match the RUMBA board, even though both are running the same code. This might be some kind of compiler error.

    Anyone willing to take a crack at it before I do? search the arduino code for “checksum” and you’ll see the section that generates and compares values. I’ve tried a few ways already that haven’t succeeded.

    #6788
    Anonymous
    Inactive

    Jenelle might have found the problem.

    near line ~833

    // is there a checksum?
    if(strchr(buffer,’*’)!=0) {
    // Yes. Is it valid?
    unsigned char checksum=0;
    // CHANGE BEGINS HERE
    int c=0;
    while(buffer[c]!=’*’ && c<MAX_BUF) checksum ^= buffer[c++];
    // CHANGE ENDS HERE
    c++; // skip *
    unsigned char against = (unsigned char)strtod(buffer+c,NULL);

    Seems in the arduino ‘c’ was never initialized and produced random checksum values. Wow! So small, so obvious.

    #6789
    Anonymous
    Inactive

    Updated the FW with the new changes and still get the BADCHECKSUM error. Should I just give up on the AFMS2 and upgrade to a RUMBA? Can someone post a verified working FW file for AFMS2?

    #6790
    Anonymous
    Inactive

    Got it working by reinstalling Java and running the github version of the Makelangelo app. Now the bot is drawing but dimensions are weird (stretching along Y axis). But that can probably be fixed with some configuration changes. Thanks!

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.