add frames on window, add serial port check function