add serial support

serial only support windows and linux