Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0
-
None
-
Android RockChip rk30sdk 10" tablet.
-
-
0e46e8d319d054c7325d00b97ba4d7bd30f97e7c
Description
When using an FTDI USB to RS485 device on an Android tablet, QSerialPortInfo::availablePorts() returns nothing, when a device is connected.
We're using an add-on module for Android in /system/lib/modules/ftdi_sio.ko, which recognizes the FTDI device and populates /dev/ttyUSB0, however this device isn't shown by QSerialPortInfo::availablePort().
We've hard-coded the port to be /dev/ttyUSB0, but it would be nice if the availablePorts() returned the port connected to the FTDI device. Here is the code I'm using. If I remove the #ifndef statement, nothing is output to the terminal for an Android build.
<code>
port = new QSerialPort(portName);
#ifndef Q_OS_ANDROID
qDebug() << "*********Populating Serial Port(s)************";
foreach(const QSerialPortInfo &info, QSerialPortInfo::availablePorts())
#endif
<code>