I'm attempting to set a custom baud rate of 10400 to my device on Linux using Qt. However, when I run the application, the console output keeps reporting that
Baud rate of serial port /dev/ttyUSB0 is set to 10403 instead of 10400: divisor 2307.692383 unsupported
I've also set the data bits to 8, parity to no parity, and stop bits to 1, which are pretty standard.
Here's my code by the way:
serial -> setBaudRate(10400); // Set Baud Rate
serial -> setDataBits(QSerialPort::Data8);
serial -> setStopBits(QSerialPort::OneStop);
serial -> setParity(QSerialPort::NoParity);
When I run the application on Windows however, it works totally fine.
My device isn't able to connect with any other baud rate other than 10400. The application is able to compile and run, however the result is all garbage. I want to know if there's a way where I can specify this baud rate without any problems?