summaryrefslogtreecommitdiffstats
path: root/tools/runonphone/symbianutils
diff options
context:
space:
mode:
Diffstat (limited to 'tools/runonphone/symbianutils')
-rw-r--r--tools/runonphone/symbianutils/codadevice.cpp5
-rw-r--r--tools/runonphone/symbianutils/symbiandevicemanager.cpp15
2 files changed, 19 insertions, 1 deletions
diff --git a/tools/runonphone/symbianutils/codadevice.cpp b/tools/runonphone/symbianutils/codadevice.cpp
index 751f84e..f1f5db5 100644
--- a/tools/runonphone/symbianutils/codadevice.cpp
+++ b/tools/runonphone/symbianutils/codadevice.cpp
@@ -71,6 +71,7 @@ static const int maxSerialMessageLength = 0x10000; // given chunking scheme
static const char validProtocolIdStart = (char)0x90;
static const char validProtocolIdEnd = (char)0x95;
static const char codaProtocolId = (char)0x92;
+static const char textTraceProtocolId = (char)0x02;
static const unsigned char serialChunkingStart = 0xfe;
static const unsigned char serialChunkingContinuation = 0x0;
enum { SerialChunkHeaderSize = 2 };
@@ -495,7 +496,9 @@ QPair<int, int> CodaDevice::findSerialHeader(QByteArray &in)
// Good packet
const int length = trk::extractShort(in.constData() + 2);
return QPair<int, int>(4, length);
- } else if (in.at(0) == header1 && in.at(1) >= validProtocolIdStart && in.at(1) <= validProtocolIdEnd) {
+ } else if (in.at(0) == header1
+ && (in.at(1) == textTraceProtocolId
+ || (in.at(1) >= validProtocolIdStart && in.at(1) <= validProtocolIdEnd))) {
// We recognise it but it's not a TCF message - emit it for any interested party to handle
const int length = trk::extractShort(in.constData() + 2);
if (4 + length <= in.size()) {
diff --git a/tools/runonphone/symbianutils/symbiandevicemanager.cpp b/tools/runonphone/symbianutils/symbiandevicemanager.cpp
index 23f5348..e8d0b5e 100644
--- a/tools/runonphone/symbianutils/symbiandevicemanager.cpp
+++ b/tools/runonphone/symbianutils/symbiandevicemanager.cpp
@@ -57,6 +57,7 @@
#include <QtCore/QThread>
#include <QtCore/QWaitCondition>
#include <QtCore/QTimer>
+#include <QtCore/QDir>
namespace SymbianUtils {
@@ -622,6 +623,20 @@ SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::blueToothDevices()
}
}
#endif
+#if defined(Q_OS_MAC)
+ QDir dir("/dev");
+ QStringList filters;
+ filters << "cu.usbmodem*";
+ dir.setNameFilters(filters);
+ QStringList entries = dir.entryList(QDir::System, QDir::Name);
+ foreach (const QString &dev, entries) {
+ SymbianDeviceData *device = new SymbianDeviceData;
+ device->type = SerialPortCommunication;
+ device->portName = dir.filePath(dev);
+ device->friendlyName = tr("USB/Serial device (%1)").arg(device->portName);
+ rc.push_back(SymbianDevice(device));
+ }
+#endif
return rc;
}