GRBL Serial problem "Recv: k" instead of "Recv: ok"

What is the problem?

I use GRBL for my SandTable. Octoprint send the gcode avec for each line of gcode GRBL (Arduino UNO) send "ok"'s to tell octoprint it's time for the next command. Sometimes, instead of "ok" it receives a "k" and the whole system stops. I need to manually fake acknowledge to continue the print. Do you know a way to go around it ?

What did you already try to solve it?

I tried every cable I could find, even one with double ferrite baud on it

Have you tried running in safe mode?


Did running in safe mode solve the problem?

I don't think it would

Hello @zigoto1000 !

What's about the systeminfo bundle?

Please attach it to your next post.

This simple single file plugin may fix the issue for you. Go into plugin manager > get more and at the bottom in the ...from URL field copy/paste the following URL and click install.. Once installed, restart OctoPrint.

Thanks a lot for you answer ! I really love your playlist plugin btw.
I was wondering if i could also do the same for the letter "o" because sometimes it happens with this letter. Is this code correct to solve my problem ? (sorry i suck at programming) :

Yes, theoretically that would work.

Hello again... To my surprise the plugin doesn't fix the problem. I tried the original plugin you gave me and it's still not working :
Do you have another solution ?
Thanks a lot for your help btw

do me a favor and enable serial logging in OctoPrint's settings to capture the exact communication and share the serial.log here. it would be something silly like the line being sent is "k " instead of just "k".

Curious if @synman has seen this before with grbl and might know a fix on the firmware side of things.

I fixed the problem ! Sorry for the inconvenience I should have given you the serial.log before.
Your code was great but I thought it could be better with the line.replace() function. Here is the plugin that worked for my case :
Tell me if you still need the serial.log file if you want to investigate for further problem :slight_smile:

Weird that mine didn't work for this based on looking at the other one. I would be concerned with their approach though because if an "ok" is returned then it will match if "k" in line and then return "ook" in the replace, but if it's working for you I don't need the serial log.

1 Like

unclear what all the OP is trying to do. I can tell by the terminal screenshot they are not using the Better Grbl Support Plugin -- default filters give it away.

They're trying to get around what appears to be broken serial comms from the GRBL firmware where it only returns an o or k instead of an ok as response to a command.