Has anyone else migrated from the playground version of the serial port library to the latest version pointed to by git?
git clone git://gitorious.org/qt/qtserialport.git
The QSerialPortInfo version of SerailPortInfo is broken pretty bad. In the past you could do the following to identify all serial port devices which had hardware.
for (int x=0; x < 4; x++)
{
pName.sprintf("ttyS%d", x);
SerialPortInfo sp(pName);
if (sp.portName().length() > 0)
{
FILE_LOG(logINFO) << "Found Serial port: " << qPrintable(sp.portName());
m_serialPortNames.append(sp.systemLocation());
}
}
Now, even all of these tests give you nothing but trash.
for (int x=0; x < 4; x++)
{
pName.sprintf("ttyS%d", x);
QSerialPortInfo sp(pName);
if (!sp.isNull())
{
if (sp.isValid())
{
if (sp.portName().length() > 0)
{
FILE_LOG(logINFO) << "Found Serial port: " << qPrintable(sp.portName());
m_serialPortNames.append(sp.systemLocation());
}
}
}
}
Two questions:
1) Is that git link where to get the latest/official version? I asked that question before and was deafened by the volume of silence that responded.
2) Is there some other "official" way to use this library to identify /dev entries which actually have serial hardware to support them?
Bookmarks