Deploying to gh-pages from @ Klipper3d/klipper@14a83103c3 🚀

This commit is contained in:
KevinOConnor
2024-09-06 00:04:39 +00:00
parent 6478486f2c
commit 6d8124a0cc
303 changed files with 23968 additions and 2228 deletions

View File

@@ -477,27 +477,34 @@
获取 Klipper 配置文件
</a>
</li>
<li class="md-nav__item">
<a href="#interacting-with-klipper" class="md-nav__link">
Interacting with Klipper
</a>
</li>
<li class="md-nav__item">
<a href="#obtaining-an-os-image-for-sbcs" class="md-nav__link">
Obtaining an OS image for SBC's
</a>
</li>
<li class="md-nav__item">
<a href="#installing-via-kiauh" class="md-nav__link">
Installing via KIAUH
</a>
</li>
<li class="md-nav__item">
<a href="#_2" class="md-nav__link">
准备操作系统镜像
</a>
</li>
<li class="md-nav__item">
<a href="#_3" class="md-nav__link">
构建和刷写微控制器
</a>
</li>
<li class="md-nav__item">
<a href="#klipper-octoprint" class="md-nav__link">
为Klipper配置 OctoPrint
</a>
</li>
<li class="md-nav__item">
@@ -522,8 +529,8 @@
<li class="md-nav__item">
<a href="OctoPrint.md" class="md-nav__link">
None
<a href="OctoPrint.html" class="md-nav__link">
OctoPrint for Klipper
</a>
</li>
@@ -1345,8 +1352,8 @@
<li class="md-nav__item">
<a href="Eddy_Probe.md" class="md-nav__link">
None
<a href="Eddy_Probe.html" class="md-nav__link">
Eddy 感应涡流探针
</a>
</li>
@@ -1405,27 +1412,34 @@
获取 Klipper 配置文件
</a>
</li>
<li class="md-nav__item">
<a href="#interacting-with-klipper" class="md-nav__link">
Interacting with Klipper
</a>
</li>
<li class="md-nav__item">
<a href="#obtaining-an-os-image-for-sbcs" class="md-nav__link">
Obtaining an OS image for SBC's
</a>
</li>
<li class="md-nav__item">
<a href="#installing-via-kiauh" class="md-nav__link">
Installing via KIAUH
</a>
</li>
<li class="md-nav__item">
<a href="#_2" class="md-nav__link">
准备操作系统镜像
</a>
</li>
<li class="md-nav__item">
<a href="#_3" class="md-nav__link">
构建和刷写微控制器
</a>
</li>
<li class="md-nav__item">
<a href="#klipper-octoprint" class="md-nav__link">
为Klipper配置 OctoPrint
</a>
</li>
<li class="md-nav__item">
@@ -1453,22 +1467,27 @@
<h1 id="_1">安装<a class="headerlink" href="#_1" title="Permanent link">&para;</a></h1>
<p>本教程假定软件将会在树莓派上和 Octoprint 一起运行。推荐使用树莓派2/3/4作为主机关于其他设备请见<a href="FAQ.html#我可以在-Raspberry-Pi-3-以外的其他设备上运行-Klipper-吗?">常见问题</a>)。</p>
<p>These instructions assume the software will run on a linux based host running a Klipper compatible front end. It is recommended that a SBC(Small Board Computer) such as a Raspberry Pi or Debian based Linux device be used as the host machine (see the <a href="FAQ.html#can-i-run-klipper-on-something-other-than-a-raspberry-pi-3">FAQ</a> for other options).</p>
<p>For the purposes of these instructions host relates to the Linux device and mcu relates to the printboard. SBC relates to the term Small Board Computer such as the Raspberry Pi.</p>
<h2 id="klipper">获取 Klipper 配置文件<a class="headerlink" href="#klipper" title="Permanent link">&para;</a></h2>
<p>大多数的 Klipper 设置是由保存在树莓派上的"打印机配置文件"决定的。通常可以在Klipper <a href="https://github.com/Klipper3d/klipper/blob/master/config/">配置文件夹</a>中找到一个以"printer-"前缀开头并与目标打印机相对应的配置文件。Klipper 配置文件包含安装过程中需要的打印机技术信息。</p>
<p>Most Klipper settings are determined by a "printer configuration file" printer.cfg, that will be stored on the host. An appropriate configuration file can often be found by looking in the Klipper <a href="https://github.com/Klipper3d/klipper/blob/master/config/">config directory</a> for a file starting with a "printer-" prefix that corresponds to the target printer. The Klipper configuration file contains technical information about the printer that will be needed during the installation.</p>
<p>如果 Klipper 配置目录中没有合适的打印机配置文件,请尝试搜索打印机制造商的网站,看看他们是否有合适的 Klipper 配置文件。</p>
<p>如果找不到打印机的配置文件但可以找到打印机控制板的类型则可以查找以“generic-”前缀开头的适当 <a href="https://github.com/Klipper3d/klipper/blob/master/config/">配置文件</a>。这些示例打印机模板文件应该足以成功完成初始安装,但需要进行一些自定义才能获得完整的打印机功能。</p>
<p>也可以从头开始定义一个新的打印机配置。然而,这需要关于打印机及其电子系统的大量技术知识。建议大多数用户从一个适当的配置文件开始。如果需要创建一个新的自定义打印机配置文件,那么可以先从最接近的<a href="https://github.com/Klipper3d/klipper/blob/master/config/">配置文件</a>的例子开始,并从 Klipper <a href="Config_Reference.html">配置参考文档</a>了解进一步信息。</p>
<h2 id="_2">准备操作系统镜像<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h2>
<p>先在树莓派上安装 <a href="https://github.com/guysoft/OctoPi">OctoPi</a>。请使用OctoPi v0.17.0或更高版本,查看 <a href="https://github.com/guysoft/OctoPi/releases">Octopi 发行版</a>来获取最新发布版本。安装完系统后,请先验证 OctoPi 能正常启动,并且 OctoPrint 网络服务器正常运行。连接到 OctoPrint 网页后,按照提示将 OctoPrint 更新到v1.4.2或更高版本。</p>
<p>在安装 OctoPi 和升级 OctoPrint 后,用 ssh 连接目标设备以运行少量的系统命令。如果使用Linux或MacOS系统那么 "ssh"软件应该已经预装在系统上。有一些免费的ssh客户端可用于其他操作系统例如<a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a>。使用ssh工具连接到Raspberry Pissh pi@octopi --密码是 "raspberry"),并运行以下命令:</p>
<div class="highlight"><pre><span></span><code>git clone https://github.com/Klipper3d/klipper
./klipper/scripts/install-octopi.sh
</code></pre></div>
<p>以上将会下载 Klipper 、安装一些系统依赖、设置 Klipper 在系统启动时运行并启动Klipper 主机程序。这将需要互联网连接以及可能需要几分钟时间才能完成。</p>
<h2 id="_3">构建和刷写微控制器<a class="headerlink" href="#_3" title="Permanent link">&para;</a></h2>
<p>在编译微控制器代码之前,先在树莓派上运行这些命令:</p>
<h2 id="interacting-with-klipper">Interacting with Klipper<a class="headerlink" href="#interacting-with-klipper" title="Permanent link">&para;</a></h2>
<p>Klipper is a 3d printer firmware, so it needs some way for the user to interact with it.</p>
<p>Currently the best choices are front ends that retrieve information through the <a href="https://moonraker.readthedocs.io/">Moonraker web API</a> and there is also the option to use <a href="https://octoprint.org/">Octoprint</a> to control Klipper.</p>
<p>The choice is up to the user on what to use, but the underlying Klipper is the same in all cases. We encourage users to research the options available and make an informed decision.</p>
<h2 id="obtaining-an-os-image-for-sbcs">Obtaining an OS image for SBC's<a class="headerlink" href="#obtaining-an-os-image-for-sbcs" title="Permanent link">&para;</a></h2>
<p>There are many ways to obtain an OS image for Klipper for SBC use, most depend on what front end you wish to use. Some manafactures of these SBC boards also provide their own Klipper-centric images.</p>
<p>The two main Moonraker based front ends are <a href="https://docs.fluidd.xyz/">Fluidd</a> and <a href="https://docs.mainsail.xyz/">Mainsail</a>, the latter of which has a premade install image <a href="http://docs.mainsailOS.xyz">"MainsailOS"</a>, this has the option for Raspberry Pi and some OrangePi varianta.</p>
<p>Fluidd can be installed via KIAUH(Klipper Install And Update Helper), which is explained below and is a 3rd party installer for all things Klipper.</p>
<p>OctoPrint can be installed via the popular OctoPi image or via KIAUH, this process is explained in <OctoPrint.md></p>
<h2 id="installing-via-kiauh">Installing via KIAUH<a class="headerlink" href="#installing-via-kiauh" title="Permanent link">&para;</a></h2>
<p>Normally you would start with a base image for your SBC, RPiOS Lite for example, or in the case of a x86 Linux device, Ubuntu Server. Please note that Desktop variants are not recommended due to certain helper programs that can stop some Klipper functions working and even mask access to some print boards.</p>
<p>KIAUH can be used to install Klipper and its associated programs on a variety of Linux based systems that run a form of Debian. More information can be found at <a href="https://github.com/dw-0/kiauh">https://github.com/dw-0/kiauh</a></p>
<h2 id="_2">构建和刷写微控制器<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h2>
<p>To compile the micro-controller code, start by running these commands on your host device:</p>
<div class="highlight"><pre><span></span><code>cd ~/klipper/
make menuconfig
</code></pre></div>
@@ -1486,26 +1505,28 @@ make menuconfig
<div class="highlight"><pre><span></span><code>/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
</code></pre></div>
<p>通常每一个打印机都有自己独特的串口名,这个独特串口名将会在刷写微处理器时用到。在上述输出中可能有多行。如果是这样的话选择与微控制器相应的 (查看<a href="FAQ.html#wheres-my-serial-port">FAQ</a>了解更多信息).</p>
<p>对于常见的微控制器,可以用类似以下的方法来刷写固件:</p>
<p>It's common for each printer to have its own unique serial port name. This unique name will be used when flashing the micro-controller. It's possible there may be multiple lines in the above output - if so, choose the line corresponding to the micro-controller. If many items are listed and the choice is ambiguous, unplug the board and run the command again, the missing item will be your print board(see the <a href="FAQ.html#wheres-my-serial-port">FAQ</a> for more information).</p>
<p>For common micro-controllers with STM32 or clone chips, LPC chips and others it is usual that these need an initial Klipper flash via SD card.</p>
<p>When flashing with this method, it is important to make sure that the print board is not connected with USB to the host, due to some boards being able to feed power back to the board and stopping a flash from occuring.</p>
<p>For common micro-controllers using Atmega chips, for example the 2560, the code can be flashed with something similar to:</p>
<div class="highlight"><pre><span></span><code>sudo service klipper stop
make flash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
sudo service klipper start
</code></pre></div>
<p>请务必用打印机的唯一串行端口名称来更新 FLASH_DEVICE 参数。</p>
<p>第一次刷写时要确保 OctoPrint 没有直接连接到打印机(在 OctoPrint 网页的 "连接 "分段中点击 "断开连接")。</p>
<h2 id="klipper-octoprint">为Klipper配置 OctoPrint<a class="headerlink" href="#klipper-octoprint" title="Permanent link">&para;</a></h2>
<p>OctoPrint网络服务器需要进行配置以便与Klipper host 软件进行通信。使用网络浏览器登录到OctoPrint网页然后配置以下项目</p>
<p>导航到 "设置 "(页面顶部的扳手图标)。在 "串行连接 "下的 "附加串行端口 "中添加"/tmp/printer"。然后点击 "保存"。</p>
<p>再次进入 "设置",在 "串行连接" 下将 "串行端口" 设置改为"/tmp/printer"。</p>
<p>在 "设置 "中,浏览到 "Behavior "子选项卡,选择 "取消任何正在进行的打印,但保持与打印机的连接 "选项。点击 "保存"。</p>
<p>在主页上,在 "连接 "部分(在页面的左上方),确保 "串行端口 "被设置为"/tmp/printer",然后点击 "连接"。(如果"/tmp/printer "不是一个可用的选择,那么试着重新加载页面)</p>
<p>连接后,导航到 "终端 "选项卡,在命令输入框中输入 "status"(不带引号),然后点击 "发送"。终端窗口可能会报告在打开配置文件时出现了错误--这意味着 OctoPrint 与 Klipper 成功地进行了通信。继续下一部分。</p>
<p>For common micro-controllers using RP2040 chips, the code can be flashed with something similar to:</p>
<div class="highlight"><pre><span></span><code>sudo service klipper stop
make flash FLASH_DEVICE=first
sudo service klipper start
</code></pre></div>
<p>It is important to note that RP2040 chips may need to be put into Boot mode before this operation.</p>
<h2 id="klipper_1">配置 Klipper<a class="headerlink" href="#klipper_1" title="Permanent link">&para;</a></h2>
<p>下一步是将<a href="#obtain-a-klipper-configuration-file">打印机配置文件</a>复制到Raspberry Pi。</p>
<p>编写 Klipper 配置文件的最简单方法是使用支持通过“scp”和/或“sftp”协议编辑文件的桌面编辑器。一些免费提供的工具支持这一点例如Notepad ++WinSCP和Cyberduck。在编辑器中加载打印机配置文件然后将其另存为 pi 用户主目录中名为“printer.cfg”的文件即 /home/pi/printer.cfg)。</p>
<p>另外,也可以通过 ssh 在树莓派上直接复制和编辑该文件。这可能看起来像下面这样(请确保更新命令以使用适当的打印机配置文件):</p>
<p>The next step is to copy the <a href="#obtain-a-klipper-configuration-file">printer configuration file</a> to the host.</p>
<p>Arguably the easiest way to set the Klipper configuration file is using the built in editors in Mainsail or Fluidd. These will allow the user to open the configuration examples and save them to be printer.cfg.</p>
<p>Another option is to use a desktop editor that supports editing files over the "scp" and/or "sftp" protocols. There are freely available tools that support this (eg, Notepad++, WinSCP, and Cyberduck). Load the printer config file in the editor and then save it as a file named "printer.cfg" in the home directory of the pi user (ie, /home/pi/printer.cfg).</p>
<p>Alternatively, one can also copy and edit the file directly on the host via ssh. That may look something like the following (be sure to update the command to use the appropriate printer config filename):</p>
<div class="highlight"><pre><span></span><code>cp ~/klipper/config/example-cartesian.cfg ~/printer.cfg
nano ~/printer.cfg
</code></pre></div>
@@ -1523,9 +1544,9 @@ nano ~/printer.cfg
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
</code></pre></div>
<p>在创建和编辑该文件后必须在OctoPrint网络终端发出"restart"命令以加载配置。如果Klipper配置文件被成功读取并且成功找到并配置了微控制器那么"status"命令将报告打印机已准备就绪。</p>
<p>After creating and editing the file it will be necessary to issue a "restart" command in the command console to load the config. A "status" command will report the printer is ready if the Klipper config file is successfully read and the micro-controller is successfully found and configured.</p>
<p>在定制打印机配置文件时Klipper 报告配置错误是很正常的情况。如果发生错误,请对打印机配置文件进行必要的修正,并发出"restart",直到"status"报告打印机已准备就绪。</p>
<p>Klipper通过OctoPrint终端标签报告错误信息。可以使用 "status "命令来重新报告错误信息。默认的Klipper启动脚本也在<strong>/tmp/klippy.log</strong>中放置一个日志,提供更详细的信息。</p>
<p>Klipper reports error messages via the command console and via pop up in Fluidd and Mainsail. The "status" command can be used to re-report error messages. A log is available and usually located in ~/printer_data/logs this is named klippy.log</p>
<p>在Klipper报告打印机已就绪后继续进入<a href="Config_checks.html">配置检查文件</a>,对配置文件中的定义进行一些基本检查。其他信息见主<a href="Overview.html">文档参考</a></p>
@@ -1561,13 +1582,13 @@ serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
<a href="Config_Reference.html" class="md-footer__link md-footer__link--next" aria-label="下一页: 配置参考" rel="next">
<a href="OctoPrint.html" class="md-footer__link md-footer__link--next" aria-label="下一页: OctoPrint for Klipper" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
下一页
</span>
配置参考
OctoPrint for Klipper
</div>
</div>
<div class="md-footer__button md-icon">