prepare serial communication