aboutsummaryrefslogtreecommitdiffstats
path: root/docs/CANBUS_protocol.md
diff options
context:
space:
mode:
authorDamien <damlobster@gmail.com>2021-07-22 00:40:40 +0200
committerKevinOConnor <kevin@koconnor.net>2021-07-27 13:15:25 -0400
commitcff61605fb7260ab60d1abd4e295b71a533869ac (patch)
treef117dd64e85ec18a62c7c4305781fa03d37ed0a9 /docs/CANBUS_protocol.md
parent7e88f9220c641dd1e7e5b748381bd7ac758bc8d2 (diff)
downloadkutter-cff61605fb7260ab60d1abd4e295b71a533869ac.tar.gz
kutter-cff61605fb7260ab60d1abd4e295b71a533869ac.tar.xz
kutter-cff61605fb7260ab60d1abd4e295b71a533869ac.zip
docs : make modifications to all md files to make them compatible with mkdocs
all markdown files must have a single H1 heading at the top. Signed-off-by: Damien Martin <damlobster@gmail.com> Update CNAME
Diffstat (limited to 'docs/CANBUS_protocol.md')
-rw-r--r--docs/CANBUS_protocol.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/CANBUS_protocol.md b/docs/CANBUS_protocol.md
index 3fa2bf2d..e1561eb5 100644
--- a/docs/CANBUS_protocol.md
+++ b/docs/CANBUS_protocol.md
@@ -1,9 +1,11 @@
+# CANBUS protocol
+
This document describes the protocol Klipper uses to communicate over
[CAN bus](https://en.wikipedia.org/wiki/CAN_bus). See
[CANBUS.md](CANBUS.md) for information on configuring Klipper with CAN
bus.
-# Micro-controller id assignment
+## Micro-controller id assignment
Klipper uses only CAN 2.0A standard size CAN bus packets, which are
limited to 8 data bytes and an 11-bit CAN bus identifier. In order to
@@ -19,7 +21,7 @@ that is used during id assignment. This identifier can exceed the
length of one CAN packet, so a hash function is used to generate a
unique 6-byte id (`canbus_uuid`) from the factory id.
-# Admin messages
+## Admin messages
Admin messages are used for id assignment. Admin messages sent from
host to micro-controller use the CAN bus id `0x3f0` and messages sent
@@ -27,7 +29,7 @@ from micro-controller to host use the CAN bus id `0x3f1`. All
micro-controllers listen to messages on id `0x3f0`; that id can be
thought of as a "broadcast address".
-## CMD_QUERY_UNASSIGNED message
+### CMD_QUERY_UNASSIGNED message
This command queries all micro-controllers that have not yet been
assigned a `canbus_nodeid`. Unassigned micro-controllers will respond
@@ -36,7 +38,7 @@ with a RESP_NEED_NODEID response message.
The CMD_QUERY_UNASSIGNED message format is:
`<1-byte message_id = 0x00>`
-## CMD_SET_NODEID message
+### CMD_SET_NODEID message
This command assigns a `canbus_nodeid` to the micro-controller with a
given `canbus_uuid`.
@@ -44,12 +46,12 @@ given `canbus_uuid`.
The CMD_SET_NODEID message format is:
`<1-byte message_id = 0x01><6-byte canbus_uuid><1-byte canbus_nodeid>`
-## RESP_NEED_NODEID message
+### RESP_NEED_NODEID message
The RESP_NEED_NODEID message format is:
`<1-byte message_id = 0x20><6-byte canbus_uuid>`
-# Data Packets
+## Data Packets
A micro-controller that has been assigned a nodeid via the
CMD_SET_NODEID command can send and receive data packets.