diff --git a/testclient/mainwindow.cpp b/testclient/mainwindow.cpp --- a/testclient/mainwindow.cpp +++ b/testclient/mainwindow.cpp @@ -276,7 +276,14 @@ QList serialPortInfoList = QSerialPortInfo::availablePorts(); if (!serialPortInfoList.isEmpty()) { foreach (const QSerialPortInfo &serialPortInfo, serialPortInfoList) { +#ifdef Q_OS_MAC + //Mac os has callout serial ports starting with cu. they can only recv data. filter them out + if (!serialPortInfo.portName().startsWith(QStringLiteral("cu."), Qt::CaseInsensitive)) { + ports.append(serialPortInfo.portName()); + } +#else ports.append(serialPortInfo.portName()); +#endif } if (ports == serialPortList) { return;