Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all COM-ports are available in QGC 4.3.0 #11500

Open
Olexandros opened this issue May 7, 2024 · 1 comment
Open

Not all COM-ports are available in QGC 4.3.0 #11500

Olexandros opened this issue May 7, 2024 · 1 comment
Assignees
Milestone

Comments

@Olexandros
Copy link

Expected Behavior

All COM-ports available in Device Manager in Windows used to be available in QGC as well when a new Comm Link configuration is added.

Current Behavior

However, in version 4.3.0 some COM-ports are missing and it's impossible to add them in the Comm Link configuration. For example, I have radio links with 2 COM-ports on a single physical USB port. Both COM-ports used to be available to add as a Comm Link, yet only one is shown in the QGC now.
When the previous QGC version 4.2.9 is installed, all COM-ports are available again.

image
image

@HTRamsey HTRamsey self-assigned this May 7, 2024
@DonLakeFlyer DonLakeFlyer added this to the Release V5.0 milestone May 8, 2024
@codeceptsDE
Copy link

I think this is implemented here (line 306 in particular):

QList<QGCSerialPortInfo> QGCSerialPortInfo::availablePorts(void)
{
typedef QPair<quint16, quint16> VidPidPair_t;
QList<QGCSerialPortInfo> list;
QMap<VidPidPair_t, QStringList> seenSerialNumbers;
for (QSerialPortInfo portInfo: QSerialPortInfo::availablePorts()) {
if (!isSystemPort(&portInfo)) {
if (portInfo.hasVendorIdentifier() && portInfo.hasProductIdentifier() && !portInfo.serialNumber().isEmpty() && portInfo.serialNumber() != "0") {
VidPidPair_t vidPid(portInfo.vendorIdentifier(), portInfo.productIdentifier());
if (seenSerialNumbers.contains(vidPid) && seenSerialNumbers[vidPid].contains(portInfo.serialNumber())) {
// Some boards are a composite USB device, with the first port being mavlink and the second something else. We only expose to first mavlink port.
// However internal NMEA devices can present like this, so dont skip anything with NMEA in description
if(!portInfo.description().contains("NMEA"))
{
qCDebug(QGCSerialPortInfoLog) << "Skipping secondary port on same device" << portInfo.portName() << portInfo.vendorIdentifier() << portInfo.productIdentifier() << portInfo.serialNumber();
continue;
}
}
seenSerialNumbers[vidPid].append(portInfo.serialNumber());
}
list << *((QGCSerialPortInfo*)&portInfo);
}
}
return list;
}

I consider this feature undesirable/broken.
I have a CubeOrange+ where Windows returns the two ports it exposes in the "wrong" order - Mavlink comes second. I think this is even independent of the COM numbers, but something internal. Just disregarding seems to me like a bad policy.

I had to "uninstall" the second COM device of the CubeOrange+, then QGC connected.

My preferred solution would be listing all ports - i.e. removing duplicate port detection entirely - and just writing out the port descriptions after the COM number in the dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants