Can't connect to i3 MK2S: Endless loop of Error:Line Number is not Last Line Number+1, Last Line: 0

I'm having some problem connecting to Prusa i3 MK2S. Pronterface doesn't complain except when I click print, but it's complaint is for a different gcode "M201" and runs perfectly fine. But...

I like the better UI in Repetier Host but I can't get the program to connect to my printer. Here's the log file: https://pastebin.com/gBDvgP2A

Version of Repetier host is 2.1.3. Version of Firmware is Marlin V1.0.2. Prusa hasn't pushed any updates for the MK2S since Nov 12th 2017.

There was a post I saw somewhere mentioning that commands were being sent too quick before the printer had time to startup with M999. https://www.bountysource.com/issues/43745252-m110-set-line-number-to-current-repetierhost I don't know if that has any use here.

The host if on the correct baud of 115200 will display the hotend and bed temperatures at the bottom of the program before the host terminates the connection attempt from too many failures.

I'm looking for instructions to troubleshoot if you have any.
If you need more info let me know.

Comments

  • Looks like a firmware bug. Nothing delay related. There was a short time a bug in marlin handling  N1 M110 wrong (expecting N0 and nothing else would work). For that reason setting it to line 1 causes the wrong line number error.

    Solution therefore is up or downgrading firmware.

    Prusa firmware sources still contain MK2 configuration files, so it would be worth a try to see if they also still compile. I think they only stopped publishing binary versions of updates.
  • Their website only lists a firmware from November 12th 2017 as the latest one. I don't know where else to look.

    Is it possible to modify the current firmware and remove the bug? Do we know for sure what the issue is? I'm not great with github but Prusa has precompiled firmware there.

    Is it possible to adjust host startup commands with the Start Code script in Printer Settings?

    I've read that Repetier Server handles communication slightly differently, can I use the Host as a frontend while the Server communicates between Host and Printer?
  • https://www.prusa3d.com/drivers/#_ga=2.18187248.878759437.1553846541-1248160477.1553846541

    it offers version 3.6 from 1. march 2019 for MK2S so there is a recent version that should work.

    Server works different and you can connect over host, but it also sends N1 M110 I think.
  • edited March 29
    Repetier said:
    https://www.prusa3d.com/drivers/#_ga=2.18187248.878759437.1553846541-1248160477.1553846541

    it offers version 3.6 from 1. march 2019 for MK2S so there is a recent version that should work.

    Server works different and you can connect over host, but it also sends N1 M110 I think.
    That's for the Mk3S, I have the MK2S. MK3S uses an Einsy board and MK2S uses a Rambo mini.

    I might be able to use the MK2.5/MK2.5S firmware though if I comment out the features I don't have.
    Took a look at the M110 command in firmware for both MK2S (left) and MK3 (right). There is certainly a difference. I'll play around with changing snippets of code and giving them a test. Any thing I need to do to protect my printer while I'm testing?

  • Ok, see the wrong version. Thought you had 2.5S.
    For 2MKS the release notes to 3.1 even state: 
    • There’s a known bug using Repetier server, please wait for the next release if you’re using it
    And host behaves the same.
    Not sure the bug is where you post but it might be as that is the error message you see. In theory they search for M110 and will not send the error message but order is N1 M110 and not M110 N1. I'm not sure but I think the order had to with the error meaning they did not see the M110 also it was in the line.

    As long as you only change the parser there is not much to watch out. Just make sure the configuration is for MKS2S that is active and it should work.
  • I'll give it some testing and come back in a couple days with results.

    Thanks.
  • edited April 4
    I did a lot more snooping playing around than I should have. But I eventually listened to my logical other half and started small. First try and it's working. There were some differences I noticed like CMDHDRSIZE being mentioned and defined as 3 in the MK3 firmware. And the MK3 firmware had CMDBUFFER_DEBUG defined also.

    But all I did was add "gcode_N = 0;" before the M110 command is performed and it seems to have connected now. I now have control over the printer without issues. I'm going to start some prints and give it some more testing. Connection to Pronterface doesn't seem to be affected either.


    Here's the log file from Host with a test move and home: https://pastebin.com/6WU7cMy5

    For now consider the Prusa i3 MK2S with repeating connection error on Repetier Host fixed. I'm sure all I did was slap on a band-aid. I don't know if this will mess up the command structure later on.

  • Good that it works also I do not really understand why. At least in the following block it should overwrite the value with N value from gcode. But the fact that it works should be good enough since server uses always same M110 command I think. You can test if manually sending
    M110 N60
    would also work. That might fail since previous line is not 59, or you ignore that since you do not need it in that variant, so no real need to have perfect solution.
Sign In or Register to comment.