Make serial port global, flush buffers between command transactions