apargeter
8th January 2016, 04:09
Hi all,
I'm having a problem where QFile.read() hangs until it eventually times out (several seconds) when reading from a USB device. I wrote the USB device driver (based on the OSRFX2 sample driver).
Neither waitForReadyRead() or bytesAvailable() work as advertised.
QFile.write() also has a delay which is unexpected but not problematic.
I wrote a c program using the stdlib read()/write() functions and it works perfectly as expected.
I am calling QFile.read() from within a QThread if that matters.
I have searched all over the WEB for answers but can't find any answers.
What could be the problem?
Is there any way to abort a QFile.read()?
Thanks,
Andrew
I'm having a problem where QFile.read() hangs until it eventually times out (several seconds) when reading from a USB device. I wrote the USB device driver (based on the OSRFX2 sample driver).
Neither waitForReadyRead() or bytesAvailable() work as advertised.
QFile.write() also has a delay which is unexpected but not problematic.
I wrote a c program using the stdlib read()/write() functions and it works perfectly as expected.
I am calling QFile.read() from within a QThread if that matters.
I have searched all over the WEB for answers but can't find any answers.
What could be the problem?
Is there any way to abort a QFile.read()?
Thanks,
Andrew