[serialport] QSerialPortInfo::availablePorts result
I use Qt5 on ubuntu 14.04
Why when I use QSerialPortInfo::availablePorts without a arduino plugged it return the all ports from /dev/ttyS0 to /dev/ttyS31 and when I use QSerialPortInfo::availablePorts with a arduino plugged it return ONLY /dev/ttyACM0?
Re: [serialport] QSerialPortInfo::availablePorts result
Are the other devices still visible in /dev in the second situation?
Cheers,
_
Re: [serialport] QSerialPortInfo::availablePorts result
Re: [serialport] QSerialPortInfo::availablePorts result
If we look at the relevant code we see that it can try three different methods of finding serial devices, falling back one by one if the current method fails.
First it tries to get the information from udev, then from sysfs and only then falling back to device file nodes.
So maybe what happens is that if you list ports without the Arduino attached, it falls back more then when it is attached.
Cheers,
_