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.