diff --git a/arduino-core/src/processing/app/linux/UDevAdmParser.java b/arduino-core/src/processing/app/linux/UDevAdmParser.java index a32aabc55..ed4bbc3d3 100644 --- a/arduino-core/src/processing/app/linux/UDevAdmParser.java +++ b/arduino-core/src/processing/app/linux/UDevAdmParser.java @@ -12,13 +12,8 @@ public class UDevAdmParser { Object vid = properties.get("ID_VENDOR_ID"); Object pid = properties.get("ID_MODEL_ID"); - Object serial = properties.get("ID_SERIAL_SHORT"); if (vid == null || pid == null) return null; - if (serial == null) { - serial = ""; - } - return ("0x" + vid + "_0x" + pid).toUpperCase() + "_" + serial; + return ("0x" + vid + "_0x" + pid).toUpperCase(); } - } diff --git a/arduino-core/src/processing/app/macosx/SystemProfilerParser.java b/arduino-core/src/processing/app/macosx/SystemProfilerParser.java index 87df576fc..d9a08b294 100644 --- a/arduino-core/src/processing/app/macosx/SystemProfilerParser.java +++ b/arduino-core/src/processing/app/macosx/SystemProfilerParser.java @@ -81,7 +81,7 @@ public class SystemProfilerParser { String computedDevicePathMinusChar = computedDevicePath.substring(0, computedDevicePath.length() - 1); String serialMinusChar = serial.substring(0, serial.length() - 1); if (computedDevicePath.equalsIgnoreCase(serial) || computedDevicePathMinusChar.equalsIgnoreCase(serialMinusChar)) { - return (device.get(VID) + "_" + device.get(PID)).toUpperCase() + "_" + device.get(SERIAL_NUMBER); + return (device.get(VID) + "_" + device.get(PID)).toUpperCase(); } } device = new HashMap<>(); diff --git a/arduino-core/src/processing/app/windows/ListComPortsParser.java b/arduino-core/src/processing/app/windows/ListComPortsParser.java index 702721c28..d02a0106a 100644 --- a/arduino-core/src/processing/app/windows/ListComPortsParser.java +++ b/arduino-core/src/processing/app/windows/ListComPortsParser.java @@ -59,9 +59,8 @@ public class ListComPortsParser { String vidPidPart = lineParts[lineParts.length - 1]; Matcher vidMatcher = vidRegExp.matcher(vidPidPart); Matcher pidMatcher = pidRegExp.matcher(vidPidPart); - String iSerial = vidPidPart.substring(vidPidPart.lastIndexOf("\\")+1); if (vidMatcher.find() && pidMatcher.find()) { - return ("0x" + vidMatcher.group(1) + "_0x" + pidMatcher.group(1)).toUpperCase() + "_" + iSerial; + return ("0x" + vidMatcher.group(1) + "_0x" + pidMatcher.group(1)).toUpperCase(); } } }