public bool Connect() { var info = _coreConfig.LightSerialInfo; try { _logger.Info(string.Format("Connect - Port:{0}, BaudRate:{1}, Parity:{2}, DataBits:{3}, StopBits{4}", info.PortName, info.BaudRate, info.Parity, info.DataBits, info.StopBits)); _buffer = new char[info.DataBits]; return(_serialComm.Connect(info.PortName, info.BaudRate, info.Parity, info.DataBits, info.StopBits)); } catch (Exception e) { _logger.Error(e); return(false); } }