summaryrefslogtreecommitdiffstats
path: root/tools/runonphone/serenum_unix.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-11-05 13:20:42 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-11-05 13:33:30 (GMT)
commit0d6991e3219de48429109dc272e9598acf45d5df (patch)
treec41cc40b9d92f0bc1bf650b1499f872a2800c91e /tools/runonphone/serenum_unix.cpp
parentebecf192abe56c405409343acc2f97eaf9124fc3 (diff)
downloadQt-0d6991e3219de48429109dc272e9598acf45d5df.zip
Qt-0d6991e3219de48429109dc272e9598acf45d5df.tar.gz
Qt-0d6991e3219de48429109dc272e9598acf45d5df.tar.bz2
Fix detection of N95 with linux 2.6.34+
Linux cdc-acm driver detects the debug port on some Nokia phones automatically When it does, it creates two ttyACMx devices and the symlink in /dev/serial/by-id contains the CDC master interface number. In contrast the generic usbserial driver creates a symlink containing the CDC slave interface number. This is because it knows nothing about CDC and is just looking for BULK IN/OUT interfaces that might be serial ports. This change creates match strings for both the master and slave interfaces, so the phone is detected if either driver is loaded. Reviewed-By: axis
Diffstat (limited to 'tools/runonphone/serenum_unix.cpp')
-rw-r--r--tools/runonphone/serenum_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp
index db6375e..4491bd0 100644
--- a/tools/runonphone/serenum_unix.cpp
+++ b/tools/runonphone/serenum_unix.cpp
@@ -100,7 +100,7 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
// data transmission.
// the extra info stores that as a index for the interface
if (buf[0] >= 5 && buf[1] == 36 && buf[2] == 6) { // CDC Union
- for (int i = 4; i < buf[0]; i++)
+ for (int i = 3; i < buf[0]; i++)
usableInterfaces.append((int) buf[i]);
}
size -= buf[0];