switch mode to serial port