Deploying to gh-pages from @ Klipper3d/klipper@95676343db 🚀

This commit is contained in:
KevinOConnor committed 2022-05-17 15:37:37 +00:00
1 parent 53a7c730b3
commit 84a13c1e61
10 files changed
+84 -55

No files matched your search

+83 -54
View File
@@ -432,6 +432,13 @@
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#obtain-a-klipper-configuration-file" class="md-nav__link">
Obtain a Klipper Configuration File
</a>
</li>
<li class="md-nav__item">
<a href="#prepping-an-os-image" class="md-nav__link">
Prepping an OS image
@@ -458,13 +465,6 @@
Configuring Klipper
</a>
</li>
<li class="md-nav__item">
<a href="#contacting-the-developers" class="md-nav__link">
Contacting the developers
</a>
</li>
</ul>
@@ -1254,6 +1254,13 @@
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#obtain-a-klipper-configuration-file" class="md-nav__link">
Obtain a Klipper Configuration File
</a>
</li>
<li class="md-nav__item">
<a href="#prepping-an-os-image" class="md-nav__link">
Prepping an OS image
@@ -1280,13 +1287,6 @@
Configuring Klipper
</a>
</li>
<li class="md-nav__item">
<a href="#contacting-the-developers" class="md-nav__link">
Contacting the developers
</a>
</li>
</ul>
@@ -1312,10 +1312,30 @@ computer in conjunction with OctoPrint. It is recommended that a
Raspberry Pi 2, 3, or 4 computer 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 machines).</p>
<p>Klipper currently supports a number of Atmel ATmega based
micro-controllers,
<a href="Features.html#step-benchmarks">ARM based micro-controllers</a>, and
<a href="Beaglebone.html">Beaglebone PRU</a> based printers.</p>
<h2 id="obtain-a-klipper-configuration-file">Obtain a Klipper Configuration File<a class="headerlink" href="#obtain-a-klipper-configuration-file" title="Permanent link">&para;</a></h2>
<p>Most Klipper settings are determined by a "printer configuration file"
that will be stored on the Raspberry Pi. 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>If there isn't an appropriate printer configuration file in the
Klipper config directory then try searching the printer manufacturer's
website to see if they have an appropriate Klipper configuration file.</p>
<p>If no configuration file for the printer can be found, but the type of
printer control board is known, then look for an appropriate
<a href="https://github.com/Klipper3d/klipper/blob/master/config/">config file</a> starting with a "generic-" prefix. These
example printer board files should allow one to successfully complete
the initial installation, but will require some customization to
obtain full printer functionality.</p>
<p>It is also possible to define a new printer configuration from
scratch. However, this requires significant technical knowledge about
the printer and its electronics. It is recommended that most users
start with an appropriate configuration file. If creating a new custom
printer configuration file, then start with the closest example
<a href="https://github.com/Klipper3d/klipper/blob/master/config/">config file</a> and use the Klipper
<a href="Config_Reference.html">config reference</a> for further information.</p>
<h2 id="prepping-an-os-image">Prepping an OS image<a class="headerlink" href="#prepping-an-os-image" title="Permanent link">&para;</a></h2>
<p>Start by installing <a href="https://github.com/guysoft/OctoPi">OctoPi</a> on the
Raspberry Pi computer. Use OctoPi v0.17.0 or later - see the
@@ -1346,14 +1366,24 @@ on the Raspberry Pi:</p>
make menuconfig
</code></pre></div>
<p>Select the appropriate micro-controller and review any other options
provided. Once configured, run:</p>
<p>The comments at the top of the
<a href="#obtain-a-klipper-configuration-file">printer configuration file</a>
should describe the settings that need to be set during "make
menuconfig". Open the file in a web browser or text editor and look
for these instructions near the top of the file. Once the appropriate
"menuconfig" settings have been configured, press "Q" to exit, and
then "Y" to save. Then run:</p>
<div class="highlight"><pre><span></span><code>make
</code></pre></div>
<p>It is necessary to determine the serial port connected to the
micro-controller. For micro-controllers that connect via USB, run the
following:</p>
<p>If the comments at the top of the
<a href="#obtain-a-klipper-configuration-file">printer configuration file</a>
describe custom steps for "flashing" the final image to the printer
control board then follow those steps and then proceed to
<a href="#configuring-octoprint-to-use-klipper">configuring OctoPrint</a>.</p>
<p>Otherwise, the following steps are often used to "flash" the printer
control board. First, it is necessary to determine the serial port
connected to the micro-controller. Run the following:</p>
<div class="highlight"><pre><span></span><code>ls /dev/serial/by-id/*
</code></pre></div>
@@ -1400,31 +1430,35 @@ terminal window will likely report there is an error opening the
config file - that means OctoPrint is successfully communicating with
Klipper. Proceed to the next section.</p>
<h2 id="configuring-klipper">Configuring Klipper<a class="headerlink" href="#configuring-klipper" title="Permanent link">&para;</a></h2>
<p>The Klipper configuration is stored in a text file on the Raspberry
Pi. Take a look at the example config files in the
<a href="https://github.com/Klipper3d/klipper/blob/master/config/">config directory</a>. The
<a href="Config_Reference.html">Config Reference</a> contains documentation on
config parameters.</p>
<p>Arguably the easiest way to update the Klipper configuration file 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). Use one of the example
config files as a starting point and save it as a file named
"printer.cfg" in the home directory of the pi user (ie,
/home/pi/printer.cfg).</p>
<p>The next step is to copy the
<a href="#obtain-a-klipper-configuration-file">printer configuration file</a> to
the Raspberry Pi.</p>
<p>Arguably the easiest way to set the Klipper configuration file 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
Raspberry Pi via ssh - for example:</p>
Raspberry Pi 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>
<p>Make sure to review and update each setting that is appropriate for
the hardware.</p>
<p>It's common for each printer to have its own unique name for the
micro-controller. The name may change after flashing Klipper, so rerun
the <code>ls /dev/serial/by-id/*</code> command and then update the config file
with the unique name. For example, update the <code>[mcu]</code> section to look
something similar to:</p>
these steps again even if they were already done when flashing. Run:</p>
<div class="highlight"><pre><span></span><code>ls /dev/serial/by-id/*
</code></pre></div>
<p>It should report something similar to the following:</p>
<div class="highlight"><pre><span></span><code>/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
</code></pre></div>
<p>Then update the config file with the unique name. For example, update
the <code>[mcu]</code> section to look something similar to:</p>
<div class="highlight"><pre><span></span><code>[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
</code></pre></div>
@@ -1433,24 +1467,19 @@ serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
"restart" command in the OctoPrint web terminal 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. It is not unusual to have
configuration errors during the initial setup - update the printer
config file and issue "restart" until "status" reports the printer is
ready.</p>
successfully found and configured.</p>
<p>When customizing the printer config file, it is not uncommon for
Klipper to report a configuration error. If an error occurs, make any
necessary corrections to the printer config file and issue "restart"
until "status" reports the printer is ready.</p>
<p>Klipper reports error messages via the OctoPrint terminal tab. The
"status" command can be used to re-report error messages. The default
Klipper startup script also places a log in <strong>/tmp/klippy.log</strong> which
provides more detailed information.</p>
<p>In addition to common g-code commands, Klipper supports a few extended
commands - "status" and "restart" are examples of these commands. Use
the "help" command to get a list of other extended commands.</p>
<p>After Klipper reports that the printer is ready go on to the
<p>After Klipper reports that the printer is ready, proceed to the
<a href="Config_checks.html">config check document</a> to perform some basic checks
on the pin definitions in the config file.</p>
<h2 id="contacting-the-developers">Contacting the developers<a class="headerlink" href="#contacting-the-developers" title="Permanent link">&para;</a></h2>
<p>Be sure to see the <a href="FAQ.html">FAQ</a> for answers to some common questions.
See the <a href="Contact.html">contact page</a> to report a bug or to contact the
developers.</p>
on the definitions in the config file. See the main
<a href="Overview.html">documentation reference</a> for other information.</p>
</article>
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"Klipper is a 3d-Printer firmware. It combines the power of a general purpose computer with one or more micro-controllers. See the features document for more information on why you should use Klipper. To begin using Klipper start by installing it. Klipper is Free Software. Read the documentation or view the Klipper code on github .","title":"Welcome"},{"location":"API_Server.html","text":"API server \u00b6 This document describes Klipper's Application Programmer Interface (API). This interface enables external applications to query and control the Klipper host software. Enabling the API socket \u00b6 In order to use the API server, the klippy.py host software must be started with the -a parameter. For example: ~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log This causes the host software to create a Unix Domain Socket. A client can then open a connection on that socket and send commands to Klipper. See the Moonraker project for a popular tool that can forward HTTP requests to Klipper's API Server Unix Domain Socket. Request format \u00b6 Messages sent and received on the socket are JSON encoded strings terminated by an ASCII 0x03 character: <json_object_1><0x03><json_object_2><0x03>... Klipper contains a scripts/whconsole.py tool that can perform the above message framing. For example: ~/klipper/scripts/whconsole.py /tmp/klippy_uds This tool can read a series of JSON commands from stdin, send them to Klipper, and report the results. The tool expects each JSON command to be on a single line, and it will automatically append the 0x03 terminator when transmitting a request. (The Klipper API server does not have a newline requirement.) API Protocol \u00b6 The command protocol used on the communication socket is inspired by json-rpc . A request might look like: {\"id\": 123, \"method\": \"info\", \"params\": {}} and a response might look like: {\"id\": 123, \"result\": {\"state_message\": \"Printer is ready\", \"klipper_path\": \"/home/pi/klipper\", \"config_file\": \"/home/pi/printer.cfg\", \"software_version\": \"v0.8.0-823-g883b1cb6\", \"hostname\": \"octopi\", \"cpu_info\": \"4 core ARMv7 Processor rev 4 (v7l)\", \"state\": \"ready\", \"python_path\": \"/home/pi/klippy-env/bin/python\", \"log_file\": \"/tmp/klippy.log\"}} Each request must be a JSON dictionary. (This document uses the Python term \"dictionary\" to describe a \"JSON object\" - a mapping of key/value pairs contained within {} .) The request dictionary must contain a \"method\" parameter that is the string name of an available Klipper \"endpoint\". The request dictionary may contain a \"params\" parameter which must be of a dictionary type. The \"params\" provide additional parameter information to the Klipper \"endpoint\" handling the request. Its content is specific to the \"endpoint\". The request dictionary may contain an \"id\" parameter which may be of any JSON type. If \"id\" is present then Klipper will respond to the request with a response message containing that \"id\". If \"id\" is omitted (or set to a JSON \"null\" value) then Klipper will not provide any response to the request. A response message is a JSON dictionary containing \"id\" and \"result\". The \"result\" is always a dictionary - its contents are specific to the \"endpoint\" handling the request. If the processing of a request results in an error, then the response message will contain an \"error\" field instead of a \"result\" field. For example, the request: {\"id\": 123, \"method\": \"gcode/script\", \"params\": {\"script\": \"G1 X200\"}} might result in an error response such as: {\"id\": 123, \"error\": {\"message\": \"Must home axis first: 200.000 0.000 0.000 [0.000]\", \"error\": \"WebRequestError\"}} Klipper will always start processing requests in the order that they are received. However, some request may not complete immediately, which could cause the associated response to be sent out of order with respect to responses from other requests. A JSON request will never pause the processing of future JSON requests. Subscriptions \u00b6 Some Klipper \"endpoint\" requests allow one to \"subscribe\" to future asynchronous update messages. For example: {\"id\": 123, \"method\": \"gcode/subscribe_output\", \"params\": {\"response_template\":{\"key\": 345}}} may initially respond with: {\"id\": 123, \"result\": {}} and cause Klipper to send future messages similar to: {\"params\": {\"response\": \"ok B:22.8 /0.0 T0:22.4 /0.0\"}, \"key\": 345} A subscription request accepts a \"response_template\" dictionary in the \"params\" field of the request. That \"response_template\" dictionary is used as a template for future asynchronous messages - it may contain arbitrary key/value pairs. When sending these future asynchronous messages, Klipper will add a \"params\" field Line truncated
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"Klipper is a 3d-Printer firmware. It combines the power of a general purpose computer with one or more micro-controllers. See the features document for more information on why you should use Klipper. To begin using Klipper start by installing it. Klipper is Free Software. Read the documentation or view the Klipper code on github .","title":"Welcome"},{"location":"API_Server.html","text":"API server \u00b6 This document describes Klipper's Application Programmer Interface (API). This interface enables external applications to query and control the Klipper host software. Enabling the API socket \u00b6 In order to use the API server, the klippy.py host software must be started with the -a parameter. For example: ~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log This causes the host software to create a Unix Domain Socket. A client can then open a connection on that socket and send commands to Klipper. See the Moonraker project for a popular tool that can forward HTTP requests to Klipper's API Server Unix Domain Socket. Request format \u00b6 Messages sent and received on the socket are JSON encoded strings terminated by an ASCII 0x03 character: <json_object_1><0x03><json_object_2><0x03>... Klipper contains a scripts/whconsole.py tool that can perform the above message framing. For example: ~/klipper/scripts/whconsole.py /tmp/klippy_uds This tool can read a series of JSON commands from stdin, send them to Klipper, and report the results. The tool expects each JSON command to be on a single line, and it will automatically append the 0x03 terminator when transmitting a request. (The Klipper API server does not have a newline requirement.) API Protocol \u00b6 The command protocol used on the communication socket is inspired by json-rpc . A request might look like: {\"id\": 123, \"method\": \"info\", \"params\": {}} and a response might look like: {\"id\": 123, \"result\": {\"state_message\": \"Printer is ready\", \"klipper_path\": \"/home/pi/klipper\", \"config_file\": \"/home/pi/printer.cfg\", \"software_version\": \"v0.8.0-823-g883b1cb6\", \"hostname\": \"octopi\", \"cpu_info\": \"4 core ARMv7 Processor rev 4 (v7l)\", \"state\": \"ready\", \"python_path\": \"/home/pi/klippy-env/bin/python\", \"log_file\": \"/tmp/klippy.log\"}} Each request must be a JSON dictionary. (This document uses the Python term \"dictionary\" to describe a \"JSON object\" - a mapping of key/value pairs contained within {} .) The request dictionary must contain a \"method\" parameter that is the string name of an available Klipper \"endpoint\". The request dictionary may contain a \"params\" parameter which must be of a dictionary type. The \"params\" provide additional parameter information to the Klipper \"endpoint\" handling the request. Its content is specific to the \"endpoint\". The request dictionary may contain an \"id\" parameter which may be of any JSON type. If \"id\" is present then Klipper will respond to the request with a response message containing that \"id\". If \"id\" is omitted (or set to a JSON \"null\" value) then Klipper will not provide any response to the request. A response message is a JSON dictionary containing \"id\" and \"result\". The \"result\" is always a dictionary - its contents are specific to the \"endpoint\" handling the request. If the processing of a request results in an error, then the response message will contain an \"error\" field instead of a \"result\" field. For example, the request: {\"id\": 123, \"method\": \"gcode/script\", \"params\": {\"script\": \"G1 X200\"}} might result in an error response such as: {\"id\": 123, \"error\": {\"message\": \"Must home axis first: 200.000 0.000 0.000 [0.000]\", \"error\": \"WebRequestError\"}} Klipper will always start processing requests in the order that they are received. However, some request may not complete immediately, which could cause the associated response to be sent out of order with respect to responses from other requests. A JSON request will never pause the processing of future JSON requests. Subscriptions \u00b6 Some Klipper \"endpoint\" requests allow one to \"subscribe\" to future asynchronous update messages. For example: {\"id\": 123, \"method\": \"gcode/subscribe_output\", \"params\": {\"response_template\":{\"key\": 345}}} may initially respond with: {\"id\": 123, \"result\": {}} and cause Klipper to send future messages similar to: {\"params\": {\"response\": \"ok B:22.8 /0.0 T0:22.4 /0.0\"}, \"key\": 345} A subscription request accepts a \"response_template\" dictionary in the \"params\" field of the request. That \"response_template\" dictionary is used as a template for future asynchronous messages - it may contain arbitrary key/value pairs. When sending these future asynchronous messages, Klipper will add a \"params\" field Line truncated
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.