Modified to use real serial port.