# Feature request: add klipper MCU input mode

**URL:** https://community.simplefoc.com/t/feature-request-add-klipper-mcu-input-mode/3034
**Category:** developement
**Created:** [February 26, 2023, 11:12am UTC](https://community.simplefoc.com/t/feature-request-add-klipper-mcu-input-mode/3034 "2023-02-26T11:12:35Z")
**Posts on this page:** 1
**Showing post:** 30

<div class="post-metadata">

### Author: ![Juan-Antonio\_Soren\_E](https://community.simplefoc.com/user_avatar/community.simplefoc.com/juan-antonio_soren_e/32/9969_2.png) [@Juan-Antonio\_Soren\_E](https://community.simplefoc.com/u/Juan-Antonio_Soren_E)
#### Post date: [April 19, 2023, 1:29am UTC](https://community.simplefoc.com/t/feature-request-add-klipper-mcu-input-mode/3034/30 "2023-04-19T01:29:37Z")

</div>

Klipper is in a sense a parsing regime, based on USB (up to 64byte transfers); [Source](https://www.klipper3d.org/Protocol.html)

### Message Blocks[¶](https://www.klipper3d.org/Protocol.html#message-blocks)

All data sent from host to micro-controller and vice-versa are contained in “message blocks”. A message block has a two byte header and a three byte trailer. The format of a message block is:

```auto
<1 byte length><1 byte sequence><n-byte content><2 byte crc><1 byte sync>

```

The length byte contains the number of bytes in the message block including the header and trailer bytes (thus the minimum message length is 5 bytes). The maximum message block length is currently 64 bytes. The sequence byte contains a 4 bit sequence number in the low-order bits and the high-order bits always contain 0x10 (the high-order bits are reserved for future use). The content bytes contain arbitrary data and its format is described in the following section. The crc bytes contain a 16bit CCITT [CRC](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) of the message block including the header bytes but excluding the trailer bytes. The sync byte is 0x7e.

The format of the message block is inspired by [HDLC](https://en.wikipedia.org/wiki/High-Level_Data_Link_Control) message frames. Like in HDLC, the message block may optionally contain an additional sync character at the start of the block. Unlike in HDLC, a sync character is not exclusive to the framing and may be present in the message block content.

---

_[View the full topic](https://community.simplefoc.com/t/feature-request-add-klipper-mcu-input-mode/3034)._
