Feature request: extend protocol with UART commands

Currently Klipper firmware has support for only one UART with hardcoded use as interface to the Klipper itself.
I have several printers that have external touch screen control modules connected through UART to the main board.
And I can see that it became some kind of industry standard to use such touch screen modules with serial interface connected to the main board. The serial protocol is simple but could be different between modules and versions.
I am thinking of adding support to the Klipper but it needs significant changes in the firmware.
Basically idea is to add several commands to the Klipper protocol to use UART as resource: open UART channel with parameters, write data to UART channel and receive messages from UART channel.
If someone formalize this idea into generic code for the Klipper then I will be able to implement it for STM32 microcontrollers and may be AVR. With this extension to the protocol it will be easy to support (in python) all possible touchscreen modules or other serial connected modules.

1 Like

This has been raised a few times before. I’m not aware of anyone currently working on it. It’s fine if someone wishes to add support. In the past there was [WIP/draft] - serial bridge - mks/bigtreetech uart lcd support by etet100 · Pull Request #3885 · Klipper3d/klipper · GitHub . It’s possible Desuuuu has code for this ( GitHub - Desuuuu/klipper: Klipper is a 3d-printer firmware. Modified to work with DWIN T5UID1 touchscreens. ) but I don’t think he has plans to merge into main Klipper repo.

-Kevin

Ok, understood. Thank you for information. I will try to work something out.

It would certainly be great to to have some use for all those Touchscreens that turned black with Klipper taking over!

If you need help @lanserge hmu. I could code something.

Thank you for willing to help.
I will try to create some C skeleton first with some implementation for stm32 and will post info here. After that we could discuss next required steps to make it done fully and properly.

Yes please. IF anybody is able to code in the DWIN T5. I am happy to build a UI to bring the screens back to life.

Hi all,

Bad news here: Question regards to the repo · Desuuuu/klipper · Discussion #147 · GitHub

Looks like Desuuuu has lost interest to ‘UART channel’ topic, but his code looks good and nice. Do we have a chance to merge Desuuuu’s changes? What else needs to be done?

I saw Contributing to Klipper - Klipper documentation with requirements like ’ Format of commit messages’ and Desuuuu’s commit messages don’t follow the rule, as I see it. Is that the only a reason not to merge these changes? If so, I may rebase and amend Desuuuu’s commits (with my ‘Signed-off-by’ signature added) and create a pull request. If we have other reasons not to merge - please let us know…

Thanks in advance.

I dont know the state of this but could this not be reopened now that we have the developments in regards to can2040.
https://github.com/Klipper3d/klipper/pull/3885

The argument Kevin makes regarding having it be a makemenu selection of the feature doesnt apply anymore now that we have the rp2040 and the pin configuration can be moved to the printer.cfg file, not?

Any two rp2040 gpio pins may be used for the “can rx” and “can tx” wires.

Reference to can2040 documentation

1 Like

I would also highly appreciate the DWIN T5 touchscreen support for my Ender 6 (currently running on a ~1yr old Klipper modification by Desuuu)!

Unfortunately I don’t know how I could help on this, as my knowledge on UART and programming in general is too weak.