I've installed telnetd on the empeg so my own app can use the serial port and i have still access to the console.

I can open the serial port and read from it and write to it, the only disturbing thing is that all debug messages (printf) are written to ttyS1 too. I would like to redirect stdout to telnet. How can i do this?