How to change QSerialPort baud rate if device is connected?
-
hi
so it sounds like
serialPort->write("commandtochangebaud");
dont make it change baud and when you switch to
Baud19200, they can no longer talk. -
Hi,
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.