jiuzhuaxiong / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

error in determining the name #86

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
CODE:
QextSerialEnumerator e;
    QList<QextPortInfo> l = e.getPorts();
    foreach(QextPortInfo i, l) {
        qDebug() << i.enumName << i.friendName << i.physName << i.portName <<i.productID << i.vendorID ;
        QextSerialPort port(i.portName);
        if(port.open(QIODevice::ReadWrite)) {
            qDebug()<<i.portName<<"- OPENED";
            port.close();
        } else {
            qDebug()<<i.portName<<"- can not opened";
        }
    }
    QextSerialPort port("COM1");
    if(port.open(QIODevice::ReadWrite)) {
        qDebug("COM1 - OPENED");
        port.close();
    } else {
        qDebug("COM1 - can not opened");
    }

OUTPUT:
"ACPI" "ECP порт принтера (LPT1)" "\Device\00000085" "LPT1" 0 0 
failed to set Comm Mask. Error code: 
"LPT1" - can not opened 
"ACPI" "Последовательный порт (COM2)" "\Device\00000084" 
"COM2" 0 0 
"COM2" - OPENED 
"MXUPORT" "MOXA USB Serial Port (COM1)" "\Device\SerBus0" "COM3" 0 0 
"COM3" - can not opened 
"ROOT" "Порт связи Bluetooth (COM4)" "\Device\0000004f" "COM4" 0 0 
"COM4" - OPENED 
"ROOT" "Порт связи Bluetooth (COM14)" "\Device\00000050" "\\.\COM14" 0 
0 
"\\.\COM14" - OPENED 
COM1 - OPENED

Original issue reported on code.google.com by prostoRo...@gmail.com on 7 Feb 2011 at 1:20

GoogleCodeExporter commented 8 years ago
do you mean LTP1 ?

I known reason, but I don not know how to solve it.

from source code, we can see the history:

GUID_CLASS_COMPORT
↓
↓
aa5882dfa3bd
GUID_DEVCLASS_PORTS
↓
↓
3e39065422a9
GUID_DEVINTERFACE_COMPORT
↓
↓
ba72a2da9857
GUID_DEVCLASS_PORTS

The first one can solve the problem, but i don't know, why it is not be used 
again?

Original comment by dbzhang...@gmail.com on 10 Nov 2011 at 6:25

GoogleCodeExporter commented 8 years ago

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 6:25