diff options
author | David Marcaccini <david.marcaccini@multitech.com> | 2019-03-08 13:19:52 -0600 |
---|---|---|
committer | David Marcaccini <david.marcaccini@multitech.com> | 2019-03-08 13:19:52 -0600 |
commit | 36d1c638d115caefc042fe7a172cc531bb9e1436 (patch) | |
tree | a79037887a483039e9c347d213c519dc52706465 /src/MTS_IO_SerialConnection.cpp | |
parent | 4df85d1a64ded69f1ddd6c4c26e4f52773605c4a (diff) | |
download | libmts-io-36d1c638d115caefc042fe7a172cc531bb9e1436.tar.gz libmts-io-36d1c638d115caefc042fe7a172cc531bb9e1436.tar.bz2 libmts-io-36d1c638d115caefc042fe7a172cc531bb9e1436.zip |
Add support for the ME910C1-WW Radio1.0.15
Diffstat (limited to 'src/MTS_IO_SerialConnection.cpp')
-rw-r--r-- | src/MTS_IO_SerialConnection.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/MTS_IO_SerialConnection.cpp b/src/MTS_IO_SerialConnection.cpp index 4a7923b..a9f3d6e 100644 --- a/src/MTS_IO_SerialConnection.cpp +++ b/src/MTS_IO_SerialConnection.cpp @@ -272,7 +272,8 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) { #else m_iHandle = ::open(m_sPortName.c_str(), O_RDWR | O_NOCTTY ); if (m_iHandle == -1) { - printWarning("SERIAL| Failed to open port [%s] [%d]", m_sPortName.c_str(), errno); + printWarning("SERIAL| Failed to open port [%s] [%d]%s", m_sPortName.c_str(), errno, + errno == 13 ? " (Permission Denied)" : ""); if(!m_apLockFile.isNull()) { m_apLockFile->unlock(); } @@ -282,7 +283,8 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) { int result = tcgetattr(m_iHandle, &m_stPrevOptions); if (result == -1) { - printWarning("SERIAL| Failed to get attributes on port [%s] [%d]", m_sPortName.c_str(), errno); + printWarning("SERIAL| Failed to get attributes on port [%s] [%d]%s", m_sPortName.c_str(), errno, + errno == 13 ? " (Permission Denied)" : ""); } termios options = m_stPrevOptions; @@ -413,7 +415,8 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) { result = tcsetattr(m_iHandle, TCSANOW, &options); if (result == -1) { - printWarning("SERIAL| Failed to set configurations on port [%s] [%d]", m_sPortName.c_str(), errno); + printWarning("SERIAL| Failed to set configurations on port [%s] [%d]%s", m_sPortName.c_str(), errno, + errno == 13 ? " (Permission Denied)" : ""); goto CLEANUP; } result = tcflush(m_iHandle, TCIOFLUSH); |