How to change QSerialPort baud rate if device is connected?
Hello my device has option to change baudrate it always start with 9600.
I lost connection and device don't answer.
so it sounds like
dont make it change baud and when you switch to
Baud19200, they can no longer talk.
But comand is from datasheet. Maybe I have to close and open again or change in windows Device manager->COM/LPT->baudrate
Can you give more information about that device ?
Maybe you need to wait a bit between write() and setBaudRate(). You need to call the setBaudRate() only when the wtite() completes. e.g. it can be done after bytesWritten(qint64 bytes) signal + some delay with QTimer.