use a pair of virtual serial ports and fix InsertSQL bug