read data form a serial device and log on stdout