# Modifying what is shown in the uART

I am working on establishing user communication (one may say a basic UI) from the user's PC to my Raspberry Pi, where the RPI would accept pre-defined commands from the user via uART and then process them in a python script with pySerial and then return results to the user via uART again. I would also like the user to not be able to access the shell of the RPI itself. Kernel notifications are also fine, but if there is a way for those to not be shown would also be better, as it would make the whole thing much cleaner.

Is there a way to modify what is shown to the user in the uART in such a way?

Of course, I am connecting to the RPI with a dongle connected to the GPIO Tx and Rx pins. I am running Raspbian 9 (stretch) on the RPi and Ubuntu 16.04.3 LTS on my PC.

Another question somewhat related to this is, is there a way to know with pySerial whether there is a device on the other end of the uART connection? I can't seem to find much in the docs and isOpen() doesn't help much.

If you disable the use of the UART as a console you can use it in any way you please. There is an option in raspi-config for this purpose (sudo raspi-config).