<p>This post was the only place on the internet, that described the issue I was having, and it was very frustrating that it was unanswered. I know this thread is old, but just in case someone else wants to know the answer to this in the future, here it is...</p>
<p>He asked about unified or bilinear for bed leveling, just wanted to let you know, after going thru the source code for the CR10, I can confirm that they are using bilinear leveling if that helps anyone.</p>
<p>I had the same issue and took me a very long time to get past it. I had installed a new motherboard, and on boot up, I am getting the same, cant level due to must home XYZ first, when homing XYZ first everything reboots. Well not really, will get into that in a minute.</p>
<p>Also, I should mention that due to the lack of features on the CR10, I use Octoprint as a front end, for my CR10 Smart Pro, and I do not have an LCD hooked up to it <em>(it got fried while replacing the motherboard)</em>, it's possible the stock LCD firmware has some code that gets around this loop, or better yet it just ignores the invalid mesh error, as you will see below, that is what we need to get past this.</p>
<p>He says he runs <code>G28</code>, but gets an invalid mesh error, then the printer reboots. Sounds the same, to me, but my printer is not rebooting, what is happening here is Octoprint is closing the serial connection to the CR10. Octoprint has a bad habit of doing this on <strong>any</strong> error that is echoed in the console.</p>
<p>Ok, so on any <strong>error</strong>, Octoprint disconnects from the printer, what we all need to understand here, is this: neither the CR10 nor Octoprint reboots when this happens. Octoprint disconnects from the printer due to an error being echoed in the serial console, and the CR10 takes no action and is now just sitting there.</p>
<p>Depending on your PC, or Pi hardware, you can just reconnect to the printer by selecting connect again from Octoprint, now this doesn't always work, and you might have to reboot the PC or Pi that is running Octoprint. After reboot, you should be able to reconnect and this is all without the CR10 rebooting at all unless you're also rebooting it along with the Pi or PC. &lt;-- <strong>Don't do that!!</strong></p>
<p>As far as the CR10 Smart Pro knows, the last thing you tried was a <code>G28</code> command, it then homed the printer. After homing, it tried to turn on bed leveling, causing it to report an invalid mesh error, but that is all it did. What's important is that it did home and unless you reboot it or let it timeout, that home is still valid.</p>
<p>I believe at this point you can run <code>G29</code>, and it will do the auto level, creating a new mesh that can be saved with <code>M500</code> after it completes. I say believe because I have no way to test that now because I did something a little different to fix mine to get rid of the invalid mesh message.</p>
<p>I ran <code>G28 L0</code>, that command is supposed to do a normal auto home, but not enable bed leveling at the end. We don't want to try turning it on, because that is what kicks off the mesh error because there is no mesh yet.</p>
<p>First off, I used Pronterface instead of Octoprint, due to the error above, but don't think you really need to use it, but just wanted to put it out there; I did not do this from Octoprint.</p>
<p>First I tried this, with debug turned on</p>
<pre><code>    &gt;&gt;&gt; G29
    SENDING:G29
    echo:G29
    echo:Home XYZ First
</code></pre>
<p>So then tried to home it, and this happens, basically the root of the problem.</p>
<pre><code>    &gt;&gt;&gt; G28
    SENDING:G28
    echo:G28
    echo:Invalid mesh.
</code></pre>
<p>After reading the Marlin G-code docs on <code>G28</code>, I found the <code>L0</code> option. It is supposed to turn off bed leveling, at the end of homing, instead of the default turning it on.</p>
<pre><code>    &gt;&gt;&gt; G28 L0 
    SENDING:G28 L0
    echo:G28 L0
    echo:Invalid mesh.
    Error:Failed to enable Bed Leveling
    Error:Failed to enable Bed Leveling
    
    echo:Bed Leveling OFF
    echo:Fade Height OFF
</code></pre>
<p>As you can see, it still gives an invalid mesh error. This is where people using Octoprint will be disconnected, causing them to reboot everything to get back in, and if they reboot their printer, well, then the last home command means nothing then.</p>
<p>However with Pronterface it does not disconnect, so I issued this right after...</p>
<pre><code>    &gt;&gt;&gt; G29
    SENDING:G29
    echo:G29
    Bilinear Leveling Grid:
          0      1      2      3      4
     0 +0.106 +0.114 +0.094 +0.039 -0.047
     1 +0.025 +0.056 +0.063 +0.043 +0.036
     2 -0.160 -0.040 +0.035 +0.074 +0.111
     3 -0.237 -0.117 -0.007 +0.078 +0.171
     4 -0.384 -0.257 -0.144 -0.034 +0.094
    Subdivided with CATMULL ROM Leveling Grid:
            0        1        2        3        4        5        6        7        8        9       10       11       12
     0 +0.10650 +0.11002 +0.11354 +0.11400 +0.11067 +0.10428 +0.09400 +0.07941 +0.06093 +0.03900 +0.01263 -0.01719  =======
     1 +0.08337 +0.08846 +0.09354 +0.09587 +0.09479 +0.09096 +0.08356 +0.07163 +0.05613 +0.03913 +0.02082 +0.00100  =======
     2 +0.06024 +0.06689 +0.07355 +0.07774 +0.07892 +0.07764 +0.07311 +0.06384 +0.05133 +0.03926 +0.02900 +0.01919  =======
     3 +0.02550 +0.03633 +0.04717 +0.05550 +0.06070 +0.06341 +0.06300 +0.05770 +0.04930 +0.04250 +0.03943 +0.03796  =======
     4 -0.03259 -0.01203 +0.00853 +0.02574 +0.03850 +0.04792 +0.05398 +0.05509 +0.05284 +0.05196 +0.05451 +0.05843  =======
     5 -0.10230 -0.06940 -0.03650 -0.00813 +0.01396 +0.03153 +0.04530 +0.05412 +0.05914 +0.06454 +0.07182 +0.07949  =======
     6 -0.16000 -0.11833 -0.07667 -0.04000 -0.01033 +0.01433 +0.03500 +0.05076 +0.06252 +0.07400 +0.08635 +0.09843  =======
     7 -0.19126 -0.14779 -0.10432 -0.06487 -0.03085 -0.00084 +0.02537 +0.04663 +0.06409 +0.08148 +0.10001 +0.11847  =======
     8 -0.21052 -0.16882 -0.12712 -0.08774 -0.05112 -0.01682 +0.01413 +0.04011 +0.06274 +0.08585 +0.11088 +0.13640  =======
     9 -0.23750 -0.19713 -0.15676 -0.11750 -0.07917 -0.04194 -0.00750 +0.02235 +0.04943 +0.07750 +0.10817 +0.13983 +0.17150
    10 -0.28135 -0.24039 -0.19943 -0.15941 -0.12026 -0.08205 -0.04591 -0.01335 +0.01715 +0.04898 +0.08374 +0.11983 +0.15593
    11 -0.33293 -0.29094 -0.24895 -0.20820 -0.16913 -0.13130 -0.09470 -0.06028 -0.02709 +0.00774 +0.04572 +0.08534 +0.12496
    12 -0.38450 -0.34148 -0.29846 -0.25700 -0.21800 -0.18056 -0.14350 -0.10722 -0.07133 -0.03350 +0.00770 +0.05085 +0.09400
    echo:Settings Stored (724 bytes; crc 46126)
</code></pre>

CC BY-SA 4.0
2023-02-12T17:16:26.220Z
Thank you for this: you have more staying power than I. I solved the problem by replacing the CR10 with a Prusa, with which I have had no problems at all and also achieve better quality prints. If I ever try to resurrect the CR10 I'll use your guidance to try and make it work, but I'm in no hurry to renew my acquaintance with Creality or any of their products.
Stephen Winnall
CC BY-SA 4.0
2023-02-12T08:06:27.517Z
2023-02-12T14:16:49.033Z
2023-02-12T14:16:49.033Z
Howard
<p>My Creality CR-10 Smart 3D printer has built-in auto bed levelling (ABL). It appears that it is cannot do anything if ABL is not set up properly. Setting up ABL entails creating a valid <em>mesh</em>.</p>
<p>I am using the latest firmware from Creality (v1.0.13), which I believe is Marlin. To set up a valid mesh in Marlin you have to execute the g-code <code>G29</code> with appropriate parameters. This begs a lot of questions, including whether you should use <em>unified</em> or <em>bilinear</em> bed levelling (whatever they are).</p>
<p>However, when you issue any <code>G29</code> command, you get the following error message:</p>
<p><a href="https://i.sstatic.net/MR49f.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MR49f.png" alt="G29 execution and response" /></a></p>
<p>In other words, you need to issue a <code>G28</code> command first. I did that, and the following happened:</p>
<p><a href="https://i.sstatic.net/hT8j8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hT8j8.png" alt="G28 execution and response" /></a></p>
<p>i.e. <code>G28</code> complains about the invalid mesh that executing <code>G29</code> is supposed to fix. In addition the printer seizes up and has to be rebooted.</p>
<p>How do I escape this vicious circle? The CR-10 Smart does not seem to offer any explicit controls to completely reinitialise the machine from the LED control panel, other than an <code>M502</code>, which does not change the behaviour of a subsequent <code>G28</code>.</p>
<p>Can anyone help with this please?</p>

CC BY-SA 4.0
2022-03-19T15:58:43.173Z
I have downgraded the firmware to v1.0.10 but the problem persists. The printer remains totally unusable.
Stephen Winnall
CC BY-SA 4.0
2022-03-19T17:25:20.390Z
Thinking I would return the printer to the shop, I reset everything, which meant disconnecting OctoPrint and reinstating Creality Cloud. I then tried to print something. It actually started to print (which it wouldn't do before). However, it stopped again almost immediately because of a supposed nozzle temperature problem. Whatever. I conclude from this that OctoPrint is part of the problem. Or perhaps Creality Cloud just doesn't expect the mesh to be set up.
Stephen Winnall
CC BY-SA 4.0
2022-03-29T18:28:21.187Z
This problem persists. Is it sensible to consider building my own Marlin hardware and replacing the Creality firmware? The alternative seems to be recycling the CR-10 Smart so something useful comes of it.
Stephen Winnall
<g-code><bed-leveling><creality-cr-10>
How do you fix an "invalid mesh" on a CR-10 Smart 3D printer?
Stephen Winnall
# How do you fix an "invalid mesh" on a CR-10 Smart 3D printer?

(Asked by: username_0 on 2022-03-12)

My Creality CR-10 Smart 3D printer has built-in auto bed levelling (ABL). It appears that it is cannot do anything if ABL is not set up properly. Setting up ABL entails creating a valid *mesh*.

I am using the latest firmware from Creality (v1.0.13), which I believe is Marlin. To set up a valid mesh in Marlin you have to execute the g-code `G29` with appropriate parameters. This begs a lot of questions, including whether you should use *unified* or *bilinear* bed levelling (whatever they are).

However, when you issue any `G29` command, you get the following error message:

[![G29 execution and response](https://i.sstatic.net/MR49f.png)](https://i.sstatic.net/MR49f.png)

In other words, you need to issue a `G28` command first. I did that, and the following happened:

[![G28 execution and response](https://i.sstatic.net/hT8j8.png)](https://i.sstatic.net/hT8j8.png)

i.e. `G28` complains about the invalid mesh that executing `G29` is supposed to fix. In addition the printer seizes up and has to be rebooted.

How do I escape this vicious circle? The CR-10 Smart does not seem to offer any explicit controls to completely reinitialise the machine from the LED control panel, other than an `M502`, which does not change the behaviour of a subsequent `G28`.

Can anyone help with this please?

**Tags:** g-code, bed-leveling, creality-cr-10
> **Comments:**
> **username_0**: I have downgraded the firmware to v1.0.10 but the problem persists. The printer remains totally unusable.  
> **username_0**: Thinking I would return the printer to the shop, I reset everything, which meant disconnecting OctoPrint and reinstating Creality Cloud. I then tried to print something. It actually started to print (which it wouldn't do before). However, it stopped again almost immediately because of a supposed nozzle temperature problem. Whatever. I conclude from this that OctoPrint is part of the problem. Or perhaps Creality Cloud just doesn't expect the mesh to be set up.  
> **username_0**: This problem persists. Is it sensible to consider building my own Marlin hardware and replacing the Creality firmware? The alternative seems to be recycling the CR-10 Smart so something useful comes of it.  

---

## 1 answers

### Answer by username_1 on 2023-02-12. Score: 3

This post was the only place on the internet, that described the issue I was having, and it was very frustrating that it was unanswered. I know this thread is old, but just in case someone else wants to know the answer to this in the future, here it is...
He asked about unified or bilinear for bed leveling, just wanted to let you know, after going thru the source code for the CR10, I can confirm that they are using bilinear leveling if that helps anyone.
I had the same issue and took me a very long time to get past it. I had installed a new motherboard, and on boot up, I am getting the same, cant level due to must home XYZ first, when homing XYZ first everything reboots. Well not really, will get into that in a minute.
Also, I should mention that due to the lack of features on the CR10, I use Octoprint as a front end, for my CR10 Smart Pro, and I do not have an LCD hooked up to it (it got fried while replacing the motherboard), it's possible the stock LCD firmware has some code that gets around this loop, or better yet it just ignores the invalid mesh error, as you will see below, that is what we need to get past this.
He says he runs G28, but gets an invalid mesh error, then the printer reboots. Sounds the same, to me, but my printer is not rebooting, what is happening here is Octoprint is closing the serial connection to the CR10. Octoprint has a bad habit of doing this on any error that is echoed in the console.
Ok, so on any error, Octoprint disconnects from the printer, what we all need to understand here, is this: neither the CR10 nor Octoprint reboots when this happens. Octoprint disconnects from the printer due to an error being echoed in the serial console, and the CR10 takes no action and is now just sitting there.
Depending on your PC, or Pi hardware, you can just reconnect to the printer by selecting connect again from Octoprint, now this doesn't always work, and you might have to reboot the PC or Pi that is running Octoprint. After reboot, you should be able to reconnect and this is all without the CR10 rebooting at all unless you're also rebooting it along with the Pi or PC. <-- Don't do that!!
As far as the CR10 Smart Pro knows, the last thing you tried was a G28 command, it then homed the printer. After homing, it tried to turn on bed leveling, causing it to report an invalid mesh error, but that is all it did. What's important is that it did home and unless you reboot it or let it timeout, that home is still valid.
I believe at this point you can run G29, and it will do the auto level, creating a new mesh that can be saved with M500 after it completes. I say believe because I have no way to test that now because I did something a little different to fix mine to get rid of the invalid mesh message.
I ran G28 L0, that command is supposed to do a normal auto home, but not enable bed leveling at the end. We don't want to try turning it on, because that is what kicks off the mesh error because there is no mesh yet.
First off, I used Pronterface instead of Octoprint, due to the error above, but don't think you really need to use it, but just wanted to put it out there; I did not do this from Octoprint.
First I tried this, with debug turned on
    >>> G29
    SENDING:G29
    echo:G29
    echo:Home XYZ First

So then tried to home it, and this happens, basically the root of the problem.
    >>> G28
    SENDING:G28
    echo:G28
    echo:Invalid mesh.

After reading the Marlin G-code docs on G28, I found the L0 option. It is supposed to turn off bed leveling, at the end of homing, instead of the default turning it on.
    >>> G28 L0 
    SENDING:G28 L0
    echo:G28 L0
    echo:Invalid mesh.
    Error:Failed to enable Bed Leveling
    Error:Failed to enable Bed Leveling
    
    echo:Bed Leveling OFF
    echo:Fade Height OFF

As you can see, it still gives an invalid mesh error. This is where people using Octoprint will be disconnected, causing them to reboot everything to get back in, and if they reboot their printer, well, then the last home command means nothing then.
However with Pronterface it does not disconnect, so I issued this right after...
    >>> G29
    SENDING:G29
    echo:G29
    Bilinear Leveling Grid:
          0      1      2      3      4
     0 +0.106 +0.114 +0.094 +0.039 -0.047
     1 +0.025 +0.056 +0.063 +0.043 +0.036
     2 -0.160 -0.040 +0.035 +0.074 +0.111
     3 -0.237 -0.117 -0.007 +0.078 +0.171
     4 -0.384 -0.257 -0.144 -0.034 +0.094
    Subdivided with CATMULL ROM Leveling Grid:
            0        1        2        3        4        5        6        7        8        9       10       11       12
     0 +0.10650 +0.11002 +0.11354 +0.11400 +0.11067 +0.10428 +0.09400 +0.07941 +0.06093 +0.03900 +0.01263 -0.01719  =======
     1 +0.08337 +0.08846 +0.09354 +0.09587 +0.09479 +0.09096 +0.08356 +0.07163 +0.05613 +0.03913 +0.02082 +0.00100  =======
     2 +0.06024 +0.06689 +0.07355 +0.07774 +0.07892 +0.07764 +0.07311 +0.06384 +0.05133 +0.03926 +0.02900 +0.01919  =======
     3 +0.02550 +0.03633 +0.04717 +0.05550 +0.06070 +0.06341 +0.06300 +0.05770 +0.04930 +0.04250 +0.03943 +0.03796  =======
     4 -0.03259 -0.01203 +0.00853 +0.02574 +0.03850 +0.04792 +0.05398 +0.05509 +0.05284 +0.05196 +0.05451 +0.05843  =======
     5 -0.10230 -0.06940 -0.03650 -0.00813 +0.01396 +0.03153 +0.04530 +0.05412 +0.05914 +0.06454 +0.07182 +0.07949  =======
     6 -0.16000 -0.11833 -0.07667 -0.04000 -0.01033 +0.01433 +0.03500 +0.05076 +0.06252 +0.07400 +0.08635 +0.09843  =======
     7 -0.19126 -0.14779 -0.10432 -0.06487 -0.03085 -0.00084 +0.02537 +0.04663 +0.06409 +0.08148 +0.10001 +0.11847  =======
     8 -0.21052 -0.16882 -0.12712 -0.08774 -0.05112 -0.01682 +0.01413 +0.04011 +0.06274 +0.08585 +0.11088 +0.13640  =======
     9 -0.23750 -0.19713 -0.15676 -0.11750 -0.07917 -0.04194 -0.00750 +0.02235 +0.04943 +0.07750 +0.10817 +0.13983 +0.17150
    10 -0.28135 -0.24039 -0.19943 -0.15941 -0.12026 -0.08205 -0.04591 -0.01335 +0.01715 +0.04898 +0.08374 +0.11983 +0.15593
    11 -0.33293 -0.29094 -0.24895 -0.20820 -0.16913 -0.13130 -0.09470 -0.06028 -0.02709 +0.00774 +0.04572 +0.08534 +0.12496
    12 -0.38450 -0.34148 -0.29846 -0.25700 -0.21800 -0.18056 -0.14350 -0.10722 -0.07133 -0.03350 +0.00770 +0.05085 +0.09400
    echo:Settings Stored (724 bytes; crc 46126)

> **Comments:**
> **username_0**: Thank you for this: you have more staying power than I. I solved the problem by replacing the CR10 with a Prusa, with which I have had no problems at all and also achieve better quality prints. If I ever try to resurrect the CR10 I'll use your guidance to try and make it work, but I'm in no hurry to renew my acquaintance with Creality or any of their products.  

---

