I'm tring to use QSerialDevice and I have a question (can you hear me kuzulis?
)
I work under linux and I tried in this way:
MyDevice = new TSerialDevice();
MyDevice->setDeviceName("/dev/ttyS0");
MyDevice->setBaudRate(19200);
MyDevice = new TSerialDevice();
MyDevice->setDeviceName("/dev/ttyS0");
MyDevice->setBaudRate(19200);
MyDevice->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
To copy to clipboard, switch view to plain text mode
If I execute this code I can read in console:
TPosixSerialDevice::setBaudRate->Device is not open! Error!
Trying to open File
Opened File succesfully
TPosixSerialDevice::setBaudRate->Device is not open! Error!
Trying to open File
Opened File succesfully
To copy to clipboard, switch view to plain text mode
so it seems wrond the order of calls, so I tried this:
MyDevice = new TSerialDevice();
MyDevice->setBaudRate(19200);
MyDevice->setDeviceName("/dev/ttyS0");
MyDevice = new TSerialDevice();
MyDevice->setBaudRate(19200);
MyDevice->setDeviceName("/dev/ttyS0");
MyDevice->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
To copy to clipboard, switch view to plain text mode
No more error in console, but baudrate is set to default (9600) 
So I tried to test baudrate of first piece of code, althought the error on setBaudRate() the baudrate is correctly set to 19200.
Is this a bug or I am wrong somewhere?
thanks
Bookmarks