Fixed some bugs and Implement Unix SerialPort