M21 Crashes Host

Running Repetier firmware 0.92.3 on Arduino Mega, Repetier Host 1.5.5 on Windows 8.1 Pro.  Connect to printer directly, Server stopped.  Go to  Manual Control tab and issue "M21" (no arguments) and click "send".  Crashes Repetier Host every time.  I'm trying to get SD card working, using Sainsmart 12864 LCD with integrated SD Card slot.  Seem to be stuck in a loop in Host, firmware responds but very slowly. 

Comments

  • Sure the host crashes and is not hanging? If it crashes do you have a crash report?

    What often happens is a initalization loop in firmware especially if you have sd card detect enabled. If that fails it will then retry again and again consuming nearly all cpu time of firmware making it work very slowly. You should see many initalization faile dmessages inhost log then as soon as you insert sd card.

    Also not you need not send M21. Just enable sd card in printer settings and you see it on the right side.
  • Yes, it is a crash. A pop up talks about a Microsoft.Net error, which I tried to follow into Visual Studio but I got lost. Options in the popup are to close the program or debug it. I can get a screen shot to you in the email, but haven't figured out how to post pictures here.

    The bigger purpose is to get the SD card reader working & be able to print from it. Any ideas on that? I have 2 ribbon cables from the Ramps to the display-do I need to buzz them out for broken wires or something?
  • edited September 2015
    Where can I find the log, I have definitely seen that loop & hanging, and I'm currently chasing that. This is why I sent the M21, to see if anything SD related would work. I can send a portion of that if I can locate that file.
  • To see log hit toggle log in top toolbar.

    I just tried M21 sever times without any problems. Guess it must be the combination of your firmware problem.

    Make sure cable has good contacts and is not too long. But I guess you used the one in the lcd package which should work.
  • I can see the log scrolling by quickly. But I thought it was saved to a file somewhere?
  • In preference->generl setting you can enable saving to file. Then you get a log in workdirectory (see File->Show workdirectory)
  • When inserted, a loop appears to not initialize the SD card.  Is this the same as not mounting?  Is there a way to guess which pins are not responding correctly to this command?  Following is a partial log with the SD card inserted.  At a point near the end of this log, I gave up and removed the card.

    ....

    12:59:01.501 : End file list
    12:59:01.610 : N175 M20 *50
    12:59:01.610 : SD card inserted
    12:59:03.985 : SD init fail
    12:59:03.985 : ok 171
    12:59:04.001 : Begin file list
    12:59:04.001 : End file list
    12:59:04.095 : N176 M20 *49
    12:59:04.095 : SD card inserted
    12:59:06.486 : SD init fail
    12:59:06.486 : ok 172
    12:59:08.876 : SD init fail
    12:59:08.986 : N177 M20 *48
    12:59:08.986 : SD card inserted
    12:59:11.361 : SD init fail
    12:59:11.361 : ok 173
    12:59:11.361 : Begin file list
    12:59:11.376 : End file list
    12:59:11.486 : N178 M20 *63
    12:59:11.486 : SD card inserted
    12:59:13.861 : SD init fail
    12:59:13.861 : ok 174
    12:59:13.861 : Begin file list
    12:59:13.861 : End file list
    12:59:13.970 : N179 M20 *62
    12:59:13.970 : SD card inserted
    12:59:16.345 : SD init fail
    12:59:16.345 : ok 175
    12:59:16.345 : Begin file list
    12:59:16.345 : End file list
    12:59:16.439 : ok 176
    12:59:16.439 : Begin file list
    12:59:16.439 : End file list
    12:59:16.439 : ok 177
    12:59:16.439 : Begin file list
    12:59:16.439 : End file list
    12:59:16.455 : ok 178
    12:59:16.455 : Begin file list
    12:59:16.455 : End file list
    12:59:16.455 : ok 179
    12:59:16.455 : Begin file list
    12:59:16.455 : End file list

  • Oh, and the M21 command does not crash Host anymore in 1.5.6, and the SD Manager tab appears to be working (although without the SD card initialized, I'm not sure this is verified).
  • If you have set a sd detection pin, the firmware automounts the sd card when inserted. This fails, so it is unmounted then detection is triggered again trying to mount. This causes a endless loop and binds all printer cpu power and makes it respond slowly. It is of course senseless to send M21 when the card can not be mounted and I guess this failure mode causes the host problems.
Sign In or Register to comment.