I have a Pi Zero with Raspbian which I'd like to use as a logger device with WiFi (it's not a W, I'm using an external WiFi stick). I need the UART to communicate with a microcontroller but sometimes I also need the serial console eg. if I need to reconfigure the WiFi.
What I'd like to achieve is when I start the Pi the UART shall be configured for serial console mode and with a command it shall be reconfigured to be an ordinary serial line. The command will be triggered maybe with a switch which will be read at startup.
I'm familiar with the Linux basics but I don't know how the serial interfaces work.