Serial port emulator