optimized serial port lookup