refactored serial port API to abstract physical serial ports behind logical serial port definitions