Update the serial communication thread and add an sending window.