<div dir="ltr"><div>Hello everyone, I am working on a Google Summer of Code 2023 project [1] under BeagleBoard.or. In this project, I have to write a Linux driver that exposes `dev/ttyMCU0` (or something else) which can be accessed as a Serial tty by MCUmgr [2]. This then sends the data and gets the response from the CC1352 processor in BeagelPlay [3], which runs Zephyr over HDLC UART (the data for this tty port has a particular HDLC address).</div><div><br></div><div>However, all the resources I could find seem to use deprecated or old APIs (like `alloc_tty_driver` instead of `tty_alloc_driver`). After some trial and error, I was able to transfer the data written to `ttyMCU0` to CC1352 using `write` in `tty_operations`. However, I am stumped on how to send data to tty from the driver so that the userspace application can read it (like using `cat`). Supposedly it should be done using `tty_insert_flip_char` but the signature for this function in the tutorials and the one present at `tty_flip.h` is quite different and does not seem to work for me. Also, there seems to be something about the Echo flag but not sure what all that is.</div><div><br></div><div>Finally, I am not sure I understand the relationship between tty port, tty device, and tty driver either so it would be great if someone can guide me to resources related to tty. I think a simple tty echo driver should allow me to get the hang of what I am supposed to do.<br></div><div><br></div><div>Ayush<br></div><div><br></div><div>[1]: <a href="https://elinux.org/BeagleBoard/GSoC/2023_Proposal/AyushSingh">https://elinux.org/BeagleBoard/GSoC/2023_Proposal/AyushSingh</a></div><div>[2]: <a href="https://github.com/apache/mynewt-mcumgr">https://github.com/apache/mynewt-mcumgr</a></div><div>[3]: <a href="https://beagleboard.org/play">https://beagleboard.org/play</a></div><div>[4]: <a href="https://git.beagleboard.org/gsoc/greybus/beagleplay-greybus-driver/-/tree/develop">https://git.beagleboard.org/gsoc/greybus/beagleplay-greybus-driver/-/tree/develop</a></div><br></div>