How to config hotend with mcu in uart bridge mode

hello, I have a hotend controller board like a canbus bridge, but the communication protocol is UART not CAN, how to write the correct config

.-----------.            .-----------.            .-----------.
|           |            |           |            |           | <--- T0
| raspberry | <========> | stm32f407 | <========> | stm32f031 | ---> Heater0
|           |   uart1    |           |   uart2    |           | ---> Fan0
`-----------'            `-----------'            `-----------'

I do not believe that this scenario is supported. You’d need to:

image

tks, is it possible to write a fake device driver, like a tmc connected, then data exchanged through UART using the pre-defined protocol?